Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 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-includes/class-wp-theme.php

    r43027 r43571  
    232232            $this->template = $this->stylesheet;
    233233            $this->cache_add(
    234                 'theme', array(
     234                'theme',
     235                array(
    235236                    'headers'    => $this->headers,
    236237                    'errors'     => $this->errors,
     
    248249            $this->template        = $this->stylesheet;
    249250            $this->cache_add(
    250                 'theme', array(
     251                'theme',
     252                array(
    251253                    'headers'    => $this->headers,
    252254                    'errors'     => $this->errors,
     
    271273            $this->errors = new WP_Error( 'theme_child_invalid', sprintf( __( 'The theme defines itself as its parent theme. Please check the %s header.' ), '<code>Template</code>' ) );
    272274            $this->cache_add(
    273                 'theme', array(
     275                'theme',
     276                array(
    274277                    'headers'    => $this->headers,
    275278                    'errors'     => $this->errors,
     
    294297                $this->errors = new WP_Error( 'theme_no_index', $error_message );
    295298                $this->cache_add(
    296                     'theme', array(
     299                    'theme',
     300                    array(
    297301                        'headers'    => $this->headers,
    298302                        'errors'     => $this->errors,
     
    320324                $this->errors = new WP_Error( 'theme_no_parent', sprintf( __( 'The parent theme is missing. Please install the "%s" parent theme.' ), esc_html( $this->template ) ) );
    321325                $this->cache_add(
    322                     'theme', array(
     326                    'theme',
     327                    array(
    323328                        'headers'    => $this->headers,
    324329                        'errors'     => $this->errors,
     
    339344                $_child->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), esc_html( $_child->template ) ) );
    340345                $_child->cache_add(
    341                     'theme', array(
     346                    'theme',
     347                    array(
    342348                        'headers'    => $_child->headers,
    343349                        'errors'     => $_child->errors,
     
    350356                    $this->errors = new WP_Error( 'theme_parent_invalid', sprintf( __( 'The "%s" theme is not a valid parent theme.' ), esc_html( $this->template ) ) );
    351357                    $this->cache_add(
    352                         'theme', array(
     358                        'theme',
     359                        array(
    353360                            'headers'    => $this->headers,
    354361                            'errors'     => $this->errors,
Note: See TracChangeset for help on using the changeset viewer.