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/twentyfourteen/functions.php

    r42343 r43571  
    9292         */
    9393        add_theme_support(
    94             'html5', array(
     94            'html5',
     95            array(
    9596                'search-form',
    9697                'comment-form',
     
    106107         */
    107108        add_theme_support(
    108             'post-formats', array(
     109            'post-formats',
     110            array(
    109111                'aside',
    110112                'image',
     
    119121        // This theme allows users to set a custom background.
    120122        add_theme_support(
    121             'custom-background', apply_filters(
    122                 'twentyfourteen_custom_background_args', array(
     123            'custom-background',
     124            apply_filters(
     125                'twentyfourteen_custom_background_args',
     126                array(
    123127                    'default-color' => 'f5f5f5',
    124128                )
     
    128132        // Add support for featured content.
    129133        add_theme_support(
    130             'featured-content', array(
     134            'featured-content',
     135            array(
    131136                'featured_content_filter' => 'twentyfourteen_get_featured_posts',
    132137                'max_posts'               => 6,
     
    287292        wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131205', true );
    288293        wp_localize_script(
    289             'twentyfourteen-slider', 'featuredSliderDefaults', array(
     294            'twentyfourteen-slider',
     295            'featuredSliderDefaults',
     296            array(
    290297                'prevText' => __( 'Previous', 'twentyfourteen' ),
    291298                'nextText' => __( 'Next', 'twentyfourteen' ),
     
    424431                continue;
    425432            }
    426         ?>
     433            ?>
    427434
    428435        <div class="contributor">
     
    441448    </div><!-- .contributor -->
    442449
    443     <?php
     450            <?php
    444451    endforeach;
    445452    }
Note: See TracChangeset for help on using the changeset viewer.