Automattic\WooCommerce\Blocks\Utils

StyleAttributesUtils::join_styles()protected staticWC 1.0

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() code WC 9.4.2

protected static function join_styles( $rules ) {
	return implode( ' ', array_unique( array_filter( $rules ) ) );
}