diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index 5d7ba224cc207..7f5ef265c6fbc 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/wp-includes/class-wp-editor.php @@ -158,12 +158,8 @@ public static function parse_settings( $editor_id, $settings ) { */ public static function editor( $content, $editor_id, $settings = array() ) { $set = self::parse_settings( $editor_id, $settings ); - $editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"'; - $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : ''; $default_editor = 'html'; $buttons = ''; - $autocomplete = ''; - $editor_id_attr = esc_attr( $editor_id ); if ( $set['drag_drop_upload'] ) { self::$drag_drop_upload = true; @@ -180,8 +176,6 @@ public static function editor( $content, $editor_id, $settings = array() ) { } if ( self::$this_tinymce ) { - $autocomplete = ' autocomplete="off"'; - if ( self::$this_quicktags ) { $default_editor = $set['default_editor'] ? $set['default_editor'] : wp_default_editor(); // 'html' is used for the "Text" editor tab. @@ -189,10 +183,16 @@ public static function editor( $content, $editor_id, $settings = array() ) { $default_editor = 'tinymce'; } - $buttons .= '\n"; - $buttons .= '\n"; + $buttons .= WP_HTML::render( <<%visual_label> + +HTML, + array( + 'id' => $editor_id, + 'text_label' => _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ), + 'visual_label' => _x( 'Visual', 'Name for the Visual editor tab' ), + ) + ); } else { $default_editor = 'tinymce'; } @@ -201,11 +201,13 @@ public static function editor( $content, $editor_id, $settings = array() ) { $switch_class = 'html' === $default_editor ? 'html-active' : 'tmce-active'; $wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class; - if ( $set['_content_editor_dfw'] ) { - $wrap_class .= ' has-dfw'; - } - - echo '