author | ymh <ymh.work@gmail.com> |
Mon, 14 Oct 2019 17:39:30 +0200 | |
changeset 7 | cf61fcea0001 |
parent 0 | d970ebf37754 |
child 10 | 372f2766ea20 |
permissions | -rw-r--r-- |
0 | 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 |
*/ |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
16 |
if ( post_password_required() ) { |
0 | 17 |
return; |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
18 |
} |
0 | 19 |
?> |
20 |
||
21 |
<div id="comments" class="comments-area"> |
|
22 |
||
23 |
<?php if ( have_comments() ) : ?> |
|
24 |
<h2 class="comments-title"> |
|
25 |
<?php |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
26 |
printf( |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
27 |
_nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'twentythirteen' ), |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
28 |
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
29 |
); |
0 | 30 |
?> |
31 |
</h2> |
|
32 |
||
33 |
<ol class="comment-list"> |
|
34 |
<?php |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
35 |
wp_list_comments( |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
36 |
array( |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
37 |
'style' => 'ol', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
38 |
'short_ping' => true, |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
39 |
'avatar_size' => 74, |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
40 |
) |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
41 |
); |
0 | 42 |
?> |
43 |
</ol><!-- .comment-list --> |
|
44 |
||
45 |
<?php |
|
46 |
// Are there comments to navigate through? |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
47 |
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : |
0 | 48 |
?> |
49 |
<nav class="navigation comment-navigation" role="navigation"> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
50 |
<h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
51 |
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentythirteen' ) ); ?></div> |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
52 |
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentythirteen' ) ); ?></div> |
0 | 53 |
</nav><!-- .comment-navigation --> |
54 |
<?php endif; // Check for comment navigation ?> |
|
55 |
||
56 |
<?php if ( ! comments_open() && get_comments_number() ) : ?> |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
57 |
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentythirteen' ); ?></p> |
0 | 58 |
<?php endif; ?> |
59 |
||
60 |
<?php endif; // have_comments() ?> |
|
61 |
||
62 |
<?php comment_form(); ?> |
|
63 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
0
diff
changeset
|
64 |
</div><!-- #comments --> |