mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-23 00:31:28 +01:00
Twenty Twelve: better fix for #20469 and comments closed messages, also load the comments template in single.php template regardless of whether comments are open or closed (consistent with page.php). Both props kovshenin.
git-svn-id: http://core.svn.wordpress.org/trunk@22615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
efda1483f7
commit
dee2ec4779
@ -49,7 +49,7 @@ if ( post_password_required() )
|
||||
/* 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_open() && get_comments_number() ) : ?>
|
||||
<!-- If comments are closed. -->
|
||||
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentytwelve' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
@ -22,11 +22,7 @@ get_header(); ?>
|
||||
<span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span>
|
||||
</nav><!-- .nav-single -->
|
||||
|
||||
<?php
|
||||
// If comments are open or we have at least one comment, load up the comment template
|
||||
if ( comments_open() || '0' != get_comments_number() )
|
||||
comments_template( '', true );
|
||||
?>
|
||||
<?php comments_template( '', true ); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user