Skip to content

Commit

Permalink
Dummy image retina size existence wrong check
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokopenko committed Jun 27, 2018
1 parent 0015dea commit cbb8edc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/RwdImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ public function get_set_sources() {
$option->size->crop
);

if ( JRI_DUMMY_IMAGE && empty( $dummy_sizes[ $retina_image_size ]['file'] ) ) {
if ( JRI_DUMMY_IMAGE && empty( $meta_data['sizes'][ $retina_image_size ]['file'] ) ) {
$dummy_sizes[ $retina_image_size ] = $this->dummy_source( $option, $multiplier, $meta_data );
}
}
Expand All @@ -514,7 +514,7 @@ public function get_set_sources() {
$sources[ $subkey ]['attachment_id'] = $attachment->ID;
} // End foreach().

// cache all dummy retina sizes.
// cache all dummy retina sizes to get correct width/height options for retina.
if ( JRI_DUMMY_IMAGE ) {
foreach ( $dummy_meta as $attachment_id => $meta_data ) {
$this->set_attachment_metadata( $attachment_id, $meta_data );
Expand Down

0 comments on commit cbb8edc

Please sign in to comment.