classes/Tools/MediaUpload/UploadTool.php
public function setupAdminAjax() {
		add_action('wp_ajax_ilab_upload_prepare', function() {
			$this->prepareUpload();
		});

		add_action('wp_ajax_ilab_upload_import_cloud_file', function() {
			$this->importUploadedFile();
		});

		add_action('wp_ajax_ilab_upload_attachment_info', function() {
			$postId = $_POST['postId'];

			json_response(wp_prepare_attachment_for_js($postId));
		});
	}
public function setupAdminAjax() {
		add_action('wp_ajax_ilab_upload_prepare', function() {
			$this->prepareUpload();
		});

		add_action('wp_ajax_ilab_upload_import_cloud_file', function() {
			$this->importUploadedFile();
		});

		add_action('wp_ajax_ilab_upload_attachment_info', function() {
			$postId = $_POST['postId'];

			json_response(wp_prepare_attachment_for_js($postId));
		});
	}
public function setupAdminAjax ( ) { add_action ( 'wp_ajax_ilab_upload_prepare' , function ( ) { $ this -> prepareUpload ( ) ; } ) ; add_action ( 'wp_ajax_ilab_upload_import_cloud_file' , function ( ) { $ this -> importUploadedFile ( ) ; } ) ; add_action ( 'wp_ajax_ilab_upload_attachment_info' , function ( ) { $ postId = $ _POST [ 'postId' ] ; json_response ( wp_prepare_attachment_for_js ( $ postId ) ) ; } ) ; }
Install Ajax Endpoints
Install Ajax Endpoints