Skip to content

Commit

Permalink
Editor: Remove back-compat stub for Classic Editor's old distraction-…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
SergeyBiryukov committed Feb 2, 2020
1 parent 63a53c7 commit 706daca
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 56 deletions.
40 changes: 0 additions & 40 deletions src/js/_enqueues/deprecated/fullscreen-stub.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/js/_enqueues/deprecated/media-gallery.js
@@ -1,7 +1,7 @@
/**
* This file is used on media-upload.php which has been replaced by media-new.php and upload.php
*
* @deprecated 3.5.0
* @deprecated 3.5.0
* @output wp-admin/js/media-gallery.js
*/

Expand Down
3 changes: 3 additions & 0 deletions src/wp-admin/includes/update-core.php
Expand Up @@ -789,6 +789,9 @@
// 5.3
'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
// 5.4
'wp-admin/js/wp-fullscreen-stub.js',
'wp-admin/js/wp-fullscreen-stub.min.js',
);

/**
Expand Down
13 changes: 1 addition & 12 deletions src/wp-includes/class-wp-editor.php
Expand Up @@ -25,7 +25,6 @@ final class _WP_Editors {
private static $has_medialib = false;
private static $editor_buttons_css = true;
private static $drag_drop_upload = false;
private static $old_dfw_compat = false;
private static $translation;
private static $tinymce_scripts_printed = false;
private static $link_dialog_printed = false;
Expand Down Expand Up @@ -58,8 +57,7 @@ private function __construct() {}
* @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
* 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
* for backward compatibility.
* @type bool $dfw Deprecated in 4.1. Unused.
* @type bool|array $tinymce Whether to load TinyMCE. Can be used to pass settings directly to
* TinyMCE using an array. Default true.
* @type bool|array $quicktags Whether to load Quicktags. Can be used to pass settings directly to
Expand Down Expand Up @@ -97,7 +95,6 @@ public static function parse_settings( $editor_id, $settings ) {
'editor_css' => '',
'editor_class' => '',
'teeny' => false,
'dfw' => false,
'_content_editor_dfw' => false,
'tinymce' => true,
'quicktags' => true,
Expand All @@ -123,10 +120,6 @@ public static function parse_settings( $editor_id, $settings ) {
self::$has_quicktags = true;
}

if ( $set['dfw'] ) {
self::$old_dfw_compat = true;
}

if ( empty( $set['editor_height'] ) ) {
return $set;
}
Expand Down Expand Up @@ -872,10 +865,6 @@ public static function enqueue_scripts( $default_scripts = false ) {
wp_enqueue_script( 'jquery-ui-autocomplete' );
}

if ( self::$old_dfw_compat ) {
wp_enqueue_script( 'wp-fullscreen-stub' );
}

if ( self::$has_medialib ) {
add_thickbox();
wp_enqueue_script( 'media-upload' );
Expand Down
3 changes: 0 additions & 3 deletions src/wp-includes/script-loader.php
Expand Up @@ -716,9 +716,6 @@ function wp_default_scripts( &$scripts ) {

$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 );
did_action( 'init' ) && $scripts->localize(
'wp-ajax-response',
Expand Down

0 comments on commit 706daca

Please sign in to comment.