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

    r42343 r43571  
    4141
    4242    wp_localize_script(
    43         'media-grid', '_wpMediaGridSettings', array(
     43        'media-grid',
     44        '_wpMediaGridSettings',
     45        array(
    4446            'adminUrl'  => parse_url( self_admin_url(), PHP_URL_PATH ),
    4547            'queryVars' => (object) $vars,
     
    8587        <?php
    8688        if ( current_user_can( 'upload_files' ) ) {
    87         ?>
     89            ?>
    8890            <a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action aria-button-if-js"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
    8991                                <?php
     
    161163                    'trashed' => count( $post_ids ),
    162164                    'ids'     => join( ',', $post_ids ),
    163                 ), $location
     165                ),
     166                $location
    164167            );
    165168            break;
     
    264267<?php
    265268if ( current_user_can( 'upload_files' ) ) {
    266 ?>
     269    ?>
    267270    <a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
    268271                        <?php
     
    352355
    353356if ( ! empty( $message ) ) {
    354 ?>
     357    ?>
    355358<div id="message" class="updated notice is-dismissible"><p><?php echo $message; ?></p></div>
    356359<?php } ?>
Note: See TracChangeset for help on using the changeset viewer.