mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Media: Ensure media-views is enqueued and registered before localizing.
fixes #24724. git-svn-id: https://develop.svn.wordpress.org/trunk@29678 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9c82e2854e
commit
896bbfacae
@ -3045,9 +3045,11 @@ function wp_enqueue_media( $args = array() ) {
|
||||
|
||||
$strings['settings'] = $settings;
|
||||
|
||||
// Ensure we enqueue media-editor first, that way media-views is
|
||||
// registered internally before we try to localize it. see #24724.
|
||||
wp_enqueue_script( 'media-editor' );
|
||||
wp_localize_script( 'media-views', '_wpMediaViewsL10n', $strings );
|
||||
|
||||
wp_enqueue_script( 'media-editor' );
|
||||
wp_enqueue_script( 'media-audiovideo' );
|
||||
wp_enqueue_style( 'media-views' );
|
||||
if ( is_admin() ) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user