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/inc/customizer.php

    r42343 r43571  
    2323    if ( isset( $wp_customize->selective_refresh ) ) {
    2424        $wp_customize->selective_refresh->add_partial(
    25             'blogname', array(
     25            'blogname',
     26            array(
    2627                'selector'            => '.site-title a',
    2728                'container_inclusive' => false,
     
    3031        );
    3132        $wp_customize->selective_refresh->add_partial(
    32             'blogdescription', array(
     33            'blogdescription',
     34            array(
    3335                'selector'            => '.site-description',
    3436                'container_inclusive' => false,
     
    4042    // Add color scheme setting and control.
    4143    $wp_customize->add_setting(
    42         'color_scheme', array(
     44        'color_scheme',
     45        array(
    4346            'default'           => 'default',
    4447            'sanitize_callback' => 'twentyfifteen_sanitize_color_scheme',
     
    4851
    4952    $wp_customize->add_control(
    50         'color_scheme', array(
     53        'color_scheme',
     54        array(
    5155            'label'    => __( 'Base Color Scheme', 'twentyfifteen' ),
    5256            'section'  => 'colors',
     
    5963    // Add custom header and sidebar text color setting and control.
    6064    $wp_customize->add_setting(
    61         'sidebar_textcolor', array(
     65        'sidebar_textcolor',
     66        array(
    6267            'default'           => $color_scheme[4],
    6368            'sanitize_callback' => 'sanitize_hex_color',
     
    6873    $wp_customize->add_control(
    6974        new WP_Customize_Color_Control(
    70             $wp_customize, 'sidebar_textcolor', array(
     75            $wp_customize,
     76            'sidebar_textcolor',
     77            array(
    7178                'label'       => __( 'Header and Sidebar Text Color', 'twentyfifteen' ),
    7279                'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
     
    8188    // Add custom header and sidebar background color setting and control.
    8289    $wp_customize->add_setting(
    83         'header_background_color', array(
     90        'header_background_color',
     91        array(
    8492            'default'           => $color_scheme[1],
    8593            'sanitize_callback' => 'sanitize_hex_color',
     
    9098    $wp_customize->add_control(
    9199        new WP_Customize_Color_Control(
    92             $wp_customize, 'header_background_color', array(
     100            $wp_customize,
     101            'header_background_color',
     102            array(
    93103                'label'       => __( 'Header and Sidebar Background Color', 'twentyfifteen' ),
    94104                'description' => __( 'Applied to the header on small screens and the sidebar on wide screens.', 'twentyfifteen' ),
     
    167177     */
    168178    return apply_filters(
    169         'twentyfifteen_color_schemes', array(
     179        'twentyfifteen_color_schemes',
     180        array(
    170181            'default' => array(
    171182                'label'  => __( 'Default', 'twentyfifteen' ),
     
    372383function twentyfifteen_get_color_scheme_css( $colors ) {
    373384    $colors = wp_parse_args(
    374         $colors, array(
     385        $colors,
     386        array(
    375387            'background_color'            => '',
    376388            'header_background_color'     => '',
Note: See TracChangeset for help on using the changeset viewer.