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-admin/options-general.php

    r42875 r43571  
    8181        $wp_home_class = ' disabled';
    8282    }
    83 ?>
     83    ?>
    8484
    8585<tr>
     
    9191<th scope="row"><label for="home"><?php _e( 'Site Address (URL)' ); ?></label></th>
    9292<td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php echo $wp_home_class; ?>" />
    93 <?php if ( ! defined( 'WP_HOME' ) ) : ?>
     93    <?php if ( ! defined( 'WP_HOME' ) ) : ?>
    9494<p class="description" id="home-description">
    95 <?php
    96     printf(
    97         /* translators: %s: Codex URL */
    98         __( 'Enter the address here if you <a href="%s">want your site home page to be different from your WordPress installation directory</a>.' ),
    99         __( 'https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory' )
    100     );
    101 ?>
     95        <?php
     96        printf(
     97            /* translators: %s: Codex URL */
     98            __( 'Enter the address here if you <a href="%s">want your site home page to be different from your WordPress installation directory</a>.' ),
     99            __( 'https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory' )
     100        );
     101        ?>
    102102</p>
    103103<?php endif; ?>
     
    114114$new_admin_email = get_option( 'new_admin_email' );
    115115if ( $new_admin_email && $new_admin_email != get_option( 'admin_email' ) ) :
    116 ?>
     116    ?>
    117117    <div class="updated inline">
    118118    <p>
     
    141141<td> <fieldset><legend class="screen-reader-text"><span><?php _e( 'Membership' ); ?></span></legend><label for="users_can_register">
    142142<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked( '1', get_option( 'users_can_register' ) ); ?> />
    143 <?php _e( 'Anyone can register' ); ?></label>
     143    <?php _e( 'Anyone can register' ); ?></label>
    144144</fieldset></td>
    145145</tr>
     
    152152</tr>
    153153
    154 <?php
     154    <?php
    155155}
    156156
     
    242242            '<code>' . date_i18n( $timezone_format, false, true ) . '</code>'
    243243        );
    244     ?>
     244        ?>
    245245    </span>
    246246<?php if ( get_option( 'timezone_string' ) || ! empty( $current_offset ) ) : ?>
Note: See TracChangeset for help on using the changeset viewer.