WordPress.org

Make WordPress Core

Ticket #20469: 20469.diff

File 20469.diff, 3.2 KB (added by kovshenin, 17 months ago)

Includes twentyten, twentyeleven and twentytwelve

  • wp-content/themes/twentyten/comments.php

     
    6262                        </div><!-- .navigation --> 
    6363<?php endif; // check for comment navigation ?> 
    6464 
    65 <?php else : // or, if we don't have comments: 
     65<?php 
     66/* If there are no comments and comments are closed, let's leave a little note, shall we? 
     67 * But we only want the note on posts and pages that had comments in the first place. 
     68 */ 
     69if ( ! comments_open() && get_comments_number() ) : ?> 
     70        <p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyten' ); ?></p> 
     71<?php endif; // end ! comments_open ?> 
    6672 
    67         /* If there are no comments and comments are closed, 
    68          * let's leave a little note, shall we? 
    69          */ 
    70         if ( ! comments_open() ) : 
    71 ?> 
    72         <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p> 
    73 <?php endif; // end ! comments_open() ?> 
    74  
    7573<?php endif; // end have_comments() ?> 
    7674 
    7775<?php comment_form(); ?> 
  • wp-content/themes/twentyeleven/comments.php

     
    6767                /* If there are no comments and comments are closed, let's leave a little note, shall we? 
    6868                 * But we only want the note on posts and pages that had comments in the first place. 
    6969                 */ 
    70                 if ( ! comments_open() && ! empty( $comments_by_type['comment'] ) ) : ?> 
     70                if ( ! comments_open() && get_comments_number() ) : ?> 
    7171                <p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyeleven' ); ?></p> 
    7272                <?php endif; ?> 
    7373 
  • wp-content/themes/twentytwelve/single.php

     
    2222                                        <span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentytwelve' ) . '</span>' ); ?></span> 
    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. ?> 
    3228 
  • wp-content/themes/twentytwelve/comments.php

     
    4949                /* If there are no comments and comments are closed, let's leave a note. 
    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> 
    5555                <?php endif; ?>