Edit File by line
/home/barbar84/public_h.../wp-conte.../themes/twentytw...
File: comments.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* The template file for displaying the comments and comment form for the
[2] Fix | Delete
* Twenty Twenty theme.
[3] Fix | Delete
*
[4] Fix | Delete
* @package WordPress
[5] Fix | Delete
* @subpackage Twenty_Twenty
[6] Fix | Delete
* @since Twenty Twenty 1.0
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
/*
[10] Fix | Delete
* If the current post is protected by a password and
[11] Fix | Delete
* the visitor has not yet entered the password we will
[12] Fix | Delete
* return early without loading the comments.
[13] Fix | Delete
*/
[14] Fix | Delete
if ( post_password_required() ) {
[15] Fix | Delete
return;
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
if ( $comments ) {
[19] Fix | Delete
?>
[20] Fix | Delete
[21] Fix | Delete
<div class="comments" id="comments">
[22] Fix | Delete
[23] Fix | Delete
<?php
[24] Fix | Delete
$comments_number = absint( get_comments_number() );
[25] Fix | Delete
?>
[26] Fix | Delete
[27] Fix | Delete
<div class="comments-header section-inner small max-percentage">
[28] Fix | Delete
[29] Fix | Delete
<h2 class="comment-reply-title">
[30] Fix | Delete
<?php
[31] Fix | Delete
if ( ! have_comments() ) {
[32] Fix | Delete
_e( 'Leave a comment', 'twentytwenty' );
[33] Fix | Delete
} elseif ( 1 === $comments_number ) {
[34] Fix | Delete
/* translators: %s: Post title. */
[35] Fix | Delete
printf( _x( 'One reply on &ldquo;%s&rdquo;', 'comments title', 'twentytwenty' ), get_the_title() );
[36] Fix | Delete
} else {
[37] Fix | Delete
printf(
[38] Fix | Delete
/* translators: 1: Number of comments, 2: Post title. */
[39] Fix | Delete
_nx(
[40] Fix | Delete
'%1$s reply on &ldquo;%2$s&rdquo;',
[41] Fix | Delete
'%1$s replies on &ldquo;%2$s&rdquo;',
[42] Fix | Delete
$comments_number,
[43] Fix | Delete
'comments title',
[44] Fix | Delete
'twentytwenty'
[45] Fix | Delete
),
[46] Fix | Delete
number_format_i18n( $comments_number ),
[47] Fix | Delete
get_the_title()
[48] Fix | Delete
);
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
?>
[52] Fix | Delete
</h2><!-- .comments-title -->
[53] Fix | Delete
[54] Fix | Delete
</div><!-- .comments-header -->
[55] Fix | Delete
[56] Fix | Delete
<div class="comments-inner section-inner thin max-percentage">
[57] Fix | Delete
[58] Fix | Delete
<?php
[59] Fix | Delete
wp_list_comments(
[60] Fix | Delete
array(
[61] Fix | Delete
'walker' => new TwentyTwenty_Walker_Comment(),
[62] Fix | Delete
'avatar_size' => 120,
[63] Fix | Delete
'style' => 'div',
[64] Fix | Delete
)
[65] Fix | Delete
);
[66] Fix | Delete
[67] Fix | Delete
$comment_pagination = paginate_comments_links(
[68] Fix | Delete
array(
[69] Fix | Delete
'echo' => false,
[70] Fix | Delete
'end_size' => 0,
[71] Fix | Delete
'mid_size' => 0,
[72] Fix | Delete
'next_text' => __( 'Newer Comments', 'twentytwenty' ) . ' <span aria-hidden="true">&rarr;</span>',
[73] Fix | Delete
'prev_text' => '<span aria-hidden="true">&larr;</span> ' . __( 'Older Comments', 'twentytwenty' ),
[74] Fix | Delete
)
[75] Fix | Delete
);
[76] Fix | Delete
[77] Fix | Delete
if ( $comment_pagination ) {
[78] Fix | Delete
$pagination_classes = '';
[79] Fix | Delete
[80] Fix | Delete
// If we're only showing the "Next" link, add a class indicating so.
[81] Fix | Delete
if ( false === strpos( $comment_pagination, 'prev page-numbers' ) ) {
[82] Fix | Delete
$pagination_classes = ' only-next';
[83] Fix | Delete
}
[84] Fix | Delete
?>
[85] Fix | Delete
[86] Fix | Delete
<nav class="comments-pagination pagination<?php echo $pagination_classes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>" aria-label="<?php esc_attr_e( 'Comments', 'twentytwenty' ); ?>">
[87] Fix | Delete
<?php echo wp_kses_post( $comment_pagination ); ?>
[88] Fix | Delete
</nav>
[89] Fix | Delete
[90] Fix | Delete
<?php
[91] Fix | Delete
}
[92] Fix | Delete
?>
[93] Fix | Delete
[94] Fix | Delete
</div><!-- .comments-inner -->
[95] Fix | Delete
[96] Fix | Delete
</div><!-- comments -->
[97] Fix | Delete
[98] Fix | Delete
<?php
[99] Fix | Delete
}
[100] Fix | Delete
[101] Fix | Delete
if ( comments_open() || pings_open() ) {
[102] Fix | Delete
[103] Fix | Delete
if ( $comments ) {
[104] Fix | Delete
echo '<hr class="styled-separator is-style-wide" aria-hidden="true" />';
[105] Fix | Delete
}
[106] Fix | Delete
[107] Fix | Delete
comment_form(
[108] Fix | Delete
array(
[109] Fix | Delete
'class_form' => 'section-inner thin max-percentage',
[110] Fix | Delete
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
[111] Fix | Delete
'title_reply_after' => '</h2>',
[112] Fix | Delete
)
[113] Fix | Delete
);
[114] Fix | Delete
[115] Fix | Delete
} elseif ( is_single() ) {
[116] Fix | Delete
[117] Fix | Delete
if ( $comments ) {
[118] Fix | Delete
echo '<hr class="styled-separator is-style-wide" aria-hidden="true" />';
[119] Fix | Delete
}
[120] Fix | Delete
[121] Fix | Delete
?>
[122] Fix | Delete
[123] Fix | Delete
<div class="comment-respond" id="respond">
[124] Fix | Delete
[125] Fix | Delete
<p class="comments-closed"><?php _e( 'Comments are closed.', 'twentytwenty' ); ?></p>
[126] Fix | Delete
[127] Fix | Delete
</div><!-- #respond -->
[128] Fix | Delete
[129] Fix | Delete
<?php
[130] Fix | Delete
}
[131] Fix | Delete
[132] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function