15 lines
877 B
PHP
15 lines
877 B
PHP
<?php
|
|
// Protected posts must not expose their discussion until WordPress grants access.
|
|
if ( post_password_required() ) { return; }
|
|
?>
|
|
<section id="comments" class="comments-area">
|
|
<?php if ( have_comments() ) { ?>
|
|
<h2 class="comments-title"><?php printf( esc_html( _nx( 'One comment', '%1$s comments', get_comments_number(), 'comments title', 'c1024-2026' ) ), esc_html( number_format_i18n( get_comments_number() ) ) ); ?></h2>
|
|
<ol class="comment-list"><?php wp_list_comments( array( 'style' => 'ol', 'short_ping' => true, 'avatar_size' => 48 ) ); ?></ol>
|
|
<?php the_comments_navigation(); ?>
|
|
<?php } ?>
|
|
<?php if ( ! comments_open() && get_comments_number() ) { ?><p><?php esc_html_e( 'Comments are closed.', 'c1024-2026' ); ?></p><?php } ?>
|
|
<?php // WordPress provides the form so it respects discussion settings and logged-in state.
|
|
comment_form(); ?>
|
|
</section>
|