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-includes/class-wp-editor.php

    r43464 r43571  
    8181
    8282        $set = wp_parse_args(
    83             $settings, array(
     83            $settings,
     84            array(
    8485                'wpautop'             => true,
    8586                'media_buttons'       => true,
     
    258259         */
    259260        $the_editor = apply_filters(
    260             'the_editor', '<div id="wp-' . $editor_id_attr . '-editor-container" class="wp-editor-container">' .
     261            'the_editor',
     262            '<div id="wp-' . $editor_id_attr . '-editor-container" class="wp-editor-container">' .
    261263            $quicktags_toolbar .
    262264            '<textarea' . $editor_class . $height . $tabindex . $autocomplete . ' cols="40" name="' . esc_attr( $set['textarea_name'] ) . '" ' .
     
    792794         */
    793795        do_action(
    794             'wp_enqueue_editor', array(
     796            'wp_enqueue_editor',
     797            array(
    795798                'tinymce'   => ( $default_scripts || self::$has_tinymce ),
    796799                'quicktags' => ( $default_scripts || self::$has_quicktags ),
     
    848851            // Can be added from js by using the 'wp-before-tinymce-init' event.
    849852            $settings['plugins'] = implode(
    850                 ',', array(
     853                ',',
     854                array(
    851855                    'charmap',
    852856                    'colorpicker',
Note: See TracChangeset for help on using the changeset viewer.