mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-03 18:18:02 +02:00
Twenty Twelve: better closed comments notes. Check only for "comment" type comments when deciding whether to show the message.
git-svn-id: http://core.svn.wordpress.org/trunk@22587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dc43ad3ac8
commit
29d5523b23
@ -45,12 +45,17 @@ if ( post_password_required() )
|
|||||||
</nav>
|
</nav>
|
||||||
<?php endif; // check for comment navigation ?>
|
<?php endif; // check for comment navigation ?>
|
||||||
|
|
||||||
<?php // If comments are closed and there are comments, let's leave a little note.
|
<?php
|
||||||
elseif ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
/* 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>
|
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentytwelve' ); ?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php endif; // have_comments() ?>
|
||||||
|
|
||||||
<?php comment_form(); ?>
|
<?php comment_form(); ?>
|
||||||
|
|
||||||
</div><!-- #comments .comments-area -->
|
</div><!-- #comments .comments-area -->
|
Loading…
Reference in New Issue
Block a user