11 |
11 |
12 /* |
12 /* |
13 * If the current post is protected by a password and the visitor has not yet |
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. |
14 * entered the password we will return early without loading the comments. |
15 */ |
15 */ |
16 if ( post_password_required() ) |
16 if ( post_password_required() ) { |
17 return; |
17 return; |
|
18 } |
18 ?> |
19 ?> |
19 |
20 |
20 <div id="comments" class="comments-area"> |
21 <div id="comments" class="comments-area"> |
21 |
22 |
22 <?php if ( have_comments() ) : ?> |
23 <?php if ( have_comments() ) : ?> |
23 <h2 class="comments-title"> |
24 <h2 class="comments-title"> |
24 <?php |
25 <?php |
25 printf( _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'twentythirteen' ), |
26 printf( |
26 number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); |
27 _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'twentythirteen' ), |
|
28 number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' |
|
29 ); |
27 ?> |
30 ?> |
28 </h2> |
31 </h2> |
29 |
32 |
30 <ol class="comment-list"> |
33 <ol class="comment-list"> |
31 <?php |
34 <?php |
32 wp_list_comments( array( |
35 wp_list_comments( |
33 'style' => 'ol', |
36 array( |
34 'short_ping' => true, |
37 'style' => 'ol', |
35 'avatar_size' => 74, |
38 'short_ping' => true, |
36 ) ); |
39 'avatar_size' => 74, |
|
40 ) |
|
41 ); |
37 ?> |
42 ?> |
38 </ol><!-- .comment-list --> |
43 </ol><!-- .comment-list --> |
39 |
44 |
40 <?php |
45 <?php |
41 // Are there comments to navigate through? |
46 // Are there comments to navigate through? |
42 if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : |
47 if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : |
43 ?> |
48 ?> |
44 <nav class="navigation comment-navigation" role="navigation"> |
49 <nav class="navigation comment-navigation" role="navigation"> |
45 <h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1> |
50 <h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1> |
46 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentythirteen' ) ); ?></div> |
51 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentythirteen' ) ); ?></div> |
47 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentythirteen' ) ); ?></div> |
52 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentythirteen' ) ); ?></div> |
48 </nav><!-- .comment-navigation --> |
53 </nav><!-- .comment-navigation --> |
49 <?php endif; // Check for comment navigation ?> |
54 <?php endif; // Check for comment navigation ?> |
50 |
55 |
51 <?php if ( ! comments_open() && get_comments_number() ) : ?> |
56 <?php if ( ! comments_open() && get_comments_number() ) : ?> |
52 <p class="no-comments"><?php _e( 'Comments are closed.' , 'twentythirteen' ); ?></p> |
57 <p class="no-comments"><?php _e( 'Comments are closed.', 'twentythirteen' ); ?></p> |
53 <?php endif; ?> |
58 <?php endif; ?> |
54 |
59 |
55 <?php endif; // have_comments() ?> |
60 <?php endif; // have_comments() ?> |
56 |
61 |
57 <?php comment_form(); ?> |
62 <?php comment_form(); ?> |