[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentytwelve/ -> content-single.php (source)

   1  <?php
   2  /**
   3   * The template for displaying content in the single.php template
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Twelve
   7   * @since Twenty Twelve 1.0
   8   */
   9  ?>
  10  
  11      <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  12          <header class="entry-header">
  13              <h1 class="entry-title"><?php the_title(); ?></h1>
  14  
  15              <?php if ( 'post' == get_post_type() ) : // Hide entry meta for pages ?>
  16              <div class="entry-meta">
  17                  <?php twentytwelve_posted_on(); ?>
  18              </div><!-- .entry-meta -->
  19              <?php endif; ?>
  20          </header><!-- .entry-header -->
  21  
  22          <div class="entry-content">
  23              <?php the_content(); ?>
  24              <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
  25          </div><!-- .entry-content -->
  26  
  27          <footer class="entry-meta">
  28              <?php
  29                  /* translators: used between list items, there is a space after the comma */
  30                  $categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );
  31  
  32                  /* translators: used between list items, there is a space after the comma */
  33                  $tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );
  34                  if ( '' != $tag_list ) {
  35                      $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>.', 'twentytwelve' );
  36                  } elseif ( '' != $categories_list ) {
  37                      $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>.', 'twentytwelve' );
  38                  } else {
  39                      $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>.', 'twentytwelve' );
  40                  }
  41  
  42                  printf(
  43                      $utility_text,
  44                      $categories_list,
  45                      $tag_list,
  46                      esc_url( get_permalink() ),
  47                      the_title_attribute( 'echo=0' ),
  48                      get_the_author(),
  49                      esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
  50                  );
  51              ?>
  52              <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
  53  
  54              <?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 ?>
  55              <div id="author-info">
  56                  <div id="author-avatar">
  57                      <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>
  58                  </div><!-- #author-avatar -->
  59                  <div id="author-description">
  60                      <h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
  61                      <?php the_author_meta( 'description' ); ?>
  62                      <div id="author-link">
  63                          <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  64                              <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentytwelve' ), get_the_author() ); ?>
  65                          </a>
  66                      </div><!-- #author-link    -->
  67                  </div><!-- #author-description -->
  68              </div><!-- #author-info -->
  69              <?php endif; ?>
  70          </footer><!-- .entry-meta -->
  71      </article><!-- #post -->


Generated: Tue Mar 20 03:55:56 2012 Hosted by follow the white rabbit.