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

    r42966 r43571  
    111111            // It's a better user experience to still show the Title, even if it didn't change.
    112112            // No, you didn't see this.
    113             $diff  = '<table class="diff"><colgroup><col class="content diffsplit left"><col class="content diffsplit middle"><col class="content diffsplit right"></colgroup><tbody><tr>';
     113            $diff = '<table class="diff"><colgroup><col class="content diffsplit left"><col class="content diffsplit middle"><col class="content diffsplit right"></colgroup><tbody><tr>';
    114114
    115115            // In split screen mode, show the title before/after side by side.
     
    125125            }
    126126
    127             $diff .= '</tr></tbody>';
     127            $diff .= '</tr></tbody>';
    128128            $diff .= '</table>';
    129129        }
     
    168168
    169169    $revisions = wp_get_post_revisions(
    170         $post->ID, array(
     170        $post->ID,
     171        array(
    171172            'order'         => 'ASC',
    172173            'check_enabled' => false,
     
    195196        if ( $can_restore ) {
    196197            $restore_link = str_replace(
    197                 '&amp;', '&', wp_nonce_url(
     198                '&amp;',
     199                '&',
     200                wp_nonce_url(
    198201                    add_query_arg(
    199202                        array(
     
    395398                            '<span class="author-name">{{ data.attributes.author.name }}</span>'
    396399                        );
    397                             ?>
     400                        ?>
    398401                            </span>
    399402                    <# } else if ( data.attributes.current ) { #>
     
    404407                            '<span class="author-name">{{ data.attributes.author.name }}</span>'
    405408                        );
    406                             ?>
     409                        ?>
    407410                            </span>
    408411                    <# } else { #>
     
    413416                            '<span class="author-name">{{ data.attributes.author.name }}</span>'
    414417                        );
    415                             ?>
     418                        ?>
    416419                            </span>
    417420                    <# } #>
Note: See TracChangeset for help on using the changeset viewer.