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:
Andrew Nacin 2012-12-27 16:07:12 +00:00
parent 0d3d52a92a
commit 61bfa78509
1 changed files with 5 additions and 0 deletions

View File

@ -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,
);