[ Index ]

WordPress Cross Reference

title

Body

[close]

/wp-content/themes/twentythirteen/ -> comments.php (source)

   1  <?php
   2  /**
   3   * The template for displaying Comments
   4   *
   5   * The area of the page that contains comments and the comment form.
   6   *
   7   * @package WordPress
   8   * @subpackage Twenty_Thirteen
   9   * @since Twenty Thirteen 1.0
  10   */
  11  
  12  /*
  13   * If the current post is protected by a password and the visitor has not yet
  14   * entered the password we will return early without loading the comments.
  15   */
  16  if ( post_password_required() )
  17      return;
  18  ?>
  19  
  20  <div id="comments" class="comments-area">
  21  
  22      <?php if ( have_comments() ) : ?>
  23          <h2 class="comments-title">
  24              <?php
  25                  printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'twentythirteen' ),
  26                      number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
  27              ?>
  28          </h2>
  29  
  30          <ol class="comment-list">
  31              <?php
  32                  wp_list_comments( array(
  33                      'style'       => 'ol',
  34                      'short_ping'  => true,
  35                      'avatar_size' => 74,
  36                  ) );
  37              ?>
  38          </ol><!-- .comment-list -->
  39  
  40          <?php
  41              // Are there comments to navigate through?
  42              if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
  43          ?>
  44          <nav class="navigation comment-navigation" role="navigation">
  45              <h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1>
  46              <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentythirteen' ) ); ?></div>
  47              <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentythirteen' ) ); ?></div>
  48          </nav><!-- .comment-navigation -->
  49          <?php endif; // Check for comment navigation ?>
  50  
  51          <?php if ( ! comments_open() && get_comments_number() ) : ?>
  52          <p class="no-comments"><?php _e( 'Comments are closed.' , 'twentythirteen' ); ?></p>
  53          <?php endif; ?>
  54  
  55      <?php endif; // have_comments() ?>
  56  
  57      <?php comment_form(); ?>
  58  
  59  </div><!-- #comments -->


Generated: Tue Mar 25 01:41:18 2014 WordPress honlapkészítés: online1.hu