From 72c5403630205006246f30ba440a93ec6a132055 Mon Sep 17 00:00:00 2001 From: duck_ Date: Thu, 5 Apr 2012 11:14:32 +0000 Subject: [PATCH] Remove duplicate JavaScript. Props aaroncampbell. See #19840, fixes #20363. git-svn-id: http://svn.automattic.com/wordpress/trunk@20369 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/media-gallery.dev.js | 50 -------------------------------- 1 file changed, 50 deletions(-) diff --git a/wp-admin/js/media-gallery.dev.js b/wp-admin/js/media-gallery.dev.js index 5315287ad8..38e4f7b481 100644 --- a/wp-admin/js/media-gallery.dev.js +++ b/wp-admin/js/media-gallery.dev.js @@ -23,53 +23,3 @@ jQuery(function($){ } }); }); -jQuery(function($){ - $( 'body' ).bind( 'click.wp-gallery', function(e){ - var target = $( e.target ), id, img_size; - - if ( target.hasClass( 'wp-set-header' ) ) { - ( window.dialogArguments || opener || parent || top ).location.href = target.data( 'location' ); - e.preventDefault(); - } else if ( target.hasClass( 'wp-set-background' ) ) { - id = target.data( 'attachment-id' ); - img_size = $( 'input[name="attachments[' + id + '][image-size]"]:checked').val(); - - jQuery.post(ajaxurl, { - action: 'set-background-image', - attachment_id: id, - size: img_size - }, function(){ - var win = window.dialogArguments || opener || parent || top; - win.tb_remove(); - win.location.reload(); - }); - - e.preventDefault(); - } - }); -}); -jQuery(function($){ - $( 'body' ).bind( 'click.wp-gallery', function(e){ - var target = $( e.target ), id, img_size; - - if ( target.hasClass( 'wp-set-header' ) ) { - ( window.dialogArguments || opener || parent || top ).location.href = target.data( 'location' ); - e.preventDefault(); - } else if ( target.hasClass( 'wp-set-background' ) ) { - id = target.data( 'attachment-id' ); - img_size = $( 'input[name="attachments[' + id + '][image-size]"]:checked').val(); - - jQuery.post(ajaxurl, { - action: 'set-background-image', - attachment_id: id, - size: img_size - }, function(){ - var win = window.dialogArguments || opener || parent || top; - win.tb_remove(); - win.location.reload(); - }); - - e.preventDefault(); - } - }); -});