File: //backups/73incnz/wp-content/themes/ovation/comments.php
<?php
/**
* The template for displaying comments.
*
* The area of the page that contains both current comments
* and the comment form.
*
* @package Ovation
* @since 1.0.0
*/
// If the current post is protected by a password and the visitor has not yet
// entered the password, return early without loading the comments.
if ( post_password_required() ) {
return;
}
// Don't show comments if commenting is closed and the current post doesn't
// have any comments associated with it.
if ( ! comments_open() && '0' === get_comments_number() ) {
return;
}
$comments_count = get_comments_number();
do_action( 'ovation_comments_before' );
?>
<section id="comments" class="comments-area">
<?php do_action( 'ovation_comments_top' ); ?>
<div class="comments-area-inside">
<?php if ( have_comments() ) : ?>
<header class="comments-header">
<h2 class="comments-title">
<?php
echo esc_html( sprintf(
_n( '%1$s Comment', '%1$s Comments', $comments_count, 'ovation' ),
esc_html( number_format_i18n( $comments_count ) )
) );
?>
</h2>
</header>
<ol class="comment-list<?php if ( get_option( 'show_avatars' ) ) { echo ' show-avatars'; } ?>">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 80,
'max_depth' => 4,
) );
?>
</ol>
<?php endif; ?>
<?php if ( ! comments_open() && '0' !== get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
<footer class="comments-footer">
<p><?php esc_html_e( 'Comments are closed.', 'ovation' ); ?></p>
</footer>
<?php endif; ?>
<?php the_comments_navigation(); ?>
<?php comment_form(); ?>
</div>
<?php do_action( 'ovation_comments_bottom' ); ?>
</section>
<?php
do_action( 'ovation_comments_after' );