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-content/themes/twentyfifteen/functions.php

    r42343 r43571  
    9494         */
    9595        add_theme_support(
    96             'html5', array(
     96            'html5',
     97            array(
    9798                'search-form',
    9899                'comment-form',
     
    109110         */
    110111        add_theme_support(
    111             'post-formats', array(
     112            'post-formats',
     113            array(
    112114                'aside',
    113115                'image',
     
    128130         */
    129131        add_theme_support(
    130             'custom-logo', array(
     132            'custom-logo',
     133            array(
    131134                'height'      => 248,
    132135                'width'       => 248,
     
    153156         */
    154157        add_theme_support(
    155             'custom-background', apply_filters(
    156                 'twentyfifteen_custom_background_args', array(
     158            'custom-background',
     159            apply_filters(
     160                'twentyfifteen_custom_background_args',
     161                array(
    157162                    'default-color'      => $default_color,
    158163                    'default-attachment' => 'fixed',
     
    253258                    'family' => urlencode( implode( '|', $fonts ) ),
    254259                    'subset' => urlencode( $subsets ),
    255                 ), 'https://fonts.googleapis.com/css'
     260                ),
     261                'https://fonts.googleapis.com/css'
    256262            );
    257263        }
     
    308314    wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
    309315    wp_localize_script(
    310         'twentyfifteen-script', 'screenReaderText', array(
     316        'twentyfifteen-script',
     317        'screenReaderText',
     318        array(
    311319            'expand'   => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>',
    312320            'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>',
Note: See TracChangeset for help on using the changeset viewer.