Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit cde9117

Browse files
Update Hero Product – Split Pattern Color Settings (#9433)
* Update color settings to abide by designs. * Update pattern heading to use inline style. This ensures the heading color will be white by default and not take on the heading color from the active theme. * Translate and escape rendered text in pattern.
1 parent ececfb2 commit cde9117

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

patterns/hero-product-split.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,26 @@
66
*/
77
?>
88

9-
<!-- wp:media-text {"align":"full","mediaPosition":"right","mediaType":"image","mediaSizeSlug":"full","imageFill":false,"backgroundColor":"contrast","textColor":"base"} -->
10-
<div class="wp-block-media-text alignfull has-media-on-the-right is-stacked-on-mobile has-base-color has-contrast-background-color has-text-color has-background">
11-
<div class="wp-block-media-text__content"><!-- wp:heading -->
12-
<h2 class="wp-block-heading">Get cozy this fall with flannel shirts</h2>
9+
<!-- wp:media-text {"align":"full","mediaPosition":"right","mediaType":"image","mediaSizeSlug":"full","imageFill":false,"style":{"color":{"background":"#000000","text":"#ffffff"}}} -->
10+
<div class="wp-block-media-text alignfull has-media-on-the-right is-stacked-on-mobile has-text-color has-background" style="color:#ffffff;background-color:#000000">
11+
<div class="wp-block-media-text__content">
12+
<!-- wp:heading {"style":{"color":{"text":"#ffffff"}}} -->
13+
<h2 class="wp-block-heading has-text-color" style="color:#ffffff;"><?php esc_html_e( 'Get cozy this fall with flannel shirts', 'woo-gutenberg-products-block' ); ?></h2>
1314
<!-- /wp:heading -->
1415

1516
<!-- wp:buttons {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|40"}}}} -->
1617
<div class="wp-block-buttons" style="margin-bottom:var(--wp--preset--spacing--40)">
17-
<!-- wp:button -->
18-
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button">Shop now</a></div>
19-
<!-- /wp:button -->
18+
<!-- wp:button {"style":{"color":{"text":"#000000","background":"#ffffff"}}} -->
19+
<div class="wp-block-button">
20+
<a class="wp-block-button__link has-text-color has-background wp-element-button" style="color:#000000;background-color:#ffffff;"><?php esc_html_e( 'Shop now', 'woo-gutenberg-products-block' ); ?></a>
21+
</div>
22+
<!-- /wp:button -->
2023
</div>
2124
<!-- /wp:buttons -->
2225
</div>
2326

2427
<figure class="wp-block-media-text__media">
25-
<img src="<?php echo esc_url( plugins_url( 'images/pattern-placeholders/hero-product-split.webp', dirname( __FILE__ ) ) ); ?>" alt="Woman in red, black, and white plaid hoodie." />
28+
<img src="<?php echo esc_url( plugins_url( 'images/pattern-placeholders/hero-product-split.webp', dirname( __FILE__ ) ) ); ?>" alt="<?php esc_attr_e( 'Woman in red, black, and white plaid hoodie.', 'woo-gutenberg-products-block' ); ?>" />
2629
</figure>
2730
</div>
2831
<!-- /wp:media-text -->

0 commit comments

Comments
 (0)