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/loop/block-loop-grid.php
<?php
if (!function_exists('morenews_loop_grid')) :
  /**
   * Banner Slider
   *
   * @since Newsical 1.0.0
   *
   */
  function morenews_loop_grid($morenews_post_id, $morenews_grid_design = 'grid-design-default', $morenews_thumbnail_size = 'medium_large', $morenews_show_excerpt = false, $archive_content_view = 'archive-content-excerpt', $morenews_title_position = 'bottom', $archive_title_tag = 'h3')
  {
    $morenews_post_display = 'spotlight-post';
    if ($morenews_thumbnail_size == 'medium') {
      $morenews_post_display = 'grid-post';
    }

    // Get the post thumbnail and check if it exists
    $morenews_post_thumbnail = morenews_the_post_thumbnail($morenews_thumbnail_size, $morenews_post_id, true);
    $morenews_no_thumbnail_class = "has-post-image";
    if (!isset($morenews_post_thumbnail) || empty($morenews_post_thumbnail)) {
      $morenews_no_thumbnail_class = "no-post-image";
    }
?>

    <div class="pos-rel read-single color-pad clearfix af-cat-widget-carousel <?php echo esc_attr($morenews_grid_design); ?> <?php echo esc_attr($morenews_no_thumbnail_class); ?>">
      <?php if ($morenews_title_position == 'top'): ?>
        <div class="read-title">
          <h3>
            <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
          </h3>
        </div>
        <div class="post-item-metadata entry-meta author-links">
          <?php morenews_post_item_meta($morenews_post_display); ?>
          <?php morenews_get_comments_views_share($morenews_post_id); ?>
        </div>
      <?php endif; ?>

      <div class="read-img pos-rel read-bg-img">
        <a class="aft-post-image-link" aria-label="<?php echo esc_attr(get_the_title($morenews_post_id, 'morenews')); ?>" href="<?php the_permalink(); ?>"></a>
        <?php
        if ($morenews_post_thumbnail) {
          echo wp_kses_post($morenews_post_thumbnail);
        }
        ?>
        <div class="post-format-and-min-read-wrap">
          <?php morenews_post_format($morenews_post_id); ?>
          <?php //morenews_count_content_words($morenews_post_id); ?>
        </div>

        <?php if ($morenews_grid_design == 'grid-design-default'): ?>
          <div class="category-min-read-wrap">
            <div class="read-categories categories-inside-image">
              <?php morenews_post_categories(); ?>
            </div>
          </div>
        <?php endif; ?>

      </div>

      <div class="pad read-details color-tp-pad">
        <?php if ($morenews_grid_design == 'grid-design-texts-over-image'): ?>
          <div class="read-categories categories-inside-image">
            <?php morenews_post_categories(); ?>
          </div>
        <?php endif; ?>

        <?php if ($morenews_title_position == 'bottom'): ?>
          <div class="read-title">
            <h3>
              <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
            </h3>
          </div>
          <div class="post-item-metadata entry-meta author-links">
            <?php morenews_post_item_meta($morenews_post_display); ?>
            <?php morenews_get_comments_views_share($morenews_post_id); ?>
          </div>
        <?php endif; ?>

        <?php if ($morenews_show_excerpt == true): ?>
          <div class="post-description">
            <?php
            if ($archive_content_view == 'archive-content-full') {
              the_content();
            } else {
              echo wp_kses_post(morenews_get_the_excerpt($morenews_post_id));
            }
            ?>
          </div>
        <?php endif; ?>
      </div>
    </div>

<?php
  }
endif;
add_action('morenews_action_loop_grid', 'morenews_loop_grid', 10, 8);