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-terms-list-table.php

    r43386 r43571  
    213213
    214214        $args = wp_parse_args(
    215             $this->callback_args, array(
     215            $this->callback_args,
     216            array(
    216217                'page'       => 1,
    217218                'number'     => 20,
     
    386387                $edit_link
    387388            );
    388             $name = sprintf(
     389            $name      = sprintf(
    389390                '<a class="row-title" href="%s" aria-label="%s">%s</a>',
    390391                esc_url( $edit_link ),
     
    608609            return;
    609610        }
    610 ?>
     611        ?>
    611612
    612613    <form method="get"><table style="display: none"><tbody id="inlineedit">
     
    620621                    <span class="input-text-wrap"><input type="text" name="name" class="ptitle" value="" /></span>
    621622                </label>
    622     <?php if ( ! global_terms_enabled() ) { ?>
     623        <?php if ( ! global_terms_enabled() ) { ?>
    623624                <label>
    624625                    <span class="title"><?php _e( 'Slug' ); ?></span>
     
    627628    <?php } ?>
    628629            </div></fieldset>
    629     <?php
     630        <?php
    630631
    631632        $core_columns = array(
     
    639640        list( $columns ) = $this->get_column_info();
    640641
    641     foreach ( $columns as $column_name => $column_display_name ) {
    642         if ( isset( $core_columns[ $column_name ] ) ) {
    643             continue;
    644         }
    645 
    646         /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
    647         do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy );
    648     }
    649 
    650     ?>
     642        foreach ( $columns as $column_name => $column_display_name ) {
     643            if ( isset( $core_columns[ $column_name ] ) ) {
     644                continue;
     645            }
     646
     647            /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
     648            do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy );
     649        }
     650
     651        ?>
    651652
    652653        <div class="inline-edit-save submit">
     
    664665        </td></tr>
    665666        </tbody></table></form>
    666     <?php
     667        <?php
    667668    }
    668669}
Note: See TracChangeset for help on using the changeset viewer.