Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

Commit

Permalink
bugfix: prevent check for whether to make a Retina crop from always f…
Browse files Browse the repository at this point in the history
…ailing
  • Loading branch information
The Ambassador of Funk committed Mar 10, 2017
1 parent 3edcc91 commit 35a7dcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ManualImageCrop.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function cropImage() {
//checks if the destination image file is present (if it's not, we want to create a new file, as the WordPress returns the original image instead of specific one)
if ($dst_file == $src_file) {
$attachmentData = wp_generate_attachment_metadata( $data['attachmentId'], $dst_file );


//overwrite with previous values
$prevAttachmentData = wp_get_attachment_metadata($data['attachmentId']);
if (isset($prevAttachmentData['micSelectedArea'])) {
Expand Down Expand Up @@ -336,7 +336,7 @@ public function cropImage() {
}

// Generate Retina Image
if( isset( $data['make2x'] ) && $data['make2x'] === 'true' ) {
if( isset( $data['make2x'] ) && $data['make2x'] === true ) {
$dst_w2x = $dst_w * 2;
$dst_h2x = $dst_h * 2;

Expand Down

0 comments on commit 35a7dcd

Please sign in to comment.