1
- <?php
2
- /**
3
- * The template for displaying Comments.
4
- * The area of the page that contains both current comments
5
- * and the comment form.
6
- * If the current post is protected by a password and
7
- * the visitor has not yet entered the password we will
8
- * return early without loading the comments.
9
- */
10
- if ( post_password_required () ) {
11
- return ;
12
- }
13
- ?>
14
-
15
- <div id="comments" class="comments-area">
16
-
17
- <?php if ( have_comments () ) : ?>
18
-
19
- <h2 class="comments-title">
20
-
21
- <?php
22
- $ comments_number = get_comments_number ();
23
- if ( 1 === $ comments_number ) {
24
- /* translators: %s: post title */
25
- printf ( _x ( 'One thought on “%s” ' , 'comments title ' , 'zerif-lite ' ), get_the_title () );
26
- } else {
27
- printf (
28
- /* translators: 1: number of comments, 2: post title */
29
- _nx (
30
- '%1$s thought on “%2$s” ' ,
31
- '%1$s thoughts on “%2$s” ' ,
32
- $ comments_number ,
33
- 'comments title ' ,
34
- 'zerif-lite '
35
- ),
36
- number_format_i18n ( $ comments_number ),
37
- '<span> ' . get_the_title () . '</span> '
38
- );
39
- }
40
- ?>
41
-
42
- </h2>
43
-
44
- <?php if ( get_comment_pages_count () > 1 && get_option ( 'page_comments ' ) ) : // are there comments to navigate through ?>
45
-
46
- <nav id="comment-nav-above" class="comment-navigation">
47
-
48
- <h2 class="screen-reader-text"><?php _e ( 'Comment navigation ' , 'zerif-lite ' ); ?> </h2>
49
-
50
- <div class="nav-previous"><?php previous_comments_link ( __ ( '← Older Comments ' , 'zerif-lite ' ) ); ?> </div>
51
-
52
- <div class="nav-next"><?php next_comments_link ( __ ( 'Newer Comments → ' , 'zerif-lite ' ) ); ?> </div>
53
-
54
- </nav><!-- #comment-nav-above -->
55
-
56
- <?php endif ; // check for comment navigation ?>
57
-
58
- <ul class="comment-list">
59
-
60
- <?php
61
-
62
- wp_list_comments ( array (
63
- 'style ' => 'ul ' ,
64
- 'short_ping ' => true ,
65
- ) );
66
-
67
- ?>
68
-
69
- </ul><!-- .comment-list -->
70
-
71
- <?php if ( get_comment_pages_count () > 1 && get_option ( 'page_comments ' ) ) : // are there comments to navigate through ?>
72
-
73
- <nav id="comment-nav-below" class="comment-navigation">
74
-
75
- <h2 class="screen-reader-text"><?php _e ( 'Comment navigation ' , 'zerif-lite ' ); ?> </h2>
76
-
77
- <div class="nav-previous"><?php previous_comments_link ( __ ( '← Older Comments ' , 'zerif-lite ' ) ); ?> </div>
78
-
79
- <div class="nav-next"><?php next_comments_link ( __ ( 'Newer Comments → ' , 'zerif-lite ' ) ); ?> </div>
80
-
81
- </nav><!-- #comment-nav-below -->
82
-
83
- <?php endif ; // check for comment navigation ?>
84
-
85
- <?php endif ; // have_comments() ?>
86
-
87
- <?php
88
-
89
- // If comments are closed and there are comments, let's leave a little note, shall we?
90
- if ( ! comments_open () && '0 ' != get_comments_number () && post_type_supports ( get_post_type (), 'comments ' ) ) :
91
- ?>
92
- <p class="no-comments"><?php _e ( 'Comments are closed. ' , 'zerif-lite ' ); ?> </p>
93
-
94
- <?php endif ; ?>
95
-
96
- <?php comment_form (array ('comment_notes_after ' => '' )); ?>
97
-
1
+ <?php
2
+ /**
3
+ * The template for displaying Comments.
4
+ * The area of the page that contains both current comments
5
+ * and the comment form.
6
+ * If the current post is protected by a password and
7
+ * the visitor has not yet entered the password we will
8
+ * return early without loading the comments.
9
+ */
10
+ if ( post_password_required () ) {
11
+ return ;
12
+ }
13
+ ?>
14
+
15
+ <div id="comments" class="comments-area">
16
+
17
+ <?php if ( have_comments () ) : ?>
18
+
19
+ <h2 class="comments-title">
20
+
21
+ <?php
22
+ $ comments_number = get_comments_number ();
23
+ if ( 1 === $ comments_number ) {
24
+ /* translators: %s: post title */
25
+ printf ( _x ( 'One thought on “%s” ' , 'comments title ' , 'zerif-lite ' ), get_the_title () );
26
+ } else {
27
+ printf (
28
+ /* translators: 1: number of comments, 2: post title */
29
+ _nx (
30
+ '%1$s thought on “%2$s” ' ,
31
+ '%1$s thoughts on “%2$s” ' ,
32
+ $ comments_number ,
33
+ 'comments title ' ,
34
+ 'zerif-lite '
35
+ ),
36
+ number_format_i18n ( $ comments_number ),
37
+ '<span> ' . get_the_title () . '</span> '
38
+ );
39
+ }
40
+ ?>
41
+
42
+ </h2>
43
+
44
+ <?php if ( get_comment_pages_count () > 1 && get_option ( 'page_comments ' ) ) : // are there comments to navigate through ?>
45
+
46
+ <nav id="comment-nav-above" class="comment-navigation">
47
+
48
+ <h2 class="screen-reader-text"><?php _e ( 'Comment navigation ' , 'zerif-lite ' ); ?> </h2>
49
+
50
+ <div class="nav-previous"><?php previous_comments_link ( __ ( '← Older Comments ' , 'zerif-lite ' ) ); ?> </div>
51
+
52
+ <div class="nav-next"><?php next_comments_link ( __ ( 'Newer Comments → ' , 'zerif-lite ' ) ); ?> </div>
53
+
54
+ </nav><!-- #comment-nav-above -->
55
+
56
+ <?php endif ; // check for comment navigation ?>
57
+
58
+ <ul class="comment-list">
59
+
60
+ <?php
61
+
62
+ wp_list_comments ( array (
63
+ 'style ' => 'ul ' ,
64
+ 'short_ping ' => true ,
65
+ ) );
66
+
67
+ ?>
68
+
69
+ </ul><!-- .comment-list -->
70
+
71
+ <?php if ( get_comment_pages_count () > 1 && get_option ( 'page_comments ' ) ) : // are there comments to navigate through ?>
72
+
73
+ <nav id="comment-nav-below" class="comment-navigation">
74
+
75
+ <h2 class="screen-reader-text"><?php _e ( 'Comment navigation ' , 'zerif-lite ' ); ?> </h2>
76
+
77
+ <div class="nav-previous"><?php previous_comments_link ( __ ( '← Older Comments ' , 'zerif-lite ' ) ); ?> </div>
78
+
79
+ <div class="nav-next"><?php next_comments_link ( __ ( 'Newer Comments → ' , 'zerif-lite ' ) ); ?> </div>
80
+
81
+ </nav><!-- #comment-nav-below -->
82
+
83
+ <?php endif ; // check for comment navigation ?>
84
+
85
+ <?php endif ; // have_comments() ?>
86
+
87
+ <?php
88
+
89
+ // If comments are closed and there are comments, let's leave a little note, shall we?
90
+ if ( ! comments_open () && '0 ' != get_comments_number () && post_type_supports ( get_post_type (), 'comments ' ) ) :
91
+ ?>
92
+ <p class="no-comments"><?php _e ( 'Comments are closed. ' , 'zerif-lite ' ); ?> </p>
93
+
94
+ <?php endif ; ?>
95
+
96
+ <?php comment_form (array ('comment_notes_after ' => '' )); ?>
97
+
98
98
</div><!-- #comments -->
0 commit comments