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-includes/widgets/class-wp-widget-pages.php

    r42343 r43571  
    7474        $out = wp_list_pages(
    7575            apply_filters(
    76                 'widget_pages_args', array(
     76                'widget_pages_args',
     77                array(
    7778                    'title_li'    => '',
    7879                    'echo'        => 0,
    7980                    'sort_column' => $sortby,
    8081                    'exclude'     => $exclude,
    81                 ), $instance
     82                ),
     83                $instance
    8284            )
    8385        );
     
    8890                echo $args['before_title'] . $title . $args['after_title'];
    8991            }
    90         ?>
     92            ?>
    9193        <ul>
    9294            <?php echo $out; ?>
    9395        </ul>
    94         <?php
     96            <?php
    9597            echo $args['after_widget'];
    9698        }
     
    131133        //Defaults
    132134        $instance = wp_parse_args(
    133             (array) $instance, array(
     135            (array) $instance,
     136            array(
    134137                'sortby'  => 'post_title',
    135138                'title'   => '',
Note: See TracChangeset for help on using the changeset viewer.