This is used to convert the internal representation of variables to the CSS representation.
Description
For example, var:preset|color|vivid-green-cyan
becomes var(--wp--preset--color--vivid-green-cyan)
.
Parameters
$value
stringrequired- The variable such as var:
preset|color|vivid
-green-cyan to convert.
Source
if ( empty( $slugs ) ) {
return $node;
}
$new_node = array();
foreach ( $node as $value ) {
if ( isset( $value['slug'] ) && ! in_array( $value['slug'], $slugs, true ) ) {
$new_node[] = $value;
}
}
return $new_node;
}
/**
* Removes insecure data from theme.json.
Changelog
Version | Description |
---|---|
6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.