2023-07-25 15:11:11 +00:00
< ? php
/**
* Title : Featured Products : Fresh & Tasty
* Slug : woocommerce - blocks / featured - products - fresh - and - tasty
* Categories : WooCommerce
*/
2023-09-19 07:05:44 +00:00
2023-09-25 09:48:52 +00:00
use Automattic\WooCommerce\Blocks\Patterns\PatternsHelper ;
2023-09-19 07:05:44 +00:00
2023-09-25 09:48:52 +00:00
$image1 = PatternsHelper :: get_image_url ( $images , 0 , 'images/pattern-placeholders/sweet-organic-lemons.png' );
$image2 = PatternsHelper :: get_image_url ( $images , 1 , 'images/pattern-placeholders/fresh-organic-tomatoes.png' );
$image3 = PatternsHelper :: get_image_url ( $images , 2 , 'images/pattern-placeholders/fresh-lettuce-washed.png' );
$image4 = PatternsHelper :: get_image_url ( $images , 3 , 'images/pattern-placeholders/russet-organic-potatoes.png' );
2023-10-13 08:08:35 +00:00
$first_title = $content [ 'titles' ][ 0 ][ 'default' ] ? ? '' ;
$first_description = $content [ 'descriptions' ][ 0 ][ 'default' ] ? ? '' ;
$second_description = $content [ 'descriptions' ][ 1 ][ 'default' ] ? ? '' ;
$third_description = $content [ 'descriptions' ][ 2 ][ 'default' ] ? ? '' ;
2023-11-08 13:45:23 +00:00
$fourth_description = $content [ 'descriptions' ][ 3 ][ 'default' ] ? ? '' ;
2023-07-25 15:11:11 +00:00
?>
2023-09-19 07:05:44 +00:00
2023-07-25 15:11:11 +00:00
<!-- wp : heading { " level " : 3 , " align " : " wide " } -->
2023-10-13 08:08:35 +00:00
< h3 class = " wp-block-heading alignwide " >< ? php echo esc_html ( $first_title ); ?> </h3>
2023-07-25 15:11:11 +00:00
<!-- / wp : heading -->
2023-08-10 14:33:31 +00:00
<!-- wp : columns { " verticalAlignment " : null , " align " : " wide " } -->
2023-07-25 15:11:11 +00:00
< div class = " wp-block-columns alignwide " >
2023-08-10 14:33:31 +00:00
<!-- wp : column { " style " : { " layout " : { " type " : " constrained " }} -->
2023-07-25 15:11:11 +00:00
< div class = " wp-block-column " >
2023-08-10 14:33:31 +00:00
<!-- wp : image { " align " : " full " , " scale " : " cover " , " sizeSlug " : " full " , " linkDestination " : " none " } -->
< figure class = " wp-block-image alignfull size-full " >
2023-09-19 07:05:44 +00:00
< img src = " <?php echo esc_url( $image1 ); ?> " alt = " <?php esc_attr_e( 'Placeholder image used to represent a product being showcased in the featured products pattern. 1 out of 4.', 'woo-gutenberg-products-block' ); ?> " />
2023-07-25 15:11:11 +00:00
</ figure >
<!-- / wp : image -->
2023-08-10 14:33:31 +00:00
<!-- wp : columns { " style " : { " spacing " : { " blockGap " : { " top " : " 0 " }, " margin " : { " top " : " 5px " , " bottom " : " 0 " }}}} -->
< div class = " wp-block-columns " style = " margin-top:5px;margin-bottom:0 " >
<!-- wp : column { " width " : " 67% " , " style " : { " typography " : { " fontWeight " : " 600 " }}, " layout " : { " type " : " constrained " , " justifyContent " : " left " }} -->
< div class = " wp-block-column " style = " font-weight:600;flex-basis:67% " >
2023-07-25 15:11:11 +00:00
<!-- wp : paragraph { " fontSize " : " small " } -->
2023-10-13 08:08:35 +00:00
< p class = " has-small-font-size " >< ? php echo esc_html ( $first_description ); ?> </p>
2023-08-10 14:33:31 +00:00
<!-- / wp : paragraph -->
</ div >
2023-07-25 15:11:11 +00:00
<!-- / wp : column -->
2023-08-10 14:33:31 +00:00
<!-- wp : column { " width " : " 33% " , " layout " : { " type " : " constrained " , " justifyContent " : " right " }} -->
< div class = " wp-block-column " style = " flex-basis:33% " >
<!-- wp : paragraph { " align " : " left " , " fontSize " : " small " } -->
< p class = " has-text-align-left has-small-font-size " >< ? php esc_html_e ( 'from $1.99' , 'woo-gutenberg-products-block' ); ?> </p>
2023-07-25 15:11:11 +00:00
<!-- / wp : paragraph -->
</ div >
<!-- / wp : column -->
</ div >
<!-- / wp : columns -->
</ div >
<!-- / wp : column -->
2023-08-10 14:33:31 +00:00
<!-- wp : column { " style " : { " layout " : { " type " : " constrained " }} -->
2023-07-25 15:11:11 +00:00
< div class = " wp-block-column " >
2023-08-10 14:33:31 +00:00
<!-- wp : image { " align " : " full " , " scale " : " cover " , " sizeSlug " : " full " , " linkDestination " : " none " } -->
< figure class = " wp-block-image alignfull size-full " >
2023-09-19 07:05:44 +00:00
< img src = " <?php echo esc_url( $image2 ); ?> " alt = " <?php esc_attr_e( 'Placeholder image used to represent a product being showcased in the featured products pattern. 2 out of 4.', 'woo-gutenberg-products-block' ); ?> " />
2023-07-25 15:11:11 +00:00
</ figure >
<!-- / wp : image -->
2023-08-10 14:33:31 +00:00
<!-- wp : columns { " style " : { " spacing " : { " blockGap " : { " top " : " 0 " }, " margin " : { " top " : " 5px " , " bottom " : " 0 " }}}} -->
< div class = " wp-block-columns " style = " margin-top:5px;margin-bottom:0 " >
<!-- wp : column { " width " : " 67% " , " style " : { " typography " : { " fontWeight " : " 600 " }}, " layout " : { " type " : " constrained " , " justifyContent " : " left " }} -->
< div class = " wp-block-column " style = " font-weight:600;flex-basis:67% " >
2023-07-25 15:11:11 +00:00
<!-- wp : paragraph { " fontSize " : " small " } -->
2023-10-13 08:08:35 +00:00
< p class = " has-small-font-size " >< ? php echo esc_html ( $second_description ); ?> </p>
2023-08-10 14:33:31 +00:00
<!-- / wp : paragraph -->
</ div >
2023-07-25 15:11:11 +00:00
<!-- / wp : column -->
2023-08-10 14:33:31 +00:00
<!-- wp : column { " width " : " 33% " , " layout " : { " type " : " constrained " , " justifyContent " : " right " }} -->
< div class = " wp-block-column " style = " flex-basis:33% " >
<!-- wp : paragraph { " align " : " left " , " fontSize " : " small " } -->
< p class = " has-text-align-left has-small-font-size " >< ? php esc_html_e ( 'from $2.99' , 'woo-gutenberg-products-block' ); ?> </p>
2023-07-25 15:11:11 +00:00
<!-- / wp : paragraph -->
</ div >
<!-- / wp : column -->
</ div >
<!-- / wp : columns -->
</ div >
<!-- / wp : column -->
2023-08-10 14:33:31 +00:00
<!-- wp : column { " style " : { " layout " : { " type " : " constrained " }} -->
2023-07-25 15:11:11 +00:00
< div class = " wp-block-column " >
2023-08-10 14:33:31 +00:00
<!-- wp : image { " align " : " full " , " scale " : " cover " , " sizeSlug " : " full " , " linkDestination " : " none " } -->
< figure class = " wp-block-image alignfull size-full " >
2023-09-19 07:05:44 +00:00
< img src = " <?php echo esc_url( $image3 ); ?> " alt = " <?php esc_attr_e( 'Placeholder image used to represent a product being showcased in the featured products pattern. 3 out of 4.', 'woo-gutenberg-products-block' ); ?> " />
2023-07-25 15:11:11 +00:00
</ figure >
<!-- / wp : image -->
2023-08-10 14:33:31 +00:00
<!-- wp : columns { " style " : { " spacing " : { " blockGap " : { " top " : " 0 " }, " margin " : { " top " : " 5px " , " bottom " : " 0 " }}}} -->
< div class = " wp-block-columns " style = " margin-top:5px;margin-bottom:0 " >
<!-- wp : column { " width " : " 67% " , " style " : { " typography " : { " fontWeight " : " 600 " }}, " layout " : { " type " : " constrained " , " justifyContent " : " left " }} -->
< div class = " wp-block-column " style = " font-weight:600;flex-basis:67% " >
2023-07-25 15:11:11 +00:00
<!-- wp : paragraph { " fontSize " : " small " } -->
2023-10-13 08:08:35 +00:00
< p class = " has-small-font-size " >< ? php echo esc_html ( $third_description ); ?> </p>
2023-07-25 15:11:11 +00:00
<!-- / wp : paragraph -->
</ div >
<!-- / wp : column -->
2023-08-10 14:33:31 +00:00
<!-- wp : column { " width " : " 33% " , " layout " : { " type " : " constrained " , " justifyContent " : " right " }} -->
< div class = " wp-block-column " style = " flex-basis:33% " >
<!-- wp : paragraph { " align " : " left " , " fontSize " : " small " } -->
< p class = " has-text-align-left has-small-font-size " >< ? php esc_html_e ( 'from $0.99' , 'woo-gutenberg-products-block' ); ?> </p>
2023-07-25 15:11:11 +00:00
<!-- / wp : paragraph -->
</ div >
<!-- / wp : column -->
</ div >
<!-- / wp : columns -->
</ div >
<!-- / wp : column -->
2023-08-10 14:33:31 +00:00
<!-- wp : column { " style " : { " layout " : { " type " : " constrained " }} -->
2023-07-25 15:11:11 +00:00
< div class = " wp-block-column " >
2023-08-10 14:33:31 +00:00
<!-- wp : image { " align " : " full " , " scale " : " cover " , " sizeSlug " : " full " , " linkDestination " : " none " } -->
< figure class = " wp-block-image alignfull size-full " >
2023-09-19 07:05:44 +00:00
< img src = " <?php echo esc_url( $image4 ); ?> " alt = " <?php esc_attr_e( 'Placeholder image used to represent a product being showcased in the featured products pattern. 4 out of 4.', 'woo-gutenberg-products-block' ); ?> " />
2023-07-25 15:11:11 +00:00
</ figure >
<!-- / wp : image -->
2023-08-10 14:33:31 +00:00
<!-- wp : columns { " style " : { " spacing " : { " blockGap " : { " top " : " 0 " }, " margin " : { " top " : " 5px " , " bottom " : " 0 " }}}} -->
< div class = " wp-block-columns " style = " margin-top:5px;margin-bottom:0 " >
<!-- wp : column { " width " : " 67% " , " style " : { " typography " : { " fontWeight " : " 600 " }}, " layout " : { " type " : " constrained " , " justifyContent " : " left " }} -->
< div class = " wp-block-column " style = " font-weight:600;flex-basis:67% " >
2023-07-25 15:11:11 +00:00
<!-- wp : paragraph { " fontSize " : " small " } -->
2023-11-08 13:45:23 +00:00
< p class = " has-small-font-size " >< ? php echo esc_html ( $fourth_description ); ?> </p>
2023-07-25 15:11:11 +00:00
<!-- / wp : paragraph -->
</ div >
<!-- / wp : column -->
2023-08-10 14:33:31 +00:00
<!-- wp : column { " width " : " 33% " , " layout " : { " type " : " constrained " , " justifyContent " : " right " }} -->
< div class = " wp-block-column " style = " flex-basis:33% " >
<!-- wp : paragraph { " align " : " left " , " fontSize " : " small " } -->
< p class = " has-text-align-left has-small-font-size " >< ? php esc_html_e ( 'from $1.49' , 'woo-gutenberg-products-block' ); ?> </p>
2023-07-25 15:11:11 +00:00
<!-- / wp : paragraph -->
</ div >
<!-- / wp : column -->
</ div >
<!-- / wp : columns -->
</ div >
<!-- / wp : column -->
</ div >
<!-- / wp : columns -->