Edit File by line
/home/zeestwma/richards.../wp-conte.../themes/astra
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://codex.wordpress.org/Template_Hierarchy
[7] Fix | Delete
*
[8] Fix | Delete
* @package Astra
[9] Fix | Delete
* @since 1.0.0
[10] Fix | Delete
*/
[11] Fix | Delete
[12] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[13] Fix | Delete
exit; // Exit if accessed directly.
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
/*
[17] Fix | Delete
* If the current post is protected by a password and
[18] Fix | Delete
* the visitor has not yet entered the password we will
[19] Fix | Delete
* return early without loading the comments.
[20] Fix | Delete
*/
[21] Fix | Delete
if ( post_password_required() || false === astra_get_option( 'enable-comments-area', true ) ) {
[22] Fix | Delete
return;
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
$comment_form_position = astra_get_option( 'comment-form-position', 'below' );
[26] Fix | Delete
$container_selector = 'outside' === astra_get_option( 'comments-box-placement' ) ? 'ast-container--' . astra_get_option( 'comments-box-container-width', '' ) : '';
[27] Fix | Delete
[28] Fix | Delete
if ( is_customize_preview() && is_callable( 'Astra_Builder_UI_Controller::render_customizer_edit_button' ) ) {
[29] Fix | Delete
?>
[30] Fix | Delete
<div id="comments" class="customizer-item-block-preview customizer-navigate-on-focus comments-area comment-form-position-<?php echo esc_attr( $comment_form_position ); ?> <?php echo esc_attr( $container_selector ); ?>" data-section="ast-sub-section-comments" data-type="section">
[31] Fix | Delete
<?php
[32] Fix | Delete
Astra_Builder_UI_Controller::render_customizer_edit_button( 'row-editor-shortcut' );
[33] Fix | Delete
} else {
[34] Fix | Delete
?>
[35] Fix | Delete
<div id="comments" class="comments-area comment-form-position-<?php echo esc_attr( $comment_form_position ); ?> <?php echo esc_attr( $container_selector ); ?>">
[36] Fix | Delete
<?php
[37] Fix | Delete
}
[38] Fix | Delete
?>
[39] Fix | Delete
[40] Fix | Delete
<?php astra_comments_before(); ?>
[41] Fix | Delete
[42] Fix | Delete
<?php
[43] Fix | Delete
if ( 'above' === $comment_form_position ) {
[44] Fix | Delete
comment_form();
[45] Fix | Delete
}
[46] Fix | Delete
if ( have_comments() ) :
[47] Fix | Delete
astra_markup_open( 'comment-count-wrapper' );
[48] Fix | Delete
$title_tag = apply_filters( 'astra_comment_title_tag', 'h3' );
[49] Fix | Delete
?>
[50] Fix | Delete
<<?php echo esc_attr( $title_tag ); ?> class="comments-title">
[51] Fix | Delete
<?php
[52] Fix | Delete
$astra_comments_title = apply_filters(
[53] Fix | Delete
'astra_comment_form_title',
[54] Fix | Delete
sprintf( // WPCS: XSS OK.
[55] Fix | Delete
/* translators: 1: number of comments */
[56] Fix | Delete
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'astra' ) ),
[57] Fix | Delete
number_format_i18n( get_comments_number() ),
[58] Fix | Delete
get_the_title()
[59] Fix | Delete
)
[60] Fix | Delete
);
[61] Fix | Delete
[62] Fix | Delete
echo esc_html( $astra_comments_title );
[63] Fix | Delete
?>
[64] Fix | Delete
</<?php echo esc_attr( $title_tag ); ?>>
[65] Fix | Delete
<?php
[66] Fix | Delete
astra_markup_close( 'comment-count-wrapper' );
[67] Fix | Delete
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
[68] Fix | Delete
?>
[69] Fix | Delete
<nav id="comment-nav-above" class="navigation comment-navigation" aria-label="<?php esc_attr_e( 'Comments Navigation', 'astra' ); ?>">
[70] Fix | Delete
<h3 class="screen-reader-text"><?php echo esc_html( astra_default_strings( 'string-comment-navigation-next', false ) ); ?></h3>
[71] Fix | Delete
<div class="nav-links">
[72] Fix | Delete
[73] Fix | Delete
<div class="nav-previous"><?php previous_comments_link( astra_default_strings( 'string-comment-navigation-previous', false ) ); ?></div>
[74] Fix | Delete
<div class="nav-next"><?php next_comments_link( astra_default_strings( 'string-comment-navigation-next', false ) ); ?></div>
[75] Fix | Delete
[76] Fix | Delete
</div><!-- .nav-links -->
[77] Fix | Delete
</nav><!-- #comment-nav-above -->
[78] Fix | Delete
<?php endif; ?>
[79] Fix | Delete
[80] Fix | Delete
<ol class="ast-comment-list">
[81] Fix | Delete
<?php
[82] Fix | Delete
wp_list_comments(
[83] Fix | Delete
array(
[84] Fix | Delete
'callback' => 'astra_theme_comment',
[85] Fix | Delete
'style' => 'ol',
[86] Fix | Delete
)
[87] Fix | Delete
);
[88] Fix | Delete
?>
[89] Fix | Delete
</ol><!-- .ast-comment-list -->
[90] Fix | Delete
[91] Fix | Delete
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
[92] Fix | Delete
<nav id="comment-nav-below" class="navigation comment-navigation" aria-label="<?php esc_attr_e( 'Comments Navigation', 'astra' ); ?>">
[93] Fix | Delete
<h3 class="screen-reader-text"><?php echo esc_html( astra_default_strings( 'string-comment-navigation-next', false ) ); ?></h3>
[94] Fix | Delete
<div class="nav-links">
[95] Fix | Delete
[96] Fix | Delete
<div class="nav-previous"><?php previous_comments_link( astra_default_strings( 'string-comment-navigation-previous', false ) ); ?></div>
[97] Fix | Delete
<div class="nav-next"><?php next_comments_link( astra_default_strings( 'string-comment-navigation-next', false ) ); ?></div>
[98] Fix | Delete
[99] Fix | Delete
</div><!-- .nav-links -->
[100] Fix | Delete
</nav><!-- #comment-nav-below -->
[101] Fix | Delete
<?php endif; ?>
[102] Fix | Delete
[103] Fix | Delete
<?php endif; ?>
[104] Fix | Delete
[105] Fix | Delete
<?php
[106] Fix | Delete
// If comments are closed and there are comments, let's leave a little note, shall we?
[107] Fix | Delete
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
[108] Fix | Delete
?>
[109] Fix | Delete
<p class="no-comments"><?php echo esc_html( astra_default_strings( 'string-comment-closed', false ) ); ?></p>
[110] Fix | Delete
<?php endif; ?>
[111] Fix | Delete
[112] Fix | Delete
<?php
[113] Fix | Delete
if ( 'below' === $comment_form_position ) {
[114] Fix | Delete
comment_form();
[115] Fix | Delete
}
[116] Fix | Delete
?>
[117] Fix | Delete
[118] Fix | Delete
<?php astra_comments_after(); ?>
[119] Fix | Delete
[120] Fix | Delete
</div><!-- #comments -->
[121] Fix | Delete
[122] Fix | Delete
<?php do_action( 'astra_after_comments_module' ); ?>
[123] Fix | Delete
[124] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function