WordPress.org

Make WordPress Core

Changeset 22615


Ignore:
Timestamp:
11/16/12 21:28:47 (17 months ago)
Author:
lancewillett
Message:

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.

Location:
trunk/wp-content/themes/twentytwelve
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentytwelve/comments.php

    r22587 r22615  
    5050         * But we only want the note on posts and pages that had comments in the first place. 
    5151         */ 
    52         if ( ! comments_open() && ! empty( $comments_by_type['comment'] ) ) : ?> 
     52        if ( ! comments_open() && get_comments_number() ) : ?> 
    5353        <!-- If comments are closed. --> 
    5454        <p class="nocomments"><?php _e( 'Comments are closed.' , 'twentytwelve' ); ?></p> 
  • trunk/wp-content/themes/twentytwelve/single.php

    r22318 r22615  
    2323                </nav><!-- .nav-single --> 
    2424 
    25                 <?php 
    26                     // If comments are open or we have at least one comment, load up the comment template 
    27                     if ( comments_open() || '0' != get_comments_number() ) 
    28                         comments_template( '', true ); 
    29                 ?> 
     25                <?php comments_template( '', true ); ?> 
    3026 
    3127            <?php endwhile; // end of the loop. ?> 
Note: See TracChangeset for help on using the changeset viewer.