WP_Theme_JSON::remove_indirect_properties()private staticWP 6.2.0

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

Метод класса: WP_Theme_JSON{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = WP_Theme_JSON::remove_indirect_properties( $input, $output );
$input(массив) (обязательный)
Node to process.
$output(массив) (обязательный) (передается по ссылке — &)
The processed node. Passed by reference.

Список изменений

С версии 6.2.0 Введена.

Код WP_Theme_JSON::remove_indirect_properties() WP 6.5.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 );
			}
		}
	}
}