Don't show comments on passworded posts
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
if (post_password_required()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<?php function roots_comment($comment, $args, $depth) {
|
<?php function roots_comment($comment, $args, $depth) {
|
||||||
$GLOBALS['comment'] = $comment; ?>
|
$GLOBALS['comment'] = $comment; ?>
|
||||||
<li <?php comment_class(); ?>>
|
<li <?php comment_class(); ?>>
|
||||||
@@ -25,15 +31,6 @@
|
|||||||
</article>
|
</article>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if (post_password_required()) : ?>
|
|
||||||
<section id="comments">
|
|
||||||
<div class="alert alert-block fade in">
|
|
||||||
<a class="close" data-dismiss="alert">×</a>
|
|
||||||
<p><?php _e('This post is password protected. Enter the password to view comments.', 'roots'); ?></p>
|
|
||||||
</div>
|
|
||||||
</section><!-- /#comments -->
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if (have_comments()) : ?>
|
<?php if (have_comments()) : ?>
|
||||||
<section id="comments">
|
<section id="comments">
|
||||||
<h3><?php printf(_n('One Response to “%2$s”', '%1$s Responses to “%2$s”', get_comments_number(), 'roots'), number_format_i18n(get_comments_number()), get_the_title()); ?></h3>
|
<h3><?php printf(_n('One Response to “%2$s”', '%1$s Responses to “%2$s”', get_comments_number(), 'roots'), number_format_i18n(get_comments_number()), get_the_title()); ?></h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user