WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (3 years ago)
Author:
pento
Message:

Coding Standards: Upgrade WPCS to 1.0.0

WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:

  • Multiline function calls must now put each parameter on a new line.
  • Auto-formatting files is now part of the grunt precommit script.
  • Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.

File:
1 edited

Legend:

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

    r42343 r43571  
    1818                <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
    1919            </div><!-- #comments -->
    20 <?php
     20    <?php
    2121        /*
    2222         * Stop the rest of comments.php from being processed,
     
    3737            printf(
    3838                _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
    39                 number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>'
     39                number_format_i18n( get_comments_number() ),
     40                '<em>' . get_the_title() . '</em>'
    4041            );
    4142            ?>
    4243            </h3>
    4344
    44 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
     45    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    4546            <div class="navigation">
    4647                <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
    4748                <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    4849            </div> <!-- .navigation -->
    49 <?php endif; // check for comment navigation ?>
     50    <?php endif; // check for comment navigation ?>
    5051
    5152            <ol class="commentlist">
     
    6263            </ol>
    6364
    64 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
     65    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    6566            <div class="navigation">
    6667                <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
    6768                <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    6869            </div><!-- .navigation -->
    69 <?php endif; // check for comment navigation ?>
     70    <?php endif; // check for comment navigation ?>
    7071
    7172    <?php
     
    7576     */
    7677    if ( ! comments_open() && get_comments_number() ) :
    77     ?>
     78        ?>
    7879        <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
    7980    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.