Update image replacement check

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.
This commit is contained in:
Robin Cornett
2019-11-16 15:04:56 -05:00
parent 603c3bbaab
commit b6068f3dbc
@@ -52,7 +52,7 @@ class Display_Featured_Image_Genesis_Common {
$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' );
}