HEX
Server: LiteSpeed
System: Linux sinope.sitehostingserver.com 5.14.0-611.49.2.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 30 09:05:08 EDT 2026 x86_64
User: aprilnet (1155)
PHP: 8.2.32
Disabled: popen,imap_mail,exec,passthru,system,shell_exec,proc_open,pcntl_exec,eval,allow_url_fopen,allow_url_include,mail,proc_get_status,get_cfg_var,disk_free_space,disk_total_space,diskfreespace,getmygid,getmyinode,getmypid,geymyuid,proc_nice,proc_terminate,proc_close,apache_child_terminate,chown,lchgrp,lchown,link,readlink,highlight_file,show_source,php_strip_whitespace,get_meta_tags,dl,leak,pfsockopen,event_new,pcntl_signal,pcntl_alarm,register_tick_function,apache_setenv,define_syslog_variables,escapeshellarg,escapeshellcmd,ini_alter,ini_restore,inject_code,openlog,syslog,xmlrpc_entity_decode,phpAds_remoteInfo,phpAds_XmlRpc,phpAds_xmlrpcDecode,phpAds_xmlrpcEncode,chgrp,php_eval,safe_dir,root,ftok,egy_perl,symlink,wscript
Upload Files
File: /home/aprilnet/public_html/sciohost.org/wp-content/themes/doris/inc/blocks/posts_grid_a.php
<?php
if (!class_exists('doris_posts_grid_a')) {
    class doris_posts_grid_a {
        
        static $pageInfo=0;
        
        public function render( $page_info ) {
            $block_str = '';
            $moduleID = uniqid('doris_posts_grid_a-');
            
            $moduleConfigs = array();
            $moduleData = array();
            
            self::$pageInfo = $page_info;
            
            //get config
            
            $moduleConfigs['title']     = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_title', true );
            $moduleConfigs['orderby']   = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_orderby', true );
            $moduleConfigs['tags']      = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_tags', true );
            $moduleConfigs['limit']     = 3;
            $moduleConfigs['offset']    = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_offset', true );
            $moduleConfigs['feature']   = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_feature', true );
            $moduleConfigs['category_id'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_category', true );
            $moduleConfigs['editor_pick'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_editor_pick', true );
            $moduleConfigs['editor_exclude'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_editor_exclude', true );
            
            $moduleConfigs['post_source'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_post_source', true );
            $moduleInfo = array(
                'post_source'   => $moduleConfigs['post_source'],
                'post_icon'     => get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_post_icon', true ),
                'iconPosition'  => 'top-right',
            );
            
            $the_query = bk_get_query::doris_query($moduleConfigs);              //get query

            if ( $the_query->have_posts()) :
            $block_str .= '<div id="'.$moduleID.'" class="doris-block doris-block--fullwidth doris-post-grid-a">';
           	$block_str .= '<div class="container"><div class="post-grid-a__inner">';
            $block_str .= atbs_core::bk_get_doris_module_heading('', $moduleConfigs['title']);
            if ( $the_query->have_posts() ) :
                $block_str .= $this->render_modules($the_query, $moduleInfo);            //render modules
            endif;        //render modules
            $block_str .= '</div></div><!-- .container -->';
            $block_str .= '</div><!-- .doris-block -->';
            
            endif;
            
            unset($moduleConfigs); unset($the_query);     //free
            wp_reset_postdata();
            return $block_str;            
    	}
        
        public function render_modules($the_query, $moduleInfo = ''){
            
            $render_modules = '';
            $postSource = $moduleInfo['post_source'];
            $postIcon = $moduleInfo['post_icon'];
            $iconPosition = 'top-right';
            
            $bypassPostIconDetech = 0;         
            $postIconAttr = array(); 
            $postIconAttr['postIconClass'] = '';
            $postIconAttr['iconType'] = '';
            
            if($postIcon == 'disable') {
                $bypassPostIconDetech = 1;
            }else {
                $bypassPostIconDetech = 0;
            }    
            
            if ( $the_query->have_posts() ) :
                $postHorizontalHTML = new doris_horizontal_1;
                $postVerticalHTML = new doris_vertical_1;
                $postVerticalAttr = array (
                    'additionalClass'   => 'doris-post--vertical',
                    'cat'               => 0,
                    'catClass'          => '',
                    'thumbSize'     => 'doris-xs-4_3',
                    'typescale'     => 'typescale-4',
                    'additionalExcerptClass' => 'post__excerpt--lg',
                    'postIcon'          => $postIconAttr,  
                );
                $postHorizontalAttr = array (
                    'additionalClass'   => '',
                    'cat'               => 1,
                    'catClass'          => '',
                    'thumbSize'         => 'doris-m-4_3',
                    'typescale'         => 'typescale-2',
                    'except_length'     => 15,
                    'postIcon'          => $postIconAttr, 
                );
                
                $render_modules .= '<div class="row post-grid-a__wrap">';
                while ( $the_query->have_posts() ): $the_query->the_post();
                    if($the_query->current_post == 0) :
                        $render_modules .= '<div class="col-md-9 post-grid-a-left">';                                                            
                        $postHorizontalAttr['postID'] = get_the_ID();
                        if($bypassPostIconDetech != 1) {
                            if($postSource != 'all') {
                                $postIconAttr['iconType'] = $postSource;
                            }else {
                                $postIconAttr['iconType'] = atbs_core::bk_post_format_detect(get_the_ID());
                            }
    
                            $postIconAttr['postIconClass']  = atbs_core::get_post_icon_class($postIconAttr['iconType'], 'medium', $iconPosition);
                            
                            $postHorizontalAttr['postIcon'] = $postIconAttr;
                        }  
                        $render_modules .= '<div class="post-horizontal-a">';
                        $render_modules .= $postHorizontalHTML->render($postHorizontalAttr);
                        $render_modules .= '</div>';
                        $render_modules .= '</div><!-- End .post-grid-a-left -->';       
                        $currentPost = $the_query->current_post;                                                                 
                    else:
                        if($the_query->current_post == 1) :
                            $render_modules .= '<div class="col-md-3 post-grid-a-right"><div class="post-vertical--list-a"><ul class="post-vertical--list" >';
                        endif;                                                            
                        $postVerticalAttr['postID'] = get_the_ID();
                        if($bypassPostIconDetech != 1) {
                            $addClass = 'overlay-item--sm-p';
                            if($postSource != 'all') {
                                $postIconAttr['iconType'] = $postSource;
                            }else {
                                $postIconAttr['iconType'] = atbs_core::bk_post_format_detect(get_the_ID());
                            }
    
                            $postIconAttr['postIconClass']  = atbs_core::get_post_icon_class($postIconAttr['iconType'], '', $iconPosition, $addClass);
                            
                            $postVerticalAttr['postIcon'] = $postIconAttr;
                        }   
                        $render_modules .= '<li class="post-vertical--list__item">';
                        $render_modules .= $postVerticalHTML->render($postVerticalAttr);
                        $render_modules .= '</li>';
                        $currentPost = $the_query->current_post;
                    endif;
                endwhile;
                if($currentPost >= 1) :
                    $render_modules .= '</ul></div></div><!-- End .post-grid-a-right -->';
                endif;
                $render_modules .= '</div>';
            endif;
              
            return $render_modules;
        }
    }
}