WP_Theme_JSON::remove_insecure_inner_block_stylesprotected staticWP 6.8.0

Remove insecure styles from inner blocks and their elements.

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

Хуков нет.

Возвращает

Массив. Sanitized block type styles.

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

$result = WP_Theme_JSON::remove_insecure_inner_block_styles( $blocks );
$blocks(массив) (обязательный)
The block styles to process.

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

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

Код WP_Theme_JSON::remove_insecure_inner_block_styles() WP 7.0

protected static function remove_insecure_inner_block_styles( $blocks ) {
	$sanitized = array();
	foreach ( $blocks as $block_type => $block_input ) {
		$block_output = static::remove_insecure_styles( $block_input );

		if ( isset( $block_input['elements'] ) ) {
			$block_output['elements'] = static::remove_insecure_element_styles( $block_input['elements'] );
		}

		$sanitized[ $block_type ] = $block_output;
	}
	return $sanitized;
}