Make WordPress Core


Ignore:
Timestamp:
11/26/2014 02:49:41 AM (9 years ago)
Author:
azaozz
Message:

Editor:

  • Add CSS reset for the TinyMCE fullscreen mode when used on the Edit Post screen.
  • Fix loading of the old and new DFW buttons, use another arg. passed to WP_Editors.
  • Reset editor-expand when exiting TinyMCE fullscreen mode.

Fixes #30453.

File:
1 edited

Legend:

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

    r30536 r30573  
    184184        $wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class;
    185185
    186         if ( $set['dfw'] ) {
     186        if ( $set['_content_editor_dfw'] ) {
    187187            $wrap_class .= ' has-dfw';
    188188        }
     
    279279                $qtInit['buttons'] .= ',fullscreen';
    280280
    281             if ( $editor_id === 'content' && ! wp_is_mobile() )
     281            if ( $set['_content_editor_dfw'] ) {
    282282                $qtInit['buttons'] .= ',dfw';
     283            }
    283284
    284285            /**
     
    550551                $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array();
    551552            } else {
    552                 $mce_buttons = array( 'bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker', 'wp_adv' );
    553 
    554                 if ( $editor_id ) {
     553                $mce_buttons = array( 'bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' );
     554
     555                if ( $set['_content_editor_dfw'] ) {
    555556                    $mce_buttons[] = 'dfw';
    556557                } else {
    557558                    $mce_buttons[] = 'fullscreen';
    558559                }
     560
     561                $mce_buttons[] = 'wp_adv';
    559562
    560563                /**
Note: See TracChangeset for help on using the changeset viewer.