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

    r43275 r43571  
    682682            array(
    683683                array_merge(
    684                     $sidebar, array(
     684                    $sidebar,
     685                    array(
    685686                        'widget_id'   => $id,
    686687                        'widget_name' => $wp_registered_widgets[ $id ]['name'],
     
    15741575    $esc_number = esc_attr( $args['number'] );
    15751576    if ( $inputs['url'] ) :
    1576 ?>
     1577        ?>
    15771578    <p><label for="rss-url-<?php echo $esc_number; ?>"><?php _e( 'Enter the RSS feed URL here:' ); ?></label>
    15781579    <input class="widefat" id="rss-url-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][url]" type="text" value="<?php echo esc_url( $args['url'] ); ?>" /></p>
     
    15981599    <p><input id="rss-show-date-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][show_date]" type="checkbox" value="1" <?php checked( $args['show_date'] ); ?>/>
    15991600    <label for="rss-show-date-<?php echo $esc_number; ?>"><?php _e( 'Display item date?' ); ?></label></p>
    1600 <?php
     1601    <?php
    16011602    endif;
    16021603foreach ( array_keys( $default_inputs ) as $input ) :
    16031604    if ( 'hidden' === $inputs[ $input ] ) :
    16041605        $id = str_replace( '_', '-', $input );
    1605 ?>
     1606        ?>
    16061607<input type="hidden" id="rss-<?php echo esc_attr( $id ); ?>-<?php echo $esc_number; ?>" name="widget-rss[<?php echo $esc_number; ?>][<?php echo esc_attr( $input ); ?>]" value="<?php echo esc_attr( $args[ $input ] ); ?>" />
    1607 <?php
     1608        <?php
    16081609    endif;
    16091610    endforeach;
Note: See TracChangeset for help on using the changeset viewer.