WP_Theme_JSON::get_svg_filters( array $origins ): string

In this article

Converts all filter (duotone) presets into SVGs.

Parameters

$originsarrayrequired
List of origins to process.

Return

string SVG filters.

Source

			'path'     => array( 'styles', 'blocks', $name, 'variations', $variation ),
			'selector' => $selectors[ $name ]['styleVariations'][ $variation ],
		);
	}
}

$nodes[] = array(
	'name'       => $name,
	'path'       => array( 'styles', 'blocks', $name ),
	'selector'   => $selector,
	'selectors'  => $feature_selectors,
	'duotone'    => $duotone_selector,
	'features'   => $feature_selectors,
	'variations' => $variation_selectors,
);

if ( isset( $theme_json['styles']['blocks'][ $name ]['elements'] ) ) {
	foreach ( $theme_json['styles']['blocks'][ $name ]['elements'] as $element => $node ) {
		$nodes[] = array(
			'path'     => array( 'styles', 'blocks', $name, 'elements', $element ),
			'selector' => $selectors[ $name ]['elements'][ $element ],
		);

		// Handle any pseudo selectors for the element.
		if ( isset( static::VALID_ELEMENT_PSEUDO_SELECTORS[ $element ] ) ) {

Changelog

VersionDescription
5.9.1Introduced.

User Contributed Notes

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