WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (9 months 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-includes/widgets/class-wp-widget-media.php

    r42343 r43571  
    5656    public function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) {
    5757        $widget_opts = wp_parse_args(
    58             $widget_options, array(
     58            $widget_options,
     59            array(
    5960                'description'                 => __( 'A media item.' ),
    6061                'customize_selective_refresh' => true,
     
    8182            'unsupported_file_type'      => __( 'Looks like this isn’t the correct kind of file. Please link to an appropriate file instead.' ),
    8283        );
    83         $this->l10n = array_merge( $l10n_defaults, array_filter( $this->l10n ) );
     84        $this->l10n    = array_merge( $l10n_defaults, array_filter( $this->l10n ) );
    8485
    8586        parent::__construct(
     
    339340                value="<?php echo esc_attr( is_array( $value ) ? join( ',', $value ) : strval( $value ) ); ?>"
    340341            />
    341         <?php
     342            <?php
    342343        endforeach;
    343344    }
Note: See TracChangeset for help on using the changeset viewer.