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-admin/includes/post.php

    r43338 r43571  
    240240    if ( post_type_supports( $ptype->name, 'revisions' ) ) {
    241241        $revisions = wp_get_post_revisions(
    242             $post_ID, array(
     242            $post_ID,
     243            array(
    243244                'order'          => 'ASC',
    244245                'posts_per_page' => 1,
     
    956957            "SELECT meta_key, meta_value, meta_id, post_id
    957958            FROM $wpdb->postmeta WHERE post_id = %d
    958             ORDER BY meta_key,meta_id", $postid
    959         ), ARRAY_A
     959            ORDER BY meta_key,meta_id",
     960            $postid
     961        ),
     962        ARRAY_A
    960963    );
    961964}
     
    17021705        <?php if ( $preview_link ) { ?>
    17031706        <a class="button<?php echo $tab_last; ?>" href="<?php echo esc_url( $preview_link ); ?>"><?php _e( 'Preview' ); ?></a>
    1704         <?php
     1707            <?php
    17051708}
    17061709
     
    17121715}
    17131716
    1714         ?>
     1717?>
    17151718        </p>
    17161719        </div>
     
    20032006
    20042007        $_term = get_terms(
    2005             $taxonomy, array(
     2008            $taxonomy,
     2009            array(
    20062010                'name'       => $term,
    20072011                'fields'     => 'ids',
Note: See TracChangeset for help on using the changeset viewer.