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

    r43318 r43571  
    13371337     * @param int    $status        Optional. HTTP response status code to use. Default '302' (Moved Temporarily).
    13381338     * @param string $x_redirect_by Optional. The application doing the redirect. Default 'WordPress'.
    1339      * @return bool  $redirect False if the redirect was cancelled, true otherwise.
     1339     * @return bool  $redirect False if the redirect was cancelled, true otherwise.
    13401340     */
    13411341    function wp_safe_redirect( $location, $status = 302, $x_redirect_by = 'WordPress' ) {
     
    17541754            _n(
    17551755                'Currently %s comment is waiting for approval. Please visit the moderation panel:',
    1756                 'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting
    1757             ), number_format_i18n( $comments_waiting )
     1756                'Currently %s comments are waiting for approval. Please visit the moderation panel:',
     1757                $comments_waiting
     1758            ),
     1759            number_format_i18n( $comments_waiting )
    17581760        ) . "\r\n";
    17591761        $notify_message .= admin_url( 'edit-comments.php?comment_status=moderated#wpbody-content' ) . "\r\n";
     
    24902492        $hash = wp_hash_password( $password );
    24912493        $wpdb->update(
    2492             $wpdb->users, array(
     2494            $wpdb->users,
     2495            array(
    24932496                'user_pass'           => $hash,
    24942497                'user_activation_key' => '',
    2495             ), array( 'ID' => $user_id )
     2498            ),
     2499            array( 'ID' => $user_id )
    24962500        );
    24972501
Note: See TracChangeset for help on using the changeset viewer.