WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/02/2019 11:41:16 PM (17 months ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r45172 r45590  
    159159        $tabindex       = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';
    160160        $default_editor = 'html';
    161         $buttons        = $autocomplete = '';
     161        $buttons        = '';
     162        $autocomplete   = '';
    162163        $editor_id_attr = esc_attr( $editor_id );
    163164
     
    438439                    $plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins ) );
    439440
    440                     if ( ( $key = array_search( 'spellchecker', $plugins ) ) !== false ) {
     441                    $key = array_search( 'spellchecker', $plugins );
     442                    if ( false !== $key ) {
    441443                        // Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors.
    442444                        // It can be added with 'mce_external_plugins'.
     
    582584                 */
    583585                $mce_buttons   = apply_filters( 'teeny_mce_buttons', array( 'bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'fullscreen' ), $editor_id );
    584                 $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array();
     586                $mce_buttons_2 = array();
     587                $mce_buttons_3 = array();
     588                $mce_buttons_4 = array();
    585589            } else {
    586590                $mce_buttons = array( 'formatselect', 'bold', 'italic', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'link', 'wp_more', 'spellchecker' );
     
    647651            $body_class = $editor_id;
    648652
    649             if ( $post = get_post() ) {
     653            $post = get_post();
     654            if ( $post ) {
    650655                $body_class .= ' post-type-' . sanitize_html_class( $post->post_type ) . ' post-status-' . sanitize_html_class( $post->post_status );
    651656
     
    14611466
    14621467        $tmce_on = ! empty( self::$mce_settings );
    1463         $mceInit = $qtInit = '';
     1468        $mceInit = '';
     1469        $qtInit  = '';
    14641470
    14651471        if ( $tmce_on ) {
Note: See TracChangeset for help on using the changeset viewer.