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

Amends [41344].
See #40854.
Fixes #43125.

Built from https://develop.svn.wordpress.org/trunk@42545


git-svn-id: http://core.svn.wordpress.org/trunk@42374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2018-01-22 19:25:31 +00:00
parent 94d178dd31
commit 2ec77391f6
2 changed files with 2 additions and 1 deletions

View File

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

View File

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