Given a tree, converts the internal representation of variables to the CSS representation.
Description
It is recursive and modifies the input in-place.
Parameters
$treearrayrequired- Input to process.
Source
private static function resolve_custom_css_format( $tree ) {
$prefix = 'var:';
foreach ( $tree as $key => $data ) {
if ( is_string( $data ) && str_starts_with( $data, $prefix ) ) {
$tree[ $key ] = self::convert_custom_properties( $data );
} elseif ( is_array( $data ) ) {
$tree[ $key ] = self::resolve_custom_css_format( $data );
}
}
return $tree;
}
Changelog
| Version | Description |
|---|---|
| 6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.