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. Built from https://develop.svn.wordpress.org/trunk@43571 git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -78,7 +78,7 @@ if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) {
|
||||
<p><?php _e( 'Your WordPress database is already up-to-date!' ); ?></p>
|
||||
<p class="step"><a class="button button-large" href="<?php echo get_option( 'home' ); ?>/"><?php _e( 'Continue' ); ?></a></p>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
elseif ( ! $php_compat || ! $mysql_compat ) :
|
||||
if ( ! $mysql_compat && ! $php_compat ) {
|
||||
printf( __( 'You cannot update because <a href="https://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version );
|
||||
@@ -87,8 +87,8 @@ elseif ( ! $php_compat || ! $mysql_compat ) :
|
||||
} elseif ( ! $mysql_compat ) {
|
||||
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 );
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
?>
|
||||
<?php
|
||||
else :
|
||||
switch ( $step ) :
|
||||
case 0:
|
||||
@@ -97,12 +97,12 @@ else :
|
||||
$goback = esc_url_raw( $goback );
|
||||
$goback = urlencode( $goback );
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<h1><?php _e( 'Database Update Required' ); ?></h1>
|
||||
<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>
|
||||
<p><?php _e( 'The database update process may take a little while, so please be patient.' ); ?></p>
|
||||
<p class="step"><a class="button button-large button-primary" href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e( 'Update WordPress Database' ); ?></a></p>
|
||||
<?php
|
||||
<?php
|
||||
break;
|
||||
case 1:
|
||||
wp_upgrade();
|
||||
@@ -110,20 +110,20 @@ else :
|
||||
$backto = ! empty( $_GET['backto'] ) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';
|
||||
$backto = esc_url( $backto );
|
||||
$backto = wp_validate_redirect( $backto, __get_option( 'home' ) . '/' );
|
||||
?>
|
||||
?>
|
||||
<h1><?php _e( 'Update Complete' ); ?></h1>
|
||||
<p><?php _e( 'Your WordPress database has been successfully updated!' ); ?></p>
|
||||
<p class="step"><a class="button button-large" href="<?php echo $backto; ?>"><?php _e( 'Continue' ); ?></a></p>
|
||||
|
||||
<!--
|
||||
<pre>
|
||||
<?php printf( __( '%s queries' ), $wpdb->num_queries ); ?>
|
||||
<?php printf( __( '%s queries' ), $wpdb->num_queries ); ?>
|
||||
|
||||
<?php printf( __( '%s seconds' ), timer_stop( 0 ) ); ?>
|
||||
<?php printf( __( '%s seconds' ), timer_stop( 0 ) ); ?>
|
||||
</pre>
|
||||
-->
|
||||
|
||||
<?php
|
||||
<?php
|
||||
break;
|
||||
endswitch;
|
||||
endif;
|
||||
|
||||
Reference in New Issue
Block a user