Skip to content

Commit

Permalink
fixed bug that forced download of all images returned from "query-att…
Browse files Browse the repository at this point in the history
…achments"
  • Loading branch information
zoul0813 committed Nov 7, 2014
1 parent ae8e6f3 commit 8c7cd62
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion w3tc-load-balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ function admin_init() {

// This filter downloads the image to our local temporary directory, prior to editing the image.
add_filter('load_image_to_edit_path', array($this, 'load_image_to_edit_path'));
add_filter('get_attached_file', array($this, 'get_attached_file'), 2, 2);

if (defined('DOING_AJAX') && DOING_AJAX && 'image-editor' == (empty($_POST['action']) ? '' : $_POST['action'])) {
add_filter('get_attached_file', array($this, 'get_attached_file'), 2, 2);
}

//add_filter('wp_prepare_attachment_for_js', array($this, 'wp_prepare_attachment_for_js'), 3, 3);

// TODO: intercept image save, and overwrite old image file so all references point to edit???
// when the image is rotated, flipped, cropped, etc a new file is created Image-e32423423432.png
Expand Down

0 comments on commit 8c7cd62

Please sign in to comment.