1 | <?php |
||||||||
2 | /** |
||||||||
3 | * The template for displaying comments |
||||||||
4 | * |
||||||||
5 | * This is the template that displays the area of the page that contains both the current comments |
||||||||
6 | * and the comment form. |
||||||||
7 | * |
||||||||
8 | * @link https://codex.wordpress.org/Template_Hierarchy |
||||||||
9 | * |
||||||||
10 | * @package WordPress |
||||||||
11 | * @subpackage Twenty_Seventeen |
||||||||
12 | * @since 1.0 |
||||||||
13 | * @version 1.0 |
||||||||
14 | */ |
||||||||
15 | |||||||||
16 | /* |
||||||||
17 | * If the current post is protected by a password and |
||||||||
18 | * the visitor has not yet entered the password we will |
||||||||
19 | * return early without loading the comments. |
||||||||
20 | */ |
||||||||
21 | if ( post_password_required() ) { |
||||||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||||||
22 | return; |
||||||||
23 | } |
||||||||
24 | ?> |
||||||||
25 | |||||||||
26 | <div id="comments" class="comments-area"> |
||||||||
27 | |||||||||
28 | <?php |
||||||||
29 | // You can start editing here -- including this comment! |
||||||||
30 | if ( have_comments() ) : ?> |
||||||||
0 ignored issues
–
show
The function
have_comments was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
31 | <h2 class="comments-title"> |
||||||||
32 | <?php |
||||||||
33 | $comments_number = get_comments_number(); |
||||||||
0 ignored issues
–
show
The function
get_comments_number was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
34 | if ( '1' === $comments_number ) { |
||||||||
35 | /* translators: %s: post title */ |
||||||||
36 | printf( esc_html_x( 'One Reply to “%s”', 'comments title', 'strip' ), get_the_title() ); |
||||||||
0 ignored issues
–
show
The function
get_the_title was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() The function
esc_html_x was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
37 | } else { |
||||||||
38 | printf( |
||||||||
39 | esc_attr( |
||||||||
0 ignored issues
–
show
The function
esc_attr was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
40 | /* translators: 1: number of comments, 2: post title */ |
||||||||
41 | _nx( |
||||||||
0 ignored issues
–
show
The function
_nx was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
42 | '%1$s Reply to “%2$s”', |
||||||||
43 | '%1$s Replies to “%2$s”', |
||||||||
44 | $comments_number, |
||||||||
45 | 'comments title', |
||||||||
46 | 'strip' |
||||||||
47 | ) |
||||||||
48 | ), |
||||||||
49 | number_format_i18n( $comments_number ), |
||||||||
0 ignored issues
–
show
The function
number_format_i18n was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
50 | get_the_title() |
||||||||
51 | ); |
||||||||
52 | } |
||||||||
53 | ?> |
||||||||
54 | </h2> |
||||||||
55 | |||||||||
56 | <ol class="comment-list"> |
||||||||
57 | <?php |
||||||||
58 | wp_list_comments( array( |
||||||||
0 ignored issues
–
show
The function
wp_list_comments was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
59 | 'avatar_size' => 96, |
||||||||
60 | 'style' => 'ol', |
||||||||
61 | 'short_ping' => true, |
||||||||
62 | 'reply_text' => __( 'Reply', 'strip' ), |
||||||||
0 ignored issues
–
show
The function
__ was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
63 | ) ); |
||||||||
64 | ?> |
||||||||
65 | </ol> |
||||||||
66 | |||||||||
67 | <?php the_comments_pagination( array( |
||||||||
0 ignored issues
–
show
The function
the_comments_pagination was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
68 | 'prev_text' => '<span class="screen-reader-text">' . __( 'Previous', 'strip' ) . '</span>', |
||||||||
69 | 'next_text' => '<span class="screen-reader-text">' . __( 'Next', 'strip' ) . '</span>', |
||||||||
0 ignored issues
–
show
|
|||||||||
70 | ) ); |
||||||||
71 | |||||||||
72 | endif; // Check for have_comments(). |
||||||||
73 | |||||||||
74 | // If comments are closed and there are comments, let's leave a little note, shall we? |
||||||||
75 | if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?> |
||||||||
0 ignored issues
–
show
The function
get_post_type was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() The function
post_type_supports was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() The function
comments_open was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
76 | |||||||||
77 | <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'strip' ); ?></p> |
||||||||
0 ignored issues
–
show
The function
esc_html_e was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
78 | <?php |
||||||||
79 | endif; |
||||||||
80 | |||||||||
81 | comment_form(); |
||||||||
0 ignored issues
–
show
The function
comment_form was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||||
82 | ?> |
||||||||
83 | |||||||||
84 | </div><!-- #comments --> |
||||||||
85 |