classes/Tools/Imgix/ImgixTool.php
public function previewAdjustments() {
		$image_id = esc_html($_POST['image_id']);
		$size = esc_html($_POST['size']);

		if(!current_user_can('edit_post', $image_id)) {
			json_response([
				              'status' => 'error',
				              'message' => 'You are not strong enough, smart enough or fast enough.'
			              ]);
		}


		$params = (isset($_POST['settings'])) ? $_POST['settings'] : [];
		$result = $this->buildImgixImage($image_id, $size, $params);

		json_response(['status' => 'ok', 'src' => $result[0]]);
	}
public function previewAdjustments() {
		$image_id = esc_html($_POST['image_id']);
		$size = esc_html($_POST['size']);

		if(!current_user_can('edit_post', $image_id)) {
			json_response([
				              'status' => 'error',
				              'message' => 'You are not strong enough, smart enough or fast enough.'
			              ]);
		}


		$params = (isset($_POST['settings'])) ? $_POST['settings'] : [];
		$result = $this->buildImgixImage($image_id, $size, $params);

		json_response(['status' => 'ok', 'src' => $result[0]]);
	}
public function previewAdjustments ( ) { $ image_id = esc_html ( $ _POST [ 'image_id' ] ) ; $ size = esc_html ( $ _POST [ 'size' ] ) ; if ( ! current_user_can ( 'edit_post' , $ image_id ) ) { json_response ( [ 'status' => 'error' , 'message' => 'You are not strong enough, smart enough or fast enough.' ] ) ; } $ params = ( isset ( $ _POST [ 'settings' ] ) ) ? $ _POST [ 'settings' ] : [ ] ; $ result = $ this -> buildImgixImage ( $ image_id , $ size , $ params ) ; json_response ( [ 'status' => 'ok' , 'src' => $ result [ 0 ] ] ) ; }
Preview the adjustment
Preview the adjustment