Skip to content

Commit

Permalink
Update image replacement check
Browse files Browse the repository at this point in the history
Only retrieve the old banner image size if the image size is set to
the new one and a version that size does not exist.
  • Loading branch information
robincornett committed Nov 16, 2019
1 parent 603c3bb commit b6068f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-displayfeaturedimagegenesis-common.php
Expand Up @@ -52,7 +52,7 @@ public static function get_image_variables() {
$image_id = self::set_image_id();
$image_size = self::image_size();
$item->backstretch = wp_get_attachment_image_src( $image_id, $image_size );
if ( empty( $item->backstretch[3] ) ) {
if ( empty( $item->backstretch[3] ) && '2048x2048' === $image_size ) {
$item->backstretch = wp_get_attachment_image_src( $image_id, 'displayfeaturedimage_backstretch' );
}

Expand Down

0 comments on commit b6068f3

Please sign in to comment.