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_listing_grid.php
<?php
if (!class_exists('doris_posts_listing_grid')) {
    class doris_posts_listing_grid {
        
        static $pageInfo=0;
        
        public function render( $page_info ) {
            $block_str = '';
            $moduleID = uniqid('doris_posts_listing_grid-');
            $moduleConfigs = array();
            
            self::$pageInfo = $page_info;
                        
            //get config
            
            $moduleConfigs['sub_title'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_sub_title', true );
            $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']     = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_limit', true );
            $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['ajax_load_more'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_ajax_load_more', true );
            
            $viewallButton = array();
            if ($moduleConfigs['ajax_load_more'] == 'viewall') :            
                $viewallButton['view_all_link'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_view_all_link', true );
                $viewallButton['view_all_text'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_view_all_text', true );
                $viewallButton['view_all_target'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_view_all_target', true );
            endif;
            
            $moduleConfigs['heading_style'] = get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_heading_style', true );
            $moduleConfigs['heading_inverse'] = 'no';
            
            if(isset($moduleConfigs['heading_style'])) {
                $headingClass = atbs_core::bk_get_block_heading_class($moduleConfigs['heading_style'], $moduleConfigs['heading_inverse']);
            }

            //Post Source & Icon
            $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',
                'meta'          => get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_meta', true ),
                'cat'           => get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_cat_style', true ), // Category Style
                'excerpt'       => get_post_meta( $page_info['page_id'], $page_info['block_prefix'].'_excerpt', true ),
            );
            
            atbs_core::bk_add_buff('query', $moduleID, 'moduleInfo', $moduleInfo);
               
            $the_query = bk_get_query::doris_query($moduleConfigs, $moduleID);              //get query

            $block_str .= '<div id="'.$moduleID.'" class="doris-block doris_posts_listing_grid">';
            $block_str .= atbs_core::bk_get_doris_module_heading($moduleConfigs['sub_title'], $moduleConfigs['title']);
            
            if($moduleConfigs['ajax_load_more'] == 'loadmore') {
                $block_str .= '<div class="js-ajax-load-post" data-posts-to-load="'.$moduleConfigs['limit'].'">';
            }
            
            $block_str .= '<div class="posts-list doris-block--inner post-listing-grid small-post-vertical row">';
            if ( $the_query->have_posts() ) :
                $block_str .= $this->render_modules($the_query, $moduleInfo);            //render modules
            endif;
            
            $block_str .= '</div>';
            $dorisMaxPages = doris_ajax_function::max_num_pages_cal($the_query, $moduleConfigs['offset'], $moduleConfigs['limit']);
            $block_str .= doris_ajax_function::ajax_load_buttons($moduleConfigs['ajax_load_more'], $dorisMaxPages, $viewallButton);
            
            if($moduleConfigs['ajax_load_more'] == 'loadmore') {
                $block_str .= '</div>';
            }
            
            $block_str .= '</div><!-- .doris-block -->';
                        
            unset($moduleConfigs); unset($the_query);     //free
            wp_reset_postdata();
            return $block_str;            
    	}
        
        public function render_modules($the_query, $moduleInfo = ''){
            $render_modules = '';
            $currentPost = 0;
            
            $postSource = $moduleInfo['post_source'];
            $postIcon = $moduleInfo['post_icon'];
            $iconPosition = 'top-right';
            $iconSize = '';
            
            $bypassPostIconDetech = 0;         
            $postIconAttr = array(); 
            $postIconAttr['postIconClass'] = '';
            $postIconAttr['iconType'] = '';
            
            if($postIcon == 'disable') {
                $bypassPostIconDetech = 1;
            }else {
                $bypassPostIconDetech = 0;
            }
            
            if ( $the_query->have_posts() ) :
                $postVerticalHTML = new doris_vertical_4;
                                        
                $postVerticalAttr = array (
                    'cat'           => 1,
                    'catClass'      => '',
                    'thumbSize'     => 'doris-xs-4_3',
                    'typescale'     => 'typescale-2',
                    'except_length' => 12,
                    'meta'          => array('date_without_icon'),        
                );
                while ( $the_query->have_posts() ): $the_query->the_post();    
                    $currentPost = $the_query->current_post;      
                    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'], $iconSize, $iconPosition);
                        
                        $postVerticalAttr['postIcon']    = $postIconAttr;
                    }
        
                    $postVerticalAttr['postID'] = get_the_ID();
                    $render_modules .= '<div class="col-sm-6 small-post-vertical__item">';
                    $render_modules .= $postVerticalHTML->render($postVerticalAttr);
                    $render_modules .= '</div>';

                endwhile;
                
            endif;      
            
            return $render_modules;
        }
    }
}