Media: Prevent undefined errors when media scripts are enqueued outside of wp_enqueue_media(). fixes #22495, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22694 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8ff00bcf38
commit
86b1e35bcf
@ -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