Add missing wrapper from FeaturedCategory & FeatureProduct blocks (https://github.com/woocommerce/woocommerce-blocks/pull/3746)
* Add missing wrapper from FeaturedCategory block In the rendered block we now have a div.wc-block-featured-category__wrapper around inner elements. * Add missing inner wrapper for Featured Product block In the rendered block we now have a div.wc-block-featured-product__wrapper around inner elements.
This commit is contained in:
parent
23ac1073ff
commit
a922e469ca
|
@ -56,15 +56,15 @@ class FeaturedCategory extends AbstractDynamicBlock {
|
|||
wc_format_content( $category->description )
|
||||
);
|
||||
|
||||
$output = sprintf( '<div class="%1$s" style="%2$s">', esc_attr( $this->get_classes( $attributes ) ), esc_attr( $this->get_styles( $attributes, $category ) ) );
|
||||
|
||||
$output = sprintf( '<div class="%1$s" style="%2$s">', esc_attr( $this->get_classes( $attributes ) ), esc_attr( $this->get_styles( $attributes, $category ) ) );
|
||||
$output .= '<div class="wc-block-featured-category__wrapper">';
|
||||
$output .= $title;
|
||||
if ( $attributes['showDesc'] ) {
|
||||
$output .= $desc_str;
|
||||
}
|
||||
$output .= '<div class="wc-block-featured-category__link">' . $content . '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
$output .= '</div>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,8 +69,8 @@ class FeaturedProduct extends AbstractDynamicBlock {
|
|||
$product->get_price_html()
|
||||
);
|
||||
|
||||
$output = sprintf( '<div class="%1$s" style="%2$s">', esc_attr( $this->get_classes( $attributes ) ), esc_attr( $this->get_styles( $attributes, $product ) ) );
|
||||
|
||||
$output = sprintf( '<div class="%1$s" style="%2$s">', esc_attr( $this->get_classes( $attributes ) ), esc_attr( $this->get_styles( $attributes, $product ) ) );
|
||||
$output .= '<div class="wc-block-featured-product__wrapper">';
|
||||
$output .= $title;
|
||||
if ( $attributes['showDesc'] ) {
|
||||
$output .= $desc_str;
|
||||
|
@ -80,6 +80,7 @@ class FeaturedProduct extends AbstractDynamicBlock {
|
|||
}
|
||||
$output .= '<div class="wc-block-featured-product__link">' . $content . '</div>';
|
||||
$output .= '</div>';
|
||||
$output .= '</div>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue