Widgets: Ensure media is explicitly enqueued from Text widget in case Media widgets are unregistered.

Amends [41344].
See #40854.
Fixes #43125 for 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42546


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2018-01-22 19:28:42 +00:00
parent db02fcb8f8
commit 6ba9d07723
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9.3-alpha-42544'; $wp_version = '4.9.3-alpha-42546';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -396,6 +396,7 @@ class WP_Widget_Text extends WP_Widget {
*/ */
public function enqueue_admin_scripts() { public function enqueue_admin_scripts() {
wp_enqueue_editor(); wp_enqueue_editor();
wp_enqueue_media();
wp_enqueue_script( 'text-widgets' ); wp_enqueue_script( 'text-widgets' );
wp_add_inline_script( 'text-widgets', 'wp.textWidgets.init();', 'after' ); wp_add_inline_script( 'text-widgets', 'wp.textWidgets.init();', 'after' );
} }