[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentyeleven/ -> 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_Eleven
   7   * @since Twenty Eleven 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() ) : ?>
  16          <div class="entry-meta">
  17              <?php twentyeleven_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
  25          wp_link_pages(
  26              array(
  27                  'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>',
  28                  'after'  => '</div>',
  29              )
  30          );
  31          ?>
  32      </div><!-- .entry-content -->
  33  
  34      <footer class="entry-meta">
  35          <?php
  36          $categories_list = get_the_category_list( wp_get_list_item_separator() );
  37  
  38          $tags_list = get_the_tag_list( '', wp_get_list_item_separator() );
  39  
  40          if ( $tags_list && ! is_wp_error( $tags_list ) ) {
  41              /* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */
  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>.', 'twentyeleven' );
  43          } elseif ( $categories_list ) {
  44              /* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */
  45              $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' );
  46          } else {
  47              /* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */
  48              $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' );
  49          }
  50  
  51          printf(
  52              $utility_text,
  53              $categories_list,
  54              $tags_list,
  55              esc_url( get_permalink() ),
  56              the_title_attribute( 'echo=0' ),
  57              get_the_author(),
  58              esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
  59          );
  60          ?>
  61  
  62          <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
  63  
  64          <?php
  65          // If a user has filled out their description and this is a multi-author blog, show a bio on their entries.
  66          if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) :
  67              ?>
  68          <div id="author-info">
  69              <div id="author-avatar">
  70                  <?php
  71                  /** This filter is documented in author.php */
  72                  $author_bio_avatar_size = apply_filters( 'twentyeleven_author_bio_avatar_size', 68 );
  73                  echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
  74                  ?>
  75              </div><!-- #author-avatar -->
  76              <div id="author-description">
  77                  <h2>
  78                  <?php
  79                  /* translators: %s: Author name. */
  80                  printf( __( 'About %s', 'twentyeleven' ), get_the_author() );
  81                  ?>
  82                  </h2>
  83                  <?php the_author_meta( 'description' ); ?>
  84                  <div id="author-link">
  85                      <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  86                          <?php
  87                          /* translators: %s: Author name. */
  88                          printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() );
  89                          ?>
  90                      </a>
  91                  </div><!-- #author-link    -->
  92              </div><!-- #author-description -->
  93          </div><!-- #author-info -->
  94          <?php endif; ?>
  95      </footer><!-- .entry-meta -->
  96  </article><!-- #post-<?php the_ID(); ?> -->


Generated : Thu Nov 21 08:20:01 2024 Cross-referenced by PHPXref