Sha256: 240fdbc998aa52c8b8b31210f30e280644929f4bb21baa0436546dd8617952d6
Contents?: true
Size: 769 Bytes
Versions: 6
Compression:
Stored size: 769 Bytes
Contents
/* global ajaxurl */ 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(); } }); });
Version data entries
6 entries across 6 versions & 2 rubygems