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/class-wp-ms-sites-list-table.php

    r43382 r43571  
    177177        $total_sites = get_sites(
    178178            array_merge(
    179                 $args, array(
     179                $args,
     180                array(
    180181                    'count'  => true,
    181182                    'offset' => 0,
     
    276277        if ( ! is_main_site( $blog['blog_id'] ) ) :
    277278            $blogname = untrailingslashit( $blog['domain'] . $blog['path'] );
    278         ?>
     279            ?>
    279280            <label class="screen-reader-text" for="blog_<?php echo $blog['blog_id']; ?>">
    280281                                                                    <?php
    281282                                                                    printf( __( 'Select %s' ), $blogname );
    282             ?>
     283                                                                    ?>
    283284            </label>
    284285            <input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]" value="<?php echo esc_attr( $blog['blog_id'] ); ?>" />
    285         <?php
     286            <?php
    286287        endif;
    287288    }
     
    407408        $user_count = wp_cache_get( $blog['blog_id'] . '_user_count', 'blog-details' );
    408409        if ( ! $user_count ) {
    409             $blog_users = new WP_User_Query( array(
    410                 'blog_id'     => $blog['blog_id'],
    411                 'fields'      => 'ID',
    412                 'number'      => 1,
    413                 'count_total' => true,
    414             ) );
     410            $blog_users = new WP_User_Query(
     411                array(
     412                    'blog_id'     => $blog['blog_id'],
     413                    'fields'      => 'ID',
     414                    'number'      => 1,
     415                    'count_total' => true,
     416                )
     417            );
    415418            $user_count = $blog_users->get_total();
    416419            wp_cache_set( $blog['blog_id'] . '_user_count', $user_count, 'blog-details', 12 * HOUR_IN_SECONDS );
Note: See TracChangeset for help on using the changeset viewer.