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

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


git-svn-id: https://develop.svn.wordpress.org/trunk@42545 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2018-01-22 19:24:02 +00:00
parent e2b25e6159
commit 4fb6c02b99
1 changed files with 1 additions and 0 deletions

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' );
}