Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 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/includes/theme-install.php

    r42343 r43571  
    105105    </select>
    106106    <label class="screen-reader-text" for="s">
    107     <?php
    108     switch ( $type ) {
    109         case 'term':
    110             _e( 'Search by keyword' );
    111             break;
    112         case 'author':
    113             _e( 'Search by author' );
    114             break;
    115         case 'tag':
    116             _e( 'Search by tag' );
    117             break;
    118     }
    119     ?>
     107        <?php
     108        switch ( $type ) {
     109            case 'term':
     110                _e( 'Search by keyword' );
     111                break;
     112            case 'author':
     113                _e( 'Search by author' );
     114                break;
     115            case 'tag':
     116                _e( 'Search by tag' );
     117                break;
     118        }
     119        ?>
    120120    </label>
    121121    <?php else : ?>
     
    125125    <?php submit_button( __( 'Search' ), '', 'search', false ); ?>
    126126</form>
    127 <?php
     127    <?php
    128128}
    129129
     
    135135function install_themes_dashboard() {
    136136    install_theme_search_form( false );
    137 ?>
     137    ?>
    138138<h4><?php _e( 'Feature Filter' ); ?></h4>
    139139<p class="install-help"><?php _e( 'Find a theme based on specific features.' ); ?></p>
     
    153153            $feature_name = esc_html( $feature_name );
    154154            $feature      = esc_attr( $feature );
    155 ?>
     155            ?>
    156156
    157157<li>
     
    163163</ol>
    164164<br class="clear" />
    165 <?php
     165        <?php
    166166    }
    167167    ?>
     
    169169</div>
    170170<br class="clear" />
    171 <?php submit_button( __( 'Find Themes' ), '', 'search' ); ?>
     171    <?php submit_button( __( 'Find Themes' ), '', 'search' ); ?>
    172172</form>
    173 <?php
     173    <?php
    174174}
    175175
     
    178178 */
    179179function install_themes_upload() {
    180 ?>
     180    ?>
    181181<p class="install-help"><?php _e( 'If you have a theme in a .zip format, you may install it by uploading it here.' ); ?></p>
    182182<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-theme' ); ?>">
Note: See TracChangeset for help on using the changeset viewer.