Twenty Ten: move the "Comments closed" text outside the `have_comments()` conditional, props kovshenin. Closes #20469.

git-svn-id: https://develop.svn.wordpress.org/trunk@22617 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2012-11-16 21:35:42 +00:00
parent 2ad1038e99
commit ca58fbc22d
1 changed files with 7 additions and 9 deletions

View File

@ -62,15 +62,13 @@
</div><!-- .navigation -->
<?php endif; // check for comment navigation ?>
<?php else : // or, if we don't have comments:
/* If there are no comments and comments are closed,
* let's leave a little note, shall we?
*/
if ( ! comments_open() ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
<?php endif; // end ! comments_open() ?>
<?php
/* If there are no comments and comments are closed, let's leave a little note, shall we?
* But we only want the note on posts and pages that had comments in the first place.
*/
if ( ! comments_open() && get_comments_number() ) : ?>
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyten' ); ?></p>
<?php endif; // end ! comments_open ?>
<?php endif; // end have_comments() ?>