HEX
Server: nginx/1.28.0
System: Linux yisu-68a5f20334161 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: www (1000)
PHP: 8.2.28
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/q.autos58.cn/wp-content/themes/morenews/inc/hooks/hook-frontpage.php
<?php

if (!function_exists('morenews_front_page_widgets_section')) :
    /**
     *
     * @param null
     * @return null
     *
     * @since MoreNews 1.0.0
     *
     */
    function morenews_front_page_widgets_section()
    {
        $frontpage_layout = morenews_get_option('frontpage_content_alignment');
        $frontpage_content_type = morenews_get_option('frontpage_content_type');

?>

        <section class="section-block-upper">



            <div id="primary" class="content-area">
                <main id="main" class="site-main">

                    <?php
                    if ($frontpage_content_type == 'frontpage-widgets-and-content') {
                        while (have_posts()) : the_post();

                            
                            $content = trim(get_the_content());
                            if (!empty($content)) {
                                get_template_part('template-parts/content', 'page');
                            }

                        endwhile;
                    }

                    ?>
                    <?php if (is_active_sidebar('home-content-widgets')) : ?>
                        <?php dynamic_sidebar('home-content-widgets'); ?>
                    <?php endif; ?>
                </main>
            </div>



            <?php if (is_active_sidebar('home-sidebar-widgets') && $frontpage_layout != 'full-width-content') : ?>

                <?php
                $sticky_sidebar_class = '';
                $sticky_sidebar = morenews_get_option('frontpage_sticky_sidebar');
                if ($sticky_sidebar) {
                    $sticky_sidebar_class = morenews_get_option('frontpage_sticky_sidebar_position');
                }
                ?>


                <div id="secondary" class="sidebar-area <?php echo esc_attr($sticky_sidebar_class); ?>">
                    <aside class="widget-area color-pad">
                        <?php dynamic_sidebar('home-sidebar-widgets'); ?>
                    </aside>
                </div>
            <?php endif; ?>
        </section>

<?php
    }
endif;
add_action('morenews_front_page_section', 'morenews_front_page_widgets_section', 50);