wp/wp-admin/js/media-gallery.js
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
     1 /**
     1 /**
     2  * This file is used on media-upload.php which has been replaced by media-new.php and upload.php
     2  * This file is used on media-upload.php which has been replaced by media-new.php and upload.php
     3  *
     3  *
     4  * @deprecated  3.5.0
     4  * @deprecated 3.5.0
     5  * @output wp-admin/js/media-gallery.js
     5  * @output wp-admin/js/media-gallery.js
     6  */
     6  */
     7 
     7 
     8  /* global ajaxurl */
     8  /* global ajaxurl */
     9 jQuery(function($) {
     9 jQuery(function($) {
    21 			// Sets the image as background of the theme.
    21 			// Sets the image as background of the theme.
    22 			id = target.data( 'attachment-id' );
    22 			id = target.data( 'attachment-id' );
    23 			img_size = $( 'input[name="attachments[' + id + '][image-size]"]:checked').val();
    23 			img_size = $( 'input[name="attachments[' + id + '][image-size]"]:checked').val();
    24 
    24 
    25 			/**
    25 			/**
    26 			 * This AJAX action has been deprecated since 3.5.0, see custom-background.php
    26 			 * This Ajax action has been deprecated since 3.5.0, see custom-background.php
    27 			 */
    27 			 */
    28 			jQuery.post(ajaxurl, {
    28 			jQuery.post(ajaxurl, {
    29 				action: 'set-background-image',
    29 				action: 'set-background-image',
    30 				attachment_id: id,
    30 				attachment_id: id,
    31 				size: img_size
    31 				size: img_size