Twenty Eleven: better closed comments notes. Check only for "comment" type comments when deciding whether to show the message. Props iandstewart and obenland, closes #20469.
git-svn-id: https://develop.svn.wordpress.org/trunk@22588 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
05d7baa79a
commit
43107f767c
|
@ -65,13 +65,14 @@
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
/* If there are no comments and comments are closed, let's leave a little note, shall we?
|
/* If there are no comments and comments are closed, let's leave a little note, shall we?
|
||||||
* But we don't want the note on pages or post types that do not support comments.
|
* But we only want the note on posts and pages that had comments in the first place.
|
||||||
*/
|
*/
|
||||||
elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), 'comments' ) ) :
|
if ( ! comments_open() && ! empty( $comments_by_type['comment'] ) ) : ?>
|
||||||
?>
|
|
||||||
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p>
|
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php endif; // have_comments() ?>
|
||||||
|
|
||||||
<?php comment_form(); ?>
|
<?php comment_form(); ?>
|
||||||
|
|
||||||
</div><!-- #comments -->
|
</div><!-- #comments -->
|
||||||
|
|
Loading…
Reference in New Issue