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

    r42343 r43571  
    99// Sanity check.
    1010if ( false ) {
    11 ?>
     11    ?>
    1212<!DOCTYPE html>
    1313<html xmlns="http://www.w3.org/1999/xhtml">
     
    2222</body>
    2323</html>
    24 <?php
     24    <?php
    2525}
    2626
     
    6464        $body_classes = ' ' . $body_classes;
    6565    }
    66 ?>
     66    ?>
    6767<!DOCTYPE html>
    6868<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
     
    8080<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
    8181
    82 <?php
     82    <?php
    8383} // end display_header()
    8484
     
    109109
    110110    if ( ! is_null( $error ) ) {
    111 ?>
     111        ?>
    112112<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
    113113<p class="message"><?php echo $error; ?></p>
     
    130130                <input name="user_name" type="text" id="user_login" size="25" value="<?php echo esc_attr( sanitize_user( $user_name, true ) ); ?>" />
    131131                <p><?php _e( 'Usernames can have only alphanumeric characters, spaces, underscores, hyphens, periods, and the @ symbol.' ); ?></p>
    132             <?php
     132                <?php
    133133            }
    134134            ?>
     
    190190                    <?php
    191191                    if ( has_action( 'blog_privacy_selector' ) ) {
    192                     ?>
     192                        ?>
    193193                        <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked( 1, $blog_public ); ?> />
    194194                        <label for="blog-public"><?php _e( 'Allow search engines to index this site' ); ?></label><br/>
     
    200200                        do_action( 'blog_privacy_selector' );
    201201                    } else {
    202                     ?>
     202                        ?>
    203203                        <label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( 0, $blog_public ); ?> />
    204204                        <?php _e( 'Discourage search engines from indexing this site' ); ?></label>
     
    212212    <input type="hidden" name="language" value="<?php echo isset( $_REQUEST['language'] ) ? esc_attr( $_REQUEST['language'] ) : ''; ?>" />
    213213</form>
    214 <?php
     214    <?php
    215215} // end display_setup_form()
    216216
     
    318318
    319319        display_header();
    320 ?>
     320        ?>
    321321<h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1>
    322322<p><?php _e( 'Welcome to the famous five-minute WordPress installation process! Just fill in the information below and you&#8217;ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ); ?></p>
     
    325325<p><?php _e( 'Please provide the following information. Don&#8217;t worry, you can always change these settings later.' ); ?></p>
    326326
    327 <?php
     327        <?php
    328328        display_setup_form();
    329329        break;
     
    377377            $wpdb->show_errors();
    378378            $result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );
    379 ?>
     379            ?>
    380380
    381381<h1><?php _e( 'Success!' ); ?></h1>
     
    391391        <th><?php _e( 'Password' ); ?></th>
    392392        <td>
    393         <?php
    394         if ( ! empty( $result['password'] ) && empty( $admin_password_check ) ) :
    395         ?>
     393            <?php
     394            if ( ! empty( $result['password'] ) && empty( $admin_password_check ) ) :
     395                ?>
    396396            <code><?php echo esc_html( $result['password'] ); ?></code><br />
    397397        <?php endif ?>
     
    403403<p class="step"><a href="<?php echo esc_url( wp_login_url() ); ?>" class="button button-large"><?php _e( 'Log In' ); ?></a></p>
    404404
    405 <?php
     405            <?php
    406406        }
    407407        break;
Note: See TracChangeset for help on using the changeset viewer.