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/upgrade.php

    r42343 r43571  
    7979<p class="step"><a class="button button-large" href="<?php echo get_option( 'home' ); ?>/"><?php _e( 'Continue' ); ?></a></p>
    8080
    81 <?php
     81    <?php
    8282elseif ( ! $php_compat || ! $mysql_compat ) :
    8383    if ( ! $mysql_compat && ! $php_compat ) {
     
    8888        printf( __( 'You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version );
    8989    }
    90 ?>
    91 <?php
     90    ?>
     91    <?php
    9292else :
    9393    switch ( $step ) :
     
    9898                $goback = urlencode( $goback );
    9999            }
    100     ?>
     100            ?>
    101101    <h1><?php _e( 'Database Update Required' ); ?></h1>
    102102<p><?php _e( 'WordPress has been updated! Before we send you on your way, we have to update your database to the newest version.' ); ?></p>
    103103<p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p>
    104104<p class="step"><a class="button button-large button-primary" href="upgrade.php?step=1&amp;backto=<?php echo $goback; ?>"><?php _e( 'Update WordPress Database' ); ?></a></p>
    105 <?php
     105            <?php
    106106            break;
    107107        case 1:
     
    111111            $backto = esc_url( $backto );
    112112            $backto = wp_validate_redirect( $backto, __get_option( 'home' ) . '/' );
    113     ?>
     113            ?>
    114114    <h1><?php _e( 'Update Complete' ); ?></h1>
    115115    <p><?php _e( 'Your WordPress database has been successfully updated!' ); ?></p>
     
    118118<!--
    119119<pre>
    120 <?php printf( __( '%s queries' ), $wpdb->num_queries ); ?>
     120            <?php printf( __( '%s queries' ), $wpdb->num_queries ); ?>
    121121
    122 <?php printf( __( '%s seconds' ), timer_stop( 0 ) ); ?>
     122            <?php printf( __( '%s seconds' ), timer_stop( 0 ) ); ?>
    123123</pre>
    124124-->
    125125
    126 <?php
     126            <?php
    127127            break;
    128128endswitch;
Note: See TracChangeset for help on using the changeset viewer.