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


Generated : Wed Oct 28 08:20:01 2020 Cross-referenced by PHPXref