Files
CWC/views/blocks/pull-quote/pull-quote.php
T
Keith Solomon dbfd5bfb43 fix: use new mobile vector for pull quote
Swap pullquote-mobile-linework.png for the artist-supplied mobile-pullquote-vector.svg at the existing pull-quote__vector--mobile slot. Update the visual snapshots to match the new artwork.
2026-06-28 13:03:18 -05:00

44 lines
1.2 KiB
PHP

<?php
/**
* Block Name: Pull Quote
*
* A decorative pull quote with background vectors and accent border.
*
* @package CWC
*/
namespace CWC;
$quote_bg = get_field( 'quote_bg' );
$quote_bgColor = get_field( 'quote_bg_color' );
$quote_text = get_field( 'quote_text' );
if ( empty( $quote_text ) ) {
return;
}
if ( $quote_bgColor ) {
$quote_bgColor = 'bg-[' . esc_attr( $quote_bgColor ) . '] ';
} else {
$quote_bgColor = 'bg-(--color-pullquote-bg) ';
}
$classes = $quote_bgColor . 'pull-quote mx-break-out';
$wrapper = blockWrapperAttributes( $classes, $is_preview );
?>
<section <?php echo wp_kses_post( $wrapper ); ?>>
<div class="pull-quote__vector" aria-hidden="true">
<?php if ( $quote_bg ) : ?>
<img class="pull-quote__vector--bg" src="<?php echo esc_url( $quote_bg['url'] ); ?>" alt="" loading="lazy" role="presentation" />
<?php endif; ?>
<img class="pull-quote__vector--mobile" src="<?php echo esc_url( get_theme_file_uri( '/static/img/mobile-pullquote-vector.svg' ) ); ?>" alt="" loading="lazy" role="presentation" />
</div>
<div class="container wider pull-quote__content">
<div class="pull-quote__text">
<?php echo wp_kses_post( $quote_text ); ?>
</div>
</div>
</section>