Twenty Twelve: better closed comments notes. Check only for "comment" type comments when deciding whether to show the message.
git-svn-id: https://develop.svn.wordpress.org/trunk@22587 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
434af4ce3e
commit
05d7baa79a
@ -45,11 +45,16 @@ if ( post_password_required() )
|
||||
</nav>
|
||||
<?php endif; // check for comment navigation ?>
|
||||
|
||||
<?php // If comments are closed and there are comments, let's leave a little note.
|
||||
elseif ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
||||
?>
|
||||
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentytwelve' ); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
/* If there are no comments and comments are closed, let's leave a note.
|
||||
* 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 are closed. -->
|
||||
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentytwelve' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; // have_comments() ?>
|
||||
|
||||
<?php comment_form(); ?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user