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-content/themes/twentyeleven/inc/theme-options.php

    r42343 r43571  
    275275
    276276    foreach ( twentyeleven_color_schemes() as $scheme ) {
    277     ?>
     277        ?>
    278278    <div class="layout image-radio-option color-scheme">
    279279    <label class="description">
     
    286286    </label>
    287287    </div>
    288     <?php
     288        <?php
    289289    }
    290290}
     
    439439        return;
    440440    }
    441 ?>
     441    ?>
    442442    <style>
    443443        /* Link color */
     
    467467        }
    468468    </style>
    469 <?php
     469    <?php
    470470}
    471471add_action( 'wp_head', 'twentyeleven_print_link_color_style' );
     
    524524    if ( isset( $wp_customize->selective_refresh ) ) {
    525525        $wp_customize->selective_refresh->add_partial(
    526             'blogname', array(
     526            'blogname',
     527            array(
    527528                'selector'            => '#site-title a',
    528529                'container_inclusive' => false,
     
    531532        );
    532533        $wp_customize->selective_refresh->add_partial(
    533             'blogdescription', array(
     534            'blogdescription',
     535            array(
    534536                'selector'            => '#site-description',
    535537                'container_inclusive' => false,
     
    543545
    544546    $wp_customize->add_setting(
    545         'twentyeleven_theme_options[color_scheme]', array(
     547        'twentyeleven_theme_options[color_scheme]',
     548        array(
    546549            'default'    => $defaults['color_scheme'],
    547550            'type'       => 'option',
     
    557560
    558561    $wp_customize->add_control(
    559         'twentyeleven_color_scheme', array(
     562        'twentyeleven_color_scheme',
     563        array(
    560564            'label'    => __( 'Color Scheme', 'twentyeleven' ),
    561565            'section'  => 'colors',
     
    569573    // Link Color (added to Color Scheme section in Customizer)
    570574    $wp_customize->add_setting(
    571         'twentyeleven_theme_options[link_color]', array(
     575        'twentyeleven_theme_options[link_color]',
     576        array(
    572577            'default'           => twentyeleven_get_default_link_color( $options['color_scheme'] ),
    573578            'type'              => 'option',
     
    579584    $wp_customize->add_control(
    580585        new WP_Customize_Color_Control(
    581             $wp_customize, 'link_color', array(
     586            $wp_customize,
     587            'link_color',
     588            array(
    582589                'label'    => __( 'Link Color', 'twentyeleven' ),
    583590                'section'  => 'colors',
     
    589596    // Default Layout
    590597    $wp_customize->add_section(
    591         'twentyeleven_layout', array(
     598        'twentyeleven_layout',
     599        array(
    592600            'title'    => __( 'Layout', 'twentyeleven' ),
    593601            'priority' => 50,
     
    596604
    597605    $wp_customize->add_setting(
    598         'twentyeleven_theme_options[theme_layout]', array(
     606        'twentyeleven_theme_options[theme_layout]',
     607        array(
    599608            'type'              => 'option',
    600609            'default'           => $defaults['theme_layout'],
     
    610619
    611620    $wp_customize->add_control(
    612         'twentyeleven_theme_options[theme_layout]', array(
     621        'twentyeleven_theme_options[theme_layout]',
     622        array(
    613623            'section' => 'twentyeleven_layout',
    614624            'type'    => 'radio',
Note: See TracChangeset for help on using the changeset viewer.