WP_Theme_JSON::remove_indirect_properties( array $input, array $output )

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Removes indirect properties from the given input node and sets in the given output node.

Parameters

$inputarrayrequired
Node to process.
$outputarrayrequired
The processed node. Passed by reference.

Source

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 );
			}
		}
	}
}

Changelog

VersionDescription
6.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.