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/network/site-settings.php

    r42343 r43571  
    6666                'update' => 'updated',
    6767                'id'     => $id,
    68             ), 'site-settings.php'
     68            ),
     69            'site-settings.php'
    6970        )
    7071    );
     
    139140            }
    140141            if ( strpos( $option->option_value, "\n" ) !== false ) {
    141             ?>
     142                ?>
    142143                <tr class="form-field">
    143144                    <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>"><?php echo ucwords( str_replace( '_', ' ', $option->option_name ) ); ?></label></th>
    144145                    <td><textarea class="<?php echo $class; ?>" rows="5" cols="40" name="option[<?php echo esc_attr( $option->option_name ); ?>]" id="<?php echo esc_attr( $option->option_name ); ?>"<?php disabled( $disabled ); ?>><?php echo esc_textarea( $option->option_value ); ?></textarea></td>
    145146                </tr>
    146             <?php
     147                <?php
    147148            } else {
    148             ?>
     149                ?>
    149150                <tr class="form-field">
    150151                    <th scope="row"><label for="<?php echo esc_attr( $option->option_name ); ?>"><?php echo esc_html( ucwords( str_replace( '_', ' ', $option->option_name ) ) ); ?></label></th>
     
    155156                    <?php } ?>
    156157                </tr>
    157             <?php
     158                <?php
    158159            }
    159160        } // End foreach
Note: See TracChangeset for help on using the changeset viewer.