[ 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 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 ?>
  65          <div id="author-info">
  66              <div id="author-avatar">
  67                  <?php
  68                  /** This filter is documented in author.php */
  69                  $author_bio_avatar_size = apply_filters( 'twentyeleven_author_bio_avatar_size', 68 );
  70                  echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
  71                  ?>
  72              </div><!-- #author-avatar -->
  73              <div id="author-description">
  74                  <h2>
  75                  <?php
  76                  /* translators: %s: Author name. */
  77                  printf( __( 'About %s', 'twentyeleven' ), get_the_author() );
  78                  ?>
  79                  </h2>
  80                  <?php the_author_meta( 'description' ); ?>
  81                  <div id="author-link">
  82                      <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
  83                          <?php
  84                          /* translators: %s: Author name. */
  85                          printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyeleven' ), get_the_author() );
  86                          ?>
  87                      </a>
  88                  </div><!-- #author-link    -->
  89              </div><!-- #author-description -->
  90          </div><!-- #author-info -->
  91          <?php endif; ?>
  92      </footer><!-- .entry-meta -->
  93  </article><!-- #post-<?php the_ID(); ?> -->


Generated: Sun Sep 15 01:00:03 2019 Cross-referenced by PHPXref 0.7.1