PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/themes/jquery/content-single.php

https://github.com/mikesherov/web-base-template
PHP | 67 lines | 55 code | 7 blank | 5 comment | 8 complexity | d9a523fd27ec8a90da992ca5ae9d05f1 MD5 | raw file
Possible License(s): AGPL-1.0
  1. <?php
  2. /**
  3. * The template for displaying content in the single.php template
  4. */
  5. ?>
  6. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  7. <header class="entry-header">
  8. <h1 class="entry-title"><?php the_title(); ?></h1>
  9. <?php if ( 'post' == get_post_type() ) : ?>
  10. <div class="entry-meta">
  11. <?php twentyeleven_posted_on(); ?>
  12. </div><!-- .entry-meta -->
  13. <?php endif; ?>
  14. </header><!-- .entry-header -->
  15. <div class="entry-content">
  16. <?php the_content(); ?>
  17. <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
  18. </div><!-- .entry-content -->
  19. <footer class="entry-meta">
  20. <?php
  21. /* translators: used between list items, there is a space after the comma */
  22. $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
  23. /* translators: used between list items, there is a space after the comma */
  24. $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
  25. if ( '' != $tag_list ) {
  26. $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>.', 'twentyeleven' );
  27. } elseif ( '' != $categories_list ) {
  28. $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>.', 'twentyeleven' );
  29. } else {
  30. $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>.', 'twentyeleven' );
  31. }
  32. printf(
  33. $utility_text,
  34. $categories_list,
  35. $tag_list,
  36. esc_url( get_permalink() ),
  37. the_title_attribute( 'echo=0' ),
  38. get_the_author(),
  39. esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
  40. );
  41. ?>
  42. <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
  43. <?php if ( 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 ?>
  44. <div id="author-info">
  45. <div id="author-avatar">
  46. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); ?>
  47. </div><!-- #author-avatar -->
  48. <div id="author-description">
  49. <h2><?php printf( esc_attr__( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
  50. <?php the_author_meta( 'description' ); ?>
  51. <div id="author-link">
  52. <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  53. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() ); ?>
  54. </a>
  55. </div><!-- #author-link -->
  56. </div><!-- #author-description -->
  57. </div><!-- #entry-author-info -->
  58. <?php endif; ?>
  59. </footer><!-- .entry-meta -->
  60. </article><!-- #post-<?php the_ID(); ?> -->