Automattic\WooCommerce\Blocks\Utils

StyleAttributesUtils::get_classes_by_attributes()public staticWC 1.0

Get space-separated classes from block attributes.

Method of the class: StyleAttributesUtils{}

No Hooks.

Return

String. Space-separated classes.

Usage

$result = StyleAttributesUtils::get_classes_by_attributes( $attributes, $properties );
$attributes(array) (required)
Block attributes.
$properties(array)
Properties to get classes from.
Default: array()

StyleAttributesUtils::get_classes_by_attributes() code WC 8.7.0

public static function get_classes_by_attributes( $attributes, $properties = array() ) {
	$classes_and_styles = self::get_classes_and_styles_by_attributes( $attributes, $properties );

	return $classes_and_styles['classes'];
}