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

/wp-content/themes/catch-box/content-single.php

https://github.com/ActivateNY/activateny.org
PHP | 85 lines | 67 code | 9 blank | 9 comment | 11 complexity | fe79b6615093094b91cc124af576ae5e MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * The template for displaying content in the single.php template
  4. *
  5. * @package Catch Themes
  6. * @subpackage Catch_Box
  7. * @since Catch Box 1.0
  8. */
  9. ?>
  10. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  11. <header class="entry-header">
  12. <h1 class="entry-title"><?php the_title(); ?></h1>
  13. <?php if ( 'post' == get_post_type() ) : ?>
  14. <div class="entry-meta">
  15. <?php catchbox_posted_on(); ?>
  16. <?php if ( comments_open() && ! post_password_required() ) : ?>
  17. <span class="sep"> &mdash; </span>
  18. <span class="comments-link">
  19. <?php comments_popup_link(__('No Comments &darr;', 'catchbox'), __('1 Comment &darr;', 'catchbox'), __('% Comments &darr;', 'catchbox')); ?>
  20. </span>
  21. <?php endif; ?>
  22. </div><!-- .entry-meta -->
  23. <?php endif; ?>
  24. </header><!-- .entry-header -->
  25. <div class="entry-content">
  26. <?php the_content(); ?>
  27. <?php wp_link_pages( array(
  28. 'before' => '<div class="page-link"><span class="pages">' . __( 'Pages:', 'catchbox' ) . '</span>',
  29. 'after' => '</div>',
  30. 'link_before' => '<span>',
  31. 'link_after' => '</span>',
  32. ) );
  33. ?>
  34. </div><!-- .entry-content -->
  35. <footer class="entry-meta">
  36. <?php
  37. /* translators: used between list items, there is a space after the comma */
  38. $categories_list = get_the_category_list( __( ', ', 'catchbox' ) );
  39. /* translators: used between list items, there is a space after the comma */
  40. $tag_list = get_the_tag_list( '', __( ', ', 'catchbox' ) );
  41. if ( '' != $tag_list ) {
  42. $utility_text = __( 'This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'catchbox' );
  43. } elseif ( '' != $categories_list ) {
  44. $utility_text = __( 'This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'catchbox' );
  45. } else {
  46. $utility_text = __( 'This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'catchbox' );
  47. }
  48. printf(
  49. $utility_text,
  50. $categories_list,
  51. $tag_list,
  52. esc_url( get_permalink() ),
  53. the_title_attribute( 'echo=0' ),
  54. get_the_author(),
  55. esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
  56. );
  57. ?>
  58. <?php edit_post_link( __( 'Edit', 'catchbox' ), '<span class="edit-link">', '</span>' ); ?>
  59. </footer><!-- .entry-meta -->
  60. </article><!-- #post-<?php the_ID(); ?> -->
  61. <?php if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries ?>
  62. <div id="author-info">
  63. <div id="author-avatar">
  64. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'catchbox_author_bio_avatar_size', 68 ) ); ?>
  65. </div><!-- #author-avatar -->
  66. <div id="author-description">
  67. <h2><?php printf( __( 'About %s', 'catchbox' ), get_the_author() ); ?></h2>
  68. <?php the_author_meta( 'description' ); ?>
  69. <div id="author-link">
  70. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  71. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'catchbox' ), get_the_author() ); ?>
  72. </a>
  73. </div><!-- #author-link -->
  74. </div><!-- #author-description -->
  75. </div><!-- #entry-author-info -->
  76. <?php endif; ?>