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/widgets.php

    r42343 r43571  
    2020    function __construct() {
    2121        parent::__construct(
    22             'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), array(
     22            'widget_twentyeleven_ephemera',
     23            __( 'Twenty Eleven Ephemera', 'twentyeleven' ),
     24            array(
    2325                'classname'                   => 'widget_twentyeleven_ephemera',
    2426                'description'                 => __( 'Use this widget to list your recent Aside, Status, Quote, and Link posts', 'twentyeleven' ),
     
    107109            while ( $ephemera->have_posts() ) :
    108110                $ephemera->the_post();
    109 ?>
     111                ?>
    110112
    111113                <?php if ( 'link' != get_post_format() ) : ?>
     
    189191        $title  = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
    190192        $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 10;
    191 ?>
     193        ?>
    192194            <p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'twentyeleven' ); ?></label>
    193195            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
Note: See TracChangeset for help on using the changeset viewer.