WP_Theme_JSON::filter_slugs( array $node, array $slugs ): array

In this article

Removes the preset values whose slug is equal to any of given slugs.

Parameters

$nodearrayrequired
The node with the presets to validate.
$slugsarrayrequired
The slugs that should not be overridden.

Return

array The new node.

Source

 * If the current selector is a pseudo selector that's defined in the allow list for the current
 * element then compute the style properties for it.
 * Otherwise just compute the styles for the default selector as normal.
 */
if ( $pseudo_selector && isset( $node[ $pseudo_selector ] ) &&
	isset( static::VALID_ELEMENT_PSEUDO_SELECTORS[ $current_element ] )
	&& in_array( $pseudo_selector, static::VALID_ELEMENT_PSEUDO_SELECTORS[ $current_element ], true )
) {
	$declarations = static::compute_style_properties( $node[ $pseudo_selector ], $settings, null, $this->theme_json, $selector, $use_root_padding );
} else {
	$declarations = static::compute_style_properties( $node, $settings, null, $this->theme_json, $selector, $use_root_padding );
}

$block_rules = '';

Changelog

VersionDescription
5.9.0Introduced.

User Contributed Notes

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