Skip to content

Commit

Permalink
Merge pull request #445 from greenpeace/planet-5732
Browse files Browse the repository at this point in the history
PLANET-5732: Happy Point background image missing
  • Loading branch information
lithrel authored Dec 1, 2020
2 parents c446883 + bba8cf8 commit 431a8ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/blocks/class-happypoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static function get_data( $id ) {
$image_id = $id ? $id : $p4_happy_point_bg_image;
$img_meta = wp_get_attachment_metadata( $image_id );
$image_alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true );
$data['background_src'] = wp_get_attachment_image_src( $image_id, 'retina-large' );
$data['background_src'] = wp_get_attachment_image_src( $image_id, 'retina-large' )[0] ?? false;
$data['background_srcset'] = wp_get_attachment_image_srcset( $image_id, 'retina-large', $img_meta );
$data['background_sizes'] = wp_calculate_image_sizes( 'retina-large', null, null, $image_id );
$data['engaging_network_id'] = $options['engaging_network_form_id'] ?? '';
Expand Down

0 comments on commit 431a8ac

Please sign in to comment.