Limit the execution of wp_enqueue_media() to once per page. Prevents multiple _wpMediaViewsL10n variables. see #22843.
git-svn-id: https://develop.svn.wordpress.org/trunk@23214 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
32b79f7d61
commit
035eb58af9
@ -1431,6 +1431,11 @@ function wp_prepare_attachment_for_js( $attachment ) {
|
||||
* @since 3.5.0
|
||||
*/
|
||||
function wp_enqueue_media( $args = array() ) {
|
||||
|
||||
// Enqueue me just once per page, please.
|
||||
if ( did_action( 'wp_enqueue_media' ) )
|
||||
return;
|
||||
|
||||
$defaults = array(
|
||||
'post' => null,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user