Limit the execution of wp_enqueue_media() to once per page. Prevents multiple _wpMediaViewsL10n variables.
Merges [23214] to the 3.5 branch. fixes #22843. git-svn-id: http://core.svn.wordpress.org/branches/3.5@23269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6ac4e3251f
commit
253bc7fd6d
|
@ -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