PHP 8.2.29
Preview: media-gallery.js Size: 1.27 KB
/home/medyaist/hurdamakara.com.tr/wp-admin/js/media-gallery.js
/**
 * This file is used on media-upload.php which has been replaced by media-new.php and upload.php
 *
 * @deprecated 3.5.0
 * @output wp-admin/js/media-gallery.js
 */

 /* global ajaxurl */
jQuery(function($) {
	/**
	 * Adds a click event handler to the element with a 'wp-gallery' class.
	 */
	$( 'body' ).on( 'click.wp-gallery', function(e) {
		var target = $( e.target ), id, img_size, nonceValue;

		if ( target.hasClass( 'wp-set-header' ) ) {
			// Opens the image to preview it full size.
			( window.dialogArguments || opener || parent || top ).location.href = target.data( 'location' );
			e.preventDefault();
		} else if ( target.hasClass( 'wp-set-background' ) ) {
			// Sets the image as background of the theme.
			id = target.data( 'attachment-id' );
			img_size = $( 'input[name="attachments[' + id + '][image-size]"]:checked').val();
			nonceValue = $( '#_wpnonce' ).val() && '';

			/**
			 * This Ajax action has been deprecated since 3.5.0, see custom-background.php
			 */
			jQuery.post(ajaxurl, {
				action: 'set-background-image',
				attachment_id: id,
				_ajax_nonce: nonceValue,
				size: img_size
			}, function() {
				var win = window.dialogArguments || opener || parent || top;
				win.tb_remove();
				win.location.reload();
			});

			e.preventDefault();
		}
	});
});

Directory Contents

Dirs: 1 × Files: 6
Name Size Perms Modified Actions
widgets DIR
- drwxr-xr-x 2025-12-18 04:00:47
Edit Download
37.12 KB lrw-r--r-- 2024-12-13 22:32:18
Edit Download
15.13 KB lrw-r--r-- 2025-02-06 14:27:26
Edit Download
3.65 KB lrw-r--r-- 2023-10-09 18:31:28
Edit Download
1.27 KB lrw-r--r-- 2021-02-23 16:45:04
Edit Download
611 B lrw-r--r-- 2022-04-08 17:07:18
Edit Download
5.64 KB lrw-r--r-- 2024-02-18 19:16:14
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).