Make WordPress Core


Ignore:
Timestamp:
08/17/2018 01:50:26 AM (6 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/image-edit.php

    r42756 r43571  
    8181    </div>
    8282
    83 <?php if ( $can_restore ) { ?>
     83    <?php if ( $can_restore ) { ?>
    8484
    8585    <div class="imgedit-group">
     
    104104    </div>
    105105
    106 <?php } ?>
     106    <?php } ?>
    107107
    108108    <div class="imgedit-group">
     
    153153    if ( $thumb && $sub_sizes ) {
    154154        $thumb_img = wp_constrain_dimensions( $thumb['width'], $thumb['height'], 160, 120 );
    155     ?>
     155        ?>
    156156
    157157    <div class="imgedit-group imgedit-applyto">
     
    204204                                                                        ) ) {
    205205                                                                            $note_no_rotate = '';
    206                                                                     ?>
     206                                                                            ?>
    207207                                                                        <button type="button" class="imgedit-rleft button" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate counter-clockwise' ); ?></span></button>
    208208            <button type="button" class="imgedit-rright button" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)"><span class="screen-reader-text"><?php esc_html_e( 'Rotate clockwise' ); ?></span></button>
    209                                                                 <?php
     209                                                                            <?php
    210210                                                                        } else {
    211211                                                                                    $note_no_rotate = '<p class="note-no-rotate"><em>' . __( 'Image rotation is not supported by your web host.' ) . '</em></p>';
    212                                                                         ?>
     212                                                                            ?>
    213213                                                                                <button type="button" class="imgedit-rleft button disabled" disabled></button>
    214214                                                                                <button type="button" class="imgedit-rright button disabled" disabled></button>
     
    244244    <div class="hidden" id="imgedit-leaving-<?php echo $post_id; ?>"><?php _e( "There are unsaved changes that will be lost. 'OK' to continue, 'Cancel' to return to the Image Editor." ); ?></div>
    245245    </div>
    246 <?php
     246    <?php
    247247}
    248248
Note: See TracChangeset for help on using the changeset viewer.