Edit File by line
/home/barbar84/public_h.../wp-conte.../themes/twentytw...
File: comments.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* The template for displaying comments
[2] Fix | Delete
*
[3] Fix | Delete
* This is the template that displays the area of the page that contains both the current comments
[4] Fix | Delete
* and the comment form.
[5] Fix | Delete
*
[6] Fix | Delete
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
[7] Fix | Delete
*
[8] Fix | Delete
* @package WordPress
[9] Fix | Delete
* @subpackage Twenty_Twenty_One
[10] Fix | Delete
* @since Twenty Twenty-One 1.0
[11] Fix | Delete
*/
[12] Fix | Delete
[13] Fix | Delete
/*
[14] Fix | Delete
* If the current post is protected by a password and
[15] Fix | Delete
* the visitor has not yet entered the password,
[16] Fix | Delete
* return early without loading the comments.
[17] Fix | Delete
*/
[18] Fix | Delete
if ( post_password_required() ) {
[19] Fix | Delete
return;
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
$twenty_twenty_one_comment_count = get_comments_number();
[23] Fix | Delete
?>
[24] Fix | Delete
[25] Fix | Delete
<div id="comments" class="comments-area default-max-width <?php echo get_option( 'show_avatars' ) ? 'show-avatars' : ''; ?>">
[26] Fix | Delete
[27] Fix | Delete
<?php
[28] Fix | Delete
if ( have_comments() ) :
[29] Fix | Delete
;
[30] Fix | Delete
?>
[31] Fix | Delete
<h2 class="comments-title">
[32] Fix | Delete
<?php if ( '1' === $twenty_twenty_one_comment_count ) : ?>
[33] Fix | Delete
<?php esc_html_e( '1 comment', 'twentytwentyone' ); ?>
[34] Fix | Delete
<?php else : ?>
[35] Fix | Delete
<?php
[36] Fix | Delete
printf(
[37] Fix | Delete
/* translators: %s: comment count number. */
[38] Fix | Delete
esc_html( _nx( '%s comment', '%s comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ),
[39] Fix | Delete
esc_html( number_format_i18n( $twenty_twenty_one_comment_count ) )
[40] Fix | Delete
);
[41] Fix | Delete
?>
[42] Fix | Delete
<?php endif; ?>
[43] Fix | Delete
</h2><!-- .comments-title -->
[44] Fix | Delete
[45] Fix | Delete
<ol class="comment-list">
[46] Fix | Delete
<?php
[47] Fix | Delete
wp_list_comments(
[48] Fix | Delete
array(
[49] Fix | Delete
'avatar_size' => 60,
[50] Fix | Delete
'style' => 'ol',
[51] Fix | Delete
'short_ping' => true,
[52] Fix | Delete
)
[53] Fix | Delete
);
[54] Fix | Delete
?>
[55] Fix | Delete
</ol><!-- .comment-list -->
[56] Fix | Delete
[57] Fix | Delete
<?php
[58] Fix | Delete
the_comments_pagination(
[59] Fix | Delete
array(
[60] Fix | Delete
'before_page_number' => esc_html__( 'Page', 'twentytwentyone' ) . ' ',
[61] Fix | Delete
'mid_size' => 0,
[62] Fix | Delete
'prev_text' => sprintf(
[63] Fix | Delete
'%s <span class="nav-prev-text">%s</span>',
[64] Fix | Delete
is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ),
[65] Fix | Delete
esc_html__( 'Older comments', 'twentytwentyone' )
[66] Fix | Delete
),
[67] Fix | Delete
'next_text' => sprintf(
[68] Fix | Delete
'<span class="nav-next-text">%s</span> %s',
[69] Fix | Delete
esc_html__( 'Newer comments', 'twentytwentyone' ),
[70] Fix | Delete
is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' )
[71] Fix | Delete
),
[72] Fix | Delete
)
[73] Fix | Delete
);
[74] Fix | Delete
?>
[75] Fix | Delete
[76] Fix | Delete
<?php if ( ! comments_open() ) : ?>
[77] Fix | Delete
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'twentytwentyone' ); ?></p>
[78] Fix | Delete
<?php endif; ?>
[79] Fix | Delete
<?php endif; ?>
[80] Fix | Delete
[81] Fix | Delete
<?php
[82] Fix | Delete
comment_form(
[83] Fix | Delete
array(
[84] Fix | Delete
'logged_in_as' => null,
[85] Fix | Delete
'title_reply' => esc_html__( 'Leave a comment', 'twentytwentyone' ),
[86] Fix | Delete
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
[87] Fix | Delete
'title_reply_after' => '</h2>',
[88] Fix | Delete
)
[89] Fix | Delete
);
[90] Fix | Delete
?>
[91] Fix | Delete
[92] Fix | Delete
</div><!-- #comments -->
[93] Fix | Delete
[94] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function