[ Index ]

PHP Cross Reference of WordPress

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              $tag_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
  41          if ( '' != $tag_list ) {
  42              /* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */
  43              $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' );
  44          } elseif ( '' != $categories_list ) {
  45              /* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */
  46              $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' );
  47          } else {
  48              /* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */
  49              $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' );
  50          }
  51  
  52              printf(
  53                  $utility_text,
  54                  $categories_list,
  55                  $tag_list,
  56                  esc_url( get_permalink() ),
  57                  the_title_attribute( 'echo=0' ),
  58                  get_the_author(),
  59                  esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
  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: Mon Feb 17 01:00:03 2020 Cross-referenced by PHPXref 0.7.1