Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (7 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/setup-config.php

    r43205 r43571  
    103103
    104104    header( 'Content-Type: text/html; charset=utf-8' );
    105 ?>
     105    ?>
    106106<!DOCTYPE html>
    107107<html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>>
     
    115115<body class="<?php echo implode( ' ', $body_classes ); ?>">
    116116<p id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>" tabindex="-1"><?php _e( 'WordPress' ); ?></a></p>
    117 <?php
     117    <?php
    118118} // end function setup_config_display_header();
    119119
     
    155155            $step_1 .= '&amp;language=' . $loaded_language;
    156156        }
    157 ?>
     157        ?>
    158158<h1 class="screen-reader-text"><?php _e( 'Before getting started' ); ?></h1>
    159159<p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ); ?></p>
     
    166166</ol>
    167167<p>
    168 <?php
    169     /* translators: %s: wp-config.php */
    170     printf(
    171         __( 'We&#8217;re going to use this information to create a %s file.' ),
    172         '<code>wp-config.php</code>'
    173     );
    174     ?>
     168        <?php
     169        /* translators: %s: wp-config.php */
     170        printf(
     171            __( 'We&#8217;re going to use this information to create a %s file.' ),
     172            '<code>wp-config.php</code>'
     173        );
     174        ?>
    175175    <strong>
    176     <?php
     176        <?php
    177177        /* translators: 1: wp-config-sample.php, 2: wp-config.php */
    178178        printf(
     
    181181            '<code>wp-config.php</code>'
    182182        );
    183     ?>
     183        ?>
    184184    </strong>
    185     <?php
    186     /* translators: %s: Codex URL */
    187     printf(
    188         __( 'Need more help? <a href="%s">We got it</a>.' ),
    189         __( 'https://codex.wordpress.org/Editing_wp-config.php' )
    190     );
    191 ?>
     185        <?php
     186        /* translators: %s: Codex URL */
     187        printf(
     188            __( 'Need more help? <a href="%s">We got it</a>.' ),
     189            __( 'https://codex.wordpress.org/Editing_wp-config.php' )
     190        );
     191        ?>
    192192</p>
    193193<p><?php _e( 'In all likelihood, these items were supplied to you by your Web Host. If you don&#8217;t have this information, then you will need to contact them before you can continue. If you&#8217;re all ready&hellip;' ); ?></p>
    194194
    195195<p class="step"><a href="<?php echo $step_1; ?>" class="button button-large"><?php _e( 'Let&#8217;s go!' ); ?></a></p>
    196 <?php
     196        <?php
    197197        break;
    198198
     
    202202
    203203        setup_config_display_header();
    204     ?>
     204        ?>
    205205<h1 class="screen-reader-text"><?php _e( 'Set up your database connection' ); ?></h1>
    206206<form method="post" action="setup-config.php?step=2">
     
    238238        </tr>
    239239    </table>
    240     <?php
    241     if ( isset( $_GET['noapi'] ) ) {
    242 ?>
     240        <?php
     241        if ( isset( $_GET['noapi'] ) ) {
     242            ?>
    243243<input name="noapi" type="hidden" value="1" /><?php } ?>
    244244    <input type="hidden" name="language" value="<?php echo esc_attr( $language ); ?>" />
    245245    <p class="step"><input name="submit" type="submit" value="<?php echo htmlspecialchars( __( 'Submit' ), ENT_QUOTES ); ?>" class="button button-large" /></p>
    246246</form>
    247 <?php
     247        <?php
    248248        break;
    249249
     
    388388        if ( ! is_writable( ABSPATH ) ) :
    389389            setup_config_display_header();
    390     ?>
     390            ?>
    391391    <p>
    392 <?php
    393     /* translators: %s: wp-config.php */
    394     printf( __( 'Sorry, but I can&#8217;t write the %s file.' ), '<code>wp-config.php</code>' );
    395 ?>
     392            <?php
     393            /* translators: %s: wp-config.php */
     394            printf( __( 'Sorry, but I can&#8217;t write the %s file.' ), '<code>wp-config.php</code>' );
     395            ?>
    396396</p>
    397397<p>
    398 <?php
    399     /* translators: %s: wp-config.php */
    400     printf( __( 'You can create the %s file manually and paste the following text into it.' ), '<code>wp-config.php</code>' );
    401 
    402     $config_text = '';
    403 
    404     foreach ( $config_file as $line ) {
    405         $config_text .= htmlentities( $line, ENT_COMPAT, 'UTF-8' );
    406     }
    407 ?>
     398            <?php
     399            /* translators: %s: wp-config.php */
     400            printf( __( 'You can create the %s file manually and paste the following text into it.' ), '<code>wp-config.php</code>' );
     401
     402            $config_text = '';
     403
     404            foreach ( $config_file as $line ) {
     405                $config_text .= htmlentities( $line, ENT_COMPAT, 'UTF-8' );
     406            }
     407            ?>
    408408</p>
    409409<textarea id="wp-config" cols="98" rows="15" class="code" readonly="readonly"><?php echo $config_text; ?></textarea>
     
    419419})();
    420420</script>
    421 <?php
     421            <?php
    422422    else :
    423423        /*
     
    438438        chmod( $path_to_wp_config, 0666 );
    439439        setup_config_display_header();
    440 ?>
     440        ?>
    441441<h1 class="screen-reader-text"><?php _e( 'Successful database connection' ); ?></h1>
    442442<p><?php _e( 'All right, sparky! You&#8217;ve made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to&hellip;' ); ?></p>
    443443
    444444<p class="step"><a href="<?php echo $install; ?>" class="button button-large"><?php _e( 'Run the installation' ); ?></a></p>
    445 <?php
     445        <?php
    446446    endif;
    447447        break;
Note: See TracChangeset for help on using the changeset viewer.