Twenty Eleven: in comments template check get_comments_number() instead of using $comments_by_type for showing a comments closed message. Props kovshenin, see #20469.

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

View File

@@ -67,7 +67,7 @@
/* 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() && ! empty( $comments_by_type['comment'] ) ) : ?>
if ( ! comments_open() && get_comments_number() ) : ?>
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p>
<?php endif; ?>