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: https://develop.svn.wordpress.org/trunk@22616 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2012-11-16 21:31:02 +00:00
parent 13cb0aa9a3
commit 2ad1038e99
1 changed files with 1 additions and 1 deletions

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; ?>