WP_Theme_JSON::remove_indirect_properties()
Removes indirect properties from the given input node and sets in the given output node.
Method of the class: WP_Theme_JSON{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WP_Theme_JSON::remove_indirect_properties( $input, $output );
- $input(array) (required)
- Node to process.
- $output(array) (required) (passed by reference — &)
- The processed node. Passed by reference.
Changelog
Since 6.2.0 | Introduced. |
WP_Theme_JSON::remove_indirect_properties() WP Theme JSON::remove indirect properties code WP 6.6.2
private static function remove_indirect_properties( $input, &$output ) { foreach ( static::INDIRECT_PROPERTIES_METADATA as $property => $paths ) { foreach ( $paths as $path ) { $value = _wp_array_get( $input, $path ); if ( is_string( $value ) && static::is_safe_css_declaration( $property, $value ) ) { _wp_array_set( $output, $path, $value ); } } } }