$class, 'alt' => $alt, 'sizes' => $sizes, 'loading' => 'lazy', 'decoding' => 'async', ] ); }; $phone_alt = (string) ( $attributes['mobileAlt'] ?? '' ); if ( $mobile ) { $inner = $phone_id ? $image( $phone_id, $phone_alt, 'rooster-screens__phone', '(max-width: 390px) 67vw, 256px' ) : ''; } else { $inner = $desktop_id ? $image( $desktop_id, (string) ( $attributes['desktopAlt'] ?? '' ), 'rooster-screens__desktop', '(max-width: 1024px) 100vw, 560px' ) : ''; if ( $phone_id ) { $inner .= $image( $phone_id, $phone_alt, 'rooster-screens__phone', '(max-width: 1024px) 28vw, 160px' ); } } if ( '' === $inner ) { return; } $wrapper = AIEO_Engine_Blocks::wrapper( $library, [ 'class' => 'rooster-screens' . ( $mobile ? ' rooster-screens--phone' : '' ), 'data-rooster-ui' => 'rooster-one/media' ] ); AIEO_Engine_Blocks::out( sprintf( '
%2$s
', $wrapper, $inner ) );