Limit the execution of wp_enqueue_media() to once per page. Prevents multiple _wpMediaViewsL10n variables. see #22843.
git-svn-id: http://core.svn.wordpress.org/trunk@23214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0d3d52a92a
commit
61bfa78509
|
@ -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