50 lines
No EOL
1.3 KiB
PHP
Executable file
50 lines
No EOL
1.3 KiB
PHP
Executable file
<?php
|
|
// Ha a bejegyzés jelszóval védett és a jelszó nincs megadva, akkor ne jelenítsünk meg hozzászólásokat
|
|
if (post_password_required()) {
|
|
return;
|
|
}
|
|
?>
|
|
|
|
<div id="comments" class="comments-area">
|
|
|
|
<?php if (have_comments()) : ?>
|
|
<h2 class="comments-title">
|
|
<?php
|
|
$comment_count = get_comments_number();
|
|
if ('1' === $comment_count) {
|
|
printf(
|
|
/* translators: %s: post title */
|
|
esc_html__('One thought on “%s”', 'sandbox'),
|
|
'<span>' . get_the_title() . '</span>'
|
|
);
|
|
} else {
|
|
printf( // WPCS: XSS OK.
|
|
/* translators: 1: comment count number, 2: post title */
|
|
esc_html(_nx('%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', $comment_count, 'comments title', 'sandbox')),
|
|
number_format_i18n($comment_count),
|
|
'<span>' . get_the_title() . '</span>'
|
|
);
|
|
}
|
|
?>
|
|
</h2>
|
|
|
|
<ol class="comment-list">
|
|
<?php
|
|
wp_list_comments(array(
|
|
'style' => 'ol',
|
|
'short_ping' => true,
|
|
));
|
|
?>
|
|
</ol><!-- .comment-list -->
|
|
|
|
<?php the_comments_navigation(); ?>
|
|
|
|
<?php if (!comments_open() && get_comments_number()) : ?>
|
|
<p class="no-comments"><?php esc_html_e('Comments are closed.', 'sandbox'); ?></p>
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php comment_form(); ?>
|
|
|
|
</div><!-- #comments -->
|