Avoid duplicate custom classnames (#51910)
* Avoid duplicate custom classnames * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
a6d09c9133
commit
1e8b6d6b76
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Avoid duplicate custom classnames
|
|
@ -169,10 +169,10 @@ class AddToCartForm extends AbstractBlock {
|
|||
$product = $this->add_is_descendent_of_single_product_block_hidden_input_to_product_form( $product, $is_descendent_of_single_product_block );
|
||||
}
|
||||
|
||||
$product = $this->add_classes_to_add_to_cart_form_input( $product, $attributes );
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array(), array( 'extra_classes' ) );
|
||||
$product = $this->add_classes_to_add_to_cart_form_input( $product, $attributes );
|
||||
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes );
|
||||
$product_classname = $is_descendent_of_single_product_block ? 'product' : '';
|
||||
$product_classname = $is_descendent_of_single_product_block ? 'product' : '';
|
||||
|
||||
$classes = implode(
|
||||
' ',
|
||||
|
|
|
@ -34,7 +34,7 @@ class Breadcrumbs extends AbstractBlock {
|
|||
return;
|
||||
}
|
||||
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes );
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array(), array( 'extra_classes' ) );
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
|
|
|
@ -35,7 +35,7 @@ class CatalogSorting extends AbstractBlock {
|
|||
return;
|
||||
}
|
||||
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes );
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array(), array( 'extra_classes' ) );
|
||||
$wrapper_attributes = get_block_wrapper_attributes(
|
||||
array(
|
||||
'class' => implode(
|
||||
|
|
|
@ -90,7 +90,7 @@ class ProductAverageRating extends AbstractBlock {
|
|||
return '';
|
||||
}
|
||||
|
||||
$styles_and_classes = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes );
|
||||
$styles_and_classes = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array(), array( 'extra_classes' ) );
|
||||
$text_align_styles_and_classes = StyleAttributesUtils::get_text_align_class_and_style( $attributes );
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes(
|
||||
|
|
|
@ -56,8 +56,7 @@ class ProductGalleryPager extends AbstractBlock {
|
|||
}
|
||||
|
||||
$number_of_thumbnails = $block->context['thumbnailsNumberOfThumbnails'] ?? 0;
|
||||
$classname = StyleAttributesUtils::get_classes_by_attributes( $attributes, array( 'extra_classes' ) );
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => trim( $classname ) ) );
|
||||
$wrapper_attributes = get_block_wrapper_attributes();
|
||||
$post_id = $block->context['postId'] ?? '';
|
||||
$product = wc_get_product( $post_id );
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ class ProductImage extends AbstractBlock {
|
|||
}
|
||||
$parsed_attributes = $this->parse_attributes( $attributes );
|
||||
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes );
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array(), array( 'extra_classes' ) );
|
||||
|
||||
$post_id = isset( $block->context['postId'] ) ? $block->context['postId'] : '';
|
||||
$product = wc_get_product( $post_id );
|
||||
|
|
|
@ -45,7 +45,7 @@ class StoreNotices extends AbstractBlock {
|
|||
return;
|
||||
}
|
||||
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes );
|
||||
$classes_and_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array(), array( 'extra_classes' ) );
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
|
|
Loading…
Reference in New Issue