1
0

single-image.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * Template part for displaying posts.
  4. *
  5. * @link https://codex.wordpress.org/Template_Hierarchy
  6. *
  7. * @package Akina
  8. */
  9. ?>
  10. <?php
  11. if (iro_opt('author_profile_quote') == '1') {
  12. $author_description = get_the_author_meta( 'description' ) ? get_the_author_meta( 'description' ) :iro_opt('author_profile_quote_text', 'Carpe Diem and Do what I like');
  13. ?>
  14. <?php } ?>
  15. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  16. <?php if(should_show_title()) { ?>
  17. <div class="Extendfull">
  18. <?php the_post_thumbnail('full'); ?>
  19. <header class="entry-header">
  20. <h1 class="entry-title"><?php the_title(); ?></h1>
  21. <p class="entry-census"><?php echo poi_time_since(strtotime($post->post_date)); ?>&nbsp;&nbsp;<?php echo get_post_views(get_the_ID()).' '._n('View','Views',get_post_views(get_the_ID()),'sakurairo')/*次阅读*/?></p>
  22. <hr>
  23. </header>
  24. </div>
  25. <?php } ?>
  26. <!-- .entry-header -->
  27. <div class="entry-content">
  28. <?php the_content( '', true ); ?>
  29. <?php
  30. wp_link_pages( array(
  31. 'before' => '<div class="page-links">' . __( 'Pages:', 'ondemand' ),
  32. 'after' => '</div>',
  33. ) );
  34. ?>
  35. </div><!-- .entry-content -->
  36. <footer class="post-footer">
  37. <div class="post-lincenses">
  38. <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank" rel="nofollow">
  39. <i class="fa-brands fa-creative-commons"></i>
  40. </a>
  41. </div>
  42. <?php the_reward(); ?>
  43. <section class="author-profile">
  44. <?php
  45. $author_id = get_the_author_meta('ID');
  46. $author_url = esc_url(get_author_posts_url($author_id));
  47. $author_name = get_the_author();
  48. ?>
  49. <div class="info" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
  50. <a href="<?= $author_url; ?>" class="profile gravatar">
  51. <img class="fa-spin" style="--fa-animation-duration: 15s;" src="<?php echo get_avatar_profile_url(); ?>" itemprop="image" alt="<?= $author_name; ?>" height="30" width="30">
  52. </a>
  53. </div>
  54. <div class="meta">
  55. <a href="<?= $author_url; ?>" itemprop="url" rel="author"><?= $author_name; ?></a>
  56. </div>
  57. <?php if($author_description){?>
  58. <div class="desc">
  59. <i class="fa-solid fa-feather" aria-hidden="true"></i><?= $author_description ?>
  60. </div>
  61. <?php } ?>
  62. </section>
  63. <div class="post-modified-time">
  64. <i class="fa-solid fa-calendar-day" aria-hidden="true"></i><?php _e('Last updated on ', 'sakurairo'); echo get_the_modified_time('Y-m-d'); ?>
  65. </div>
  66. <div class="post-tags">
  67. <?php if ( has_tag() ) {
  68. echo '<i class="fa-solid fa-tag" aria-hidden="true"></i> ';
  69. the_tags('', ' ', ' ');
  70. } else {
  71. echo '<i class="fa-solid fa-tag" aria-hidden="true"></i> ';
  72. _e('Nothing~', 'sakurairo');
  73. } ?>
  74. </div>
  75. </footer><!-- .entry-footer -->
  76. </article><!-- #post-## -->