Automattic\WooCommerce\Blocks\Utils
StyleAttributesUtils::join_styles()
Join classes and styles while removing duplicates and null values.
Method of the class: StyleAttributesUtils{}
No Hooks.
Return
Array
.
Usage
$result = StyleAttributesUtils::join_styles( $rules );
- $rules(array) (required)
- Array of classes or styles.
StyleAttributesUtils::join_styles() StyleAttributesUtils::join styles code WC 9.4.2
protected static function join_styles( $rules ) { return implode( ' ', array_unique( array_filter( $rules ) ) ); }