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

git-svn-id: http://core.svn.wordpress.org/trunk@22617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2012-11-16 21:35:42 +00:00
parent 5c3b888ccd
commit 9ebd8d18ac

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() ?>