Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

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

    r25746 r42343  
    1818 * return early without loading the comments.
    1919 */
    20 if ( post_password_required() )
     20if ( post_password_required() ) {
    2121    return;
     22}
    2223?>
    2324
     
    2930        <h2 class="comments-title">
    3031            <?php
    31                 printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentytwelve' ),
    32                     number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
     32                printf(
     33                    _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentytwelve' ),
     34                    number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>'
     35                );
    3336            ?>
    3437        </h2>
    3538
    3639        <ol class="commentlist">
    37             <?php wp_list_comments( array( 'callback' => 'twentytwelve_comment', 'style' => 'ol' ) ); ?>
     40            <?php
     41            wp_list_comments(
     42                array(
     43                    'callback' => 'twentytwelve_comment',
     44                    'style'    => 'ol',
     45                )
     46            );
     47?>
    3848        </ol><!-- .commentlist -->
    3949
     
    5060         * But we only want the note on posts and pages that had comments in the first place.
    5161         */
    52         if ( ! comments_open() && get_comments_number() ) : ?>
    53         <p class="nocomments"><?php _e( 'Comments are closed.' , 'twentytwelve' ); ?></p>
     62        if ( ! comments_open() && get_comments_number() ) :
     63        ?>
     64        <p class="nocomments"><?php _e( 'Comments are closed.', 'twentytwelve' ); ?></p>
    5465        <?php endif; ?>
    5566
Note: See TracChangeset for help on using the changeset viewer.