Editor: Remove back-compat stub for Classic Editor's old distraction-free writing mode.

The original script was deprecated in [30338] and removed in [32677].

Props Presskopp, ketuchetan.
Fixes #39448.

git-svn-id: https://develop.svn.wordpress.org/trunk@47164 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-02-02 04:13:25 +00:00
parent 63a53c730f
commit 706daca6a3
5 changed files with 5 additions and 56 deletions

View File

@ -1,40 +0,0 @@
/**
* Distraction-Free Writing (wp-fullscreen) backward compatibility stub.
*
* @deprecated 4.1
* @removed 4.3.
* @output wp-admin/js/wp-fullscreen-stub.js
*/
( function() {
var noop = function(){};
window.wp = window.wp || {};
window.wp.editor = window.wp.editor || {};
window.wp.editor.fullscreen = {
bind_resize: noop,
dfwWidth: noop,
off: noop,
on: noop,
refreshButtons: noop,
resizeTextarea: noop,
save: noop,
switchmode: noop,
toggleUI: noop,
settings: {},
pubsub: {
publish: noop,
subscribe: noop,
unsubscribe: noop,
topics: {}
},
fade: {
In: noop,
Out: noop
},
ui: {
fade: noop,
init: noop
}
};
}());

View File

@ -789,6 +789,9 @@ $_old_files = array(
// 5.3 // 5.3
'wp-includes/js/wp-a11y.js', // Moved to: wp-includes/js/dist/a11y.js 'wp-includes/js/wp-a11y.js', // Moved to: wp-includes/js/dist/a11y.js
'wp-includes/js/wp-a11y.min.js', // Moved to: wp-includes/js/dist/a11y.min.js 'wp-includes/js/wp-a11y.min.js', // Moved to: wp-includes/js/dist/a11y.min.js
// 5.4
'wp-admin/js/wp-fullscreen-stub.js',
'wp-admin/js/wp-fullscreen-stub.min.js',
); );
/** /**

View File

@ -25,7 +25,6 @@ final class _WP_Editors {
private static $has_medialib = false; private static $has_medialib = false;
private static $editor_buttons_css = true; private static $editor_buttons_css = true;
private static $drag_drop_upload = false; private static $drag_drop_upload = false;
private static $old_dfw_compat = false;
private static $translation; private static $translation;
private static $tinymce_scripts_printed = false; private static $tinymce_scripts_printed = false;
private static $link_dialog_printed = false; private static $link_dialog_printed = false;
@ -58,8 +57,7 @@ final class _WP_Editors {
* @type string $editor_class Extra classes to add to the editor textarea element. Default empty. * @type string $editor_class Extra classes to add to the editor textarea element. Default empty.
* @type bool $teeny Whether to output the minimal editor config. Examples include * @type bool $teeny Whether to output the minimal editor config. Examples include
* Press This and the Comment editor. Default false. * Press This and the Comment editor. Default false.
* @type bool $dfw Deprecated in 4.1. Since 4.3 used only to enqueue wp-fullscreen-stub.js * @type bool $dfw Deprecated in 4.1. Unused.
* for backward compatibility.
* @type bool|array $tinymce Whether to load TinyMCE. Can be used to pass settings directly to * @type bool|array $tinymce Whether to load TinyMCE. Can be used to pass settings directly to
* TinyMCE using an array. Default true. * TinyMCE using an array. Default true.
* @type bool|array $quicktags Whether to load Quicktags. Can be used to pass settings directly to * @type bool|array $quicktags Whether to load Quicktags. Can be used to pass settings directly to
@ -97,7 +95,6 @@ final class _WP_Editors {
'editor_css' => '', 'editor_css' => '',
'editor_class' => '', 'editor_class' => '',
'teeny' => false, 'teeny' => false,
'dfw' => false,
'_content_editor_dfw' => false, '_content_editor_dfw' => false,
'tinymce' => true, 'tinymce' => true,
'quicktags' => true, 'quicktags' => true,
@ -123,10 +120,6 @@ final class _WP_Editors {
self::$has_quicktags = true; self::$has_quicktags = true;
} }
if ( $set['dfw'] ) {
self::$old_dfw_compat = true;
}
if ( empty( $set['editor_height'] ) ) { if ( empty( $set['editor_height'] ) ) {
return $set; return $set;
} }
@ -872,10 +865,6 @@ final class _WP_Editors {
wp_enqueue_script( 'jquery-ui-autocomplete' ); wp_enqueue_script( 'jquery-ui-autocomplete' );
} }
if ( self::$old_dfw_compat ) {
wp_enqueue_script( 'wp-fullscreen-stub' );
}
if ( self::$has_medialib ) { if ( self::$has_medialib ) {
add_thickbox(); add_thickbox();
wp_enqueue_script( 'media-upload' ); wp_enqueue_script( 'media-upload' );

View File

@ -716,9 +716,6 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'clipboard', "/wp-includes/js/clipboard$suffix.js", array(), false, 1 ); $scripts->add( 'clipboard', "/wp-includes/js/clipboard$suffix.js", array(), false, 1 );
// Back-compat for old DFW. To-do: remove at the end of 2016.
$scripts->add( 'wp-fullscreen-stub', "/wp-admin/js/wp-fullscreen-stub$suffix.js", array(), false, 1 );
$scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array( 'jquery' ), false, 1 ); $scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array( 'jquery' ), false, 1 );
did_action( 'init' ) && $scripts->localize( did_action( 'init' ) && $scripts->localize(
'wp-ajax-response', 'wp-ajax-response',