post-nextprev.php 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * NEXT / PREVIOUS POSTS (精华版)
  4. */
  5. if (iro_opt('article_nextpre') == '1') {
  6. ?>
  7. <section class="post-squares nextprev">
  8. <?php
  9. $classify_display_id = iro_opt('classify_display');
  10. $load_svg_url = iro_opt('vision_resource_basepath', 'https://s.nmxc.ltd/sakurairo_vision/@2.7/') . 'load_svg/outload.svg';
  11. $prev_link_html = '<div class="background lazyload" style="background-image:url(' . $load_svg_url . ');" data-src="' . get_prev_thumbnail_url() . '"></div>' .
  12. '<span class="label">' .
  13. __("Previous Post", 'sakurairo') .
  14. '</span>' .
  15. '<div class="info">' .
  16. '<h3>%title</h3><hr>' .
  17. '</div>';
  18. $next_link_html = '<div class="background lazyload" style="background-image:url(' . $load_svg_url . ');" data-src="' . get_next_thumbnail_url() . '"></div>' .
  19. '<span class="label">' .
  20. __("Next Post", 'sakurairo') .
  21. '</span>' .
  22. '<div class="info">' .
  23. '<h3>%title</h3><hr>' .
  24. '</div>';
  25. previous_post_link('%link', $prev_link_html, false, $classify_display_id);
  26. next_post_link('%link', $next_link_html, false, $classify_display_id) ?>
  27. </section>
  28. <?php } ?>