Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (8 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/twentyfourteen/inc/featured-content.php

    r42749 r43571  
    377377        public static function customize_register( $wp_customize ) {
    378378                $wp_customize->add_section(
    379                         'featured_content', array(
     379                        'featured_content',
     380                        array(
    380381                                'title'          => __( 'Featured Content', 'twentyfourteen' ),
    381382                                'description'    => sprintf(
    … …  
    391392                // Add Featured Content settings.
    392393                $wp_customize->add_setting(
    393                         'featured-content[tag-name]', array(
     394                        'featured-content[tag-name]',
     395                        array(
    394396                                'default'              => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ),
    395397                                'type'                 => 'option',
    … …  
    398400                );
    399401                $wp_customize->add_setting(
    400                         'featured-content[hide-tag]', array(
     402                        'featured-content[hide-tag]',
     403                        array(
    401404                                'default'              => true,
    402405                                'type'                 => 'option',
    … …  
    407410                // Add Featured Content controls.
    408411                $wp_customize->add_control(
    409                         'featured-content[tag-name]', array(
     412                        'featured-content[tag-name]',
     413                        array(
    410414                                'label'    => __( 'Tag Name', 'twentyfourteen' ),
    411415                                'section'  => 'featured_content',
    … …  
    414418                );
    415419                $wp_customize->add_control(
    416                         'featured-content[hide-tag]', array(
     420                        'featured-content[hide-tag]',
     421                        array(
    417422                                'label'    => __( 'Don’t display tag on front end.', 'twentyfourteen' ),
    418423                                'section'  => 'featured_content',
Note: See TracChangeset for help on using the changeset viewer.