CoreFiles by mySites.guru
media-gallery.dev.js25 lines, 748 bytes, from wordpress-3.4.zip
Raw History Compare with 3.3.3
md5
365f0de914a67921ec1ca7f2c1f6c7fc
sha1
0d1199e1355f38573c1abb5f8d1057f6b515f7f5
sha256
562ccdff1cb5fe506b278afb37884ee09b99c2e1127d4d89628827d3e0fea66c
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();
		}
	});
});

The same content is in 10 releases, WordPress 3.4-beta2 to 3.4.2. See them all, or every version of this file.