PageRenderTime 56ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/msw/dev/wp-content/themes/twentyten/single.php

https://github.com/chrissiebrodigan/USC
PHP | 87 lines | 65 code | 15 blank | 7 comment | 6 complexity | d73b7e8489191848cabc0ab989207ca3 MD5 | raw file
  1. <?php
  2. /**
  3. * The Template used to display all single posts
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty Ten
  7. * @since 3.0.0
  8. */
  9. ?>
  10. <?php get_header(); ?>
  11. <div id="container">
  12. <div id="content">
  13. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  14. <div id="nav-above" class="navigation">
  15. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
  16. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
  17. </div><!-- #nav-above -->
  18. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  19. <h1 class="entry-title"><?php the_title(); ?></h1>
  20. <div class="entry-meta">
  21. <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
  22. <a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
  23. <span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?></span>
  24. <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
  25. </div><!-- .entry-meta -->
  26. <div class="entry-content">
  27. <?php the_content(); ?>
  28. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
  29. </div><!-- .entry-content -->
  30. <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
  31. <div id="entry-author-info">
  32. <div id="author-avatar">
  33. <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
  34. </div><!-- #author-avatar -->
  35. <div id="author-description">
  36. <h2><?php _e( 'About ', 'twentyten' ); ?><?php the_author(); ?></h2>
  37. <?php the_author_meta( 'description' ); ?>
  38. <div id="author-link">
  39. <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php _e( 'View all posts by ', 'twentyten' ); ?><?php the_author(); ?> &rarr;</a>
  40. </div><!-- #author-link -->
  41. </div><!-- #author-description -->
  42. </div><!-- .entry-author-info -->
  43. <?php endif; ?>
  44. <div class="entry-utility">
  45. <?php
  46. $tag_list = get_the_tag_list('', ', ');
  47. if ( '' != $tag_list ) {
  48. $utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
  49. } else {
  50. $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
  51. }
  52. printf(
  53. $utility_text,
  54. get_the_category_list( ', ' ),
  55. $tag_list,
  56. get_permalink(),
  57. the_title_attribute( 'echo=0' )
  58. );
  59. ?>
  60. <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
  61. </div><!-- .entry-utility -->
  62. </div><!-- #post-<?php the_ID(); ?> -->
  63. <div id="nav-below" class="navigation">
  64. <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
  65. <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
  66. </div><!-- #nav-below -->
  67. <?php comments_template( '', true ); ?>
  68. <?php endwhile; // end of the loop. ?>
  69. </div><!-- #content -->
  70. </div><!-- #container -->
  71. <?php get_sidebar(); ?>
  72. <?php get_footer(); ?>