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

    r42343 r43571  
    5353            echo $args['before_title'] . $title . $args['after_title'];
    5454        }
    55             ?>
     55        ?>
    5656            <ul>
    5757            <?php wp_register(); ?>
     
    7070             */
    7171            echo apply_filters(
    72                 'widget_meta_poweredby', sprintf(
     72                'widget_meta_poweredby',
     73                sprintf(
    7374                    '<li><a href="%s" title="%s">%s</a></li>',
    7475                    esc_url( __( 'https://wordpress.org/' ) ),
    7576                    esc_attr__( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.' ),
    7677                    _x( 'WordPress.org', 'meta widget link text' )
    77                 ), $instance
     78                ),
     79                $instance
    7880            );
    7981
     
    113115        $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
    114116        $title    = sanitize_text_field( $instance['title'] );
    115 ?>
     117        ?>
    116118            <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
    117 <?php
     119        <?php
    118120    }
    119121}
Note: See TracChangeset for help on using the changeset viewer.