Skip to content

Commit

Permalink
restore full srcset attributes for banner ad (#912)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Abraham <[email protected]>
  • Loading branch information
cjyabraham committed Dec 14, 2024
1 parent b2d7500 commit dfcad58
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,17 @@ function add_banner_ad_shortcode( $atts ) {
srcset="<?php echo esc_url( wp_get_attachment_image_url( $mobile_image_id, 'full', false ) ); ?>">
<source media="(min-width: 500px)"
srcset="<?php echo esc_url( wp_get_attachment_image_url( $desktop_image_id, 'full', false ) ); ?>">
<img src="<?php echo esc_url( wp_get_attachment_image_url( $desktop_image_id, 'full', false ) ); ?>"
alt="<?php echo esc_attr( $alt_txt ); ?>">
</picture>
<?php
LF_Utils::display_responsive_images(
$desktop_image_id,
'full',
'1200px',
null,
'',
$alt_txt,
);
?>
</picture>
</a>
</div>
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>
Expand Down

0 comments on commit dfcad58

Please sign in to comment.