Automattic\WooCommerce\Blocks\Utils
StyleAttributesUtils::get_classes_by_attributes()
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() StyleAttributesUtils::get classes by attributes code WC 9.4.2
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']; }