Make WordPress Core


Ignore:
Timestamp:
08/15/2018 06:22:00 AM (8 years ago)
Author:
pento
Message:

Coding Standards: Prepare for upgrading WPCS to 1.0.0.

In order to get the best result when running phpcbf across the codebase, there are some manual tweaks we need to make.

These fall into three categories:

  • Fixing incorrectly indented code which has flow-on effects when auto-fixing.
  • Tweaking the layout of inline PHP inside HTML tags.
  • Moving more complex inline PHP inside HTML tags, to execute earlier.

See #44600.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r43568 r43569  
    18181818        _e( 'If you do not remember your credentials, you should contact your web host.' );
    18191819
     1820        $hostname_value = esc_attr( $hostname );
     1821        if ( ! empty( $port ) ) {
     1822                $hostname_value .= ":$port";
     1823        }
     1824
    18201825        $password_value = '';
    1821 if ( defined( 'FTP_PASS' ) ) {
    1822         $password_value = '*****';
    1823 }
     1826        if ( defined( 'FTP_PASS' ) ) {
     1827                $password_value = '*****';
     1828        }
    18241829?>
    18251830</p>
    18261831<label for="hostname">
    18271832        <span class="field-title"><?php _e( 'Hostname' ); ?></span>
    1828         <input name="hostname" type="text" id="hostname" aria-describedby="request-filesystem-credentials-desc" class="code" placeholder="<?php esc_attr_e( 'example: www.wordpress.org' ); ?>" value="
    1829                                                                                                                                                                                                                                                                                                                 <?php
    1830                                                                                                                                                                                                                                                                                                                 echo esc_attr( $hostname );
    1831                                                                                                                                                                                                                                                                                                                 if ( ! empty( $port ) ) {
    1832                                                                                                                                                                                                                                                                                                                         echo ":$port";}
    1833 ?>
    1834 "<?php disabled( defined( 'FTP_HOST' ) ); ?> />
     1833        <input name="hostname" type="text" id="hostname" aria-describedby="request-filesystem-credentials-desc" class="code" placeholder="<?php esc_attr_e( 'example: www.wordpress.org' ); ?>" value="<?php echo $hostname_value; ?>"<?php disabled( defined( 'FTP_HOST' ) ); ?> />
    18351834</label>
    18361835<div class="ftp-username">
     
    18591858        ?>
    18601859        <label for="<?php echo esc_attr( $name ); ?>">
    1861                 <input type="radio" name="connection_type" id="<?php echo esc_attr( $name ); ?>" value="<?php echo esc_attr( $name ); ?>"
    1862                                                                                                                                         <?php
    1863                                                                                                                                         checked( $name, $connection_type );
    1864                                                                                                                                         echo $disabled;
    1865 ?>
    1866  />
     1860                <input type="radio" name="connection_type" id="<?php echo esc_attr( $name ); ?>" value="<?php echo esc_attr( $name ); ?>" <?php checked( $name, $connection_type ); ?> <?php echo $disabled; ?> />
    18671861                <?php echo $text; ?>
    18681862        </label>
Note: See TracChangeset for help on using the changeset viewer.