PageRenderTime 27ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/entry-meta.php

https://github.com/tomtom10/required-foundation
PHP | 62 lines | 49 code | 2 blank | 11 comment | 10 complexity | e0e2c54be4de63c1e8e8c6285e7b2857 MD5 | raw file
  1. <?php
  2. /**
  3. * Entry meta in the footer of posts of all post formats
  4. *
  5. * Overwrite entry-meta.php in child theme or use entry-meta-{$post-format}.php
  6. * to overwrite this for specific content on each post format.
  7. *
  8. * @package required+ Foundation
  9. * @since required+ Foundation 0.6.0
  10. */
  11. ?>
  12. <!-- START: entry-meta.php -->
  13. <?php $show_sep = false; ?>
  14. <?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
  15. <?php
  16. /* translators: used between list items, there is a space after the comma */
  17. $categories_list = get_the_category_list( __( ', ', 'requiredfoundation' ) );
  18. if ( $categories_list ):
  19. ?>
  20. <span class="cat-links">
  21. <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'requiredfoundation' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
  22. $show_sep = true; ?>
  23. </span>
  24. <?php endif; // End if categories ?>
  25. <?php
  26. /* translators: used between list items, there is a space after the comma */
  27. $tags_list = get_the_tag_list( '', __( ', ', 'requiredfoundation' ) );
  28. if ( $tags_list ):
  29. if ( $show_sep ) : ?>
  30. <span class="sep"> | </span>
  31. <?php endif; // End if $show_sep ?>
  32. <span class="tag-links">
  33. <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'requiredfoundation' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
  34. $show_sep = true; ?>
  35. </span>
  36. <?php endif; // End if $tags_list ?>
  37. <?php endif; // End if 'post' == get_post_type() ?>
  38. <?php if ( comments_open() ) : ?>
  39. <?php if ( $show_sep ) : ?>
  40. <span class="sep"> | </span>
  41. <?php endif; // End if $show_sep ?>
  42. <span class="comments-link"><?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'requiredfoundation' ) . '</span>', __( '<b>1</b> Reply', 'requiredfoundation' ), __( '<b>%</b> Replies', 'requiredfoundation' ) ); ?></span>
  43. <?php endif; // End if comments_open() ?>
  44. <?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
  45. <div id="author-info">
  46. <div id="author-avatar">
  47. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'required_author_bio_avatar_size', 68 ) ); ?>
  48. </div><!-- #author-avatar -->
  49. <div id="author-description">
  50. <h2><?php printf( esc_attr__( 'About %s', 'requiredfoundation' ), get_the_author() ); ?></h2>
  51. <?php the_author_meta( 'description' ); ?>
  52. <div id="author-link">
  53. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  54. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'requiredfoundation' ), get_the_author() ); ?>
  55. </a>
  56. </div><!-- #author-link -->
  57. </div><!-- #author-description -->
  58. </div><!-- #entry-author-info -->
  59. <?php endif; ?>
  60. <!-- END: entry-meta.php -->