mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-23 00:31:28 +01:00
Media: Prevent undefined errors when media scripts are enqueued outside of wp_enqueue_media(). fixes #22495, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ef6ff8b4a8
commit
d4744fda0a
@ -39,7 +39,7 @@ window.wp = window.wp || {};
|
||||
_.extend( media, { model: {}, view: {}, controller: {} });
|
||||
|
||||
// Link any localized strings.
|
||||
l10n = media.model.l10n = _.isUndefined( _wpMediaModelsL10n ) ? {} : _wpMediaModelsL10n;
|
||||
l10n = media.model.l10n = typeof _wpMediaModelsL10n === 'undefined' ? {} : _wpMediaModelsL10n;
|
||||
|
||||
/**
|
||||
* ========================================================================
|
||||
|
@ -6,7 +6,7 @@
|
||||
l10n;
|
||||
|
||||
// Link any localized strings.
|
||||
l10n = media.view.l10n = _.isUndefined( _wpMediaViewsL10n ) ? {} : _wpMediaViewsL10n;
|
||||
l10n = media.view.l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
|
||||
|
||||
// Link any settings.
|
||||
media.view.settings = l10n.settings || {};
|
||||
|
Loading…
Reference in New Issue
Block a user