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

	if ( $background_color && ! $border_color_matches && ! $text_color_matches ) {
		$declarations[] = array(
			'name'  => 'color',
			'value' => $background_color,
		);
	}

	return $declarations;
}

/**
 * An internal method to get the block nodes from a theme.json file.
 *
 * @since 6.1.0
 * @since 6.3.0 Refactored and stabilized selectors API.
 * @since 6.6.0 Added optional selectors and options for generating block nodes.
 * @since 6.7.0 Added $include_node_paths_only option.
 *
 * @param array $theme_json The theme.json converted to an array.
 * @param array $selectors  Optional list of selectors per block.
 * @param array $options {
 *     Optional. An array of options for now used for internal purposes only (may change without notice).
 *
 *     @type bool $include_block_style_variations Include nodes for block style variations. Default false.
 *     @type bool $include_node_paths_only        Return only block nodes node paths. Default false.

Changelog

VersionDescription
5.9.1Introduced.

User Contributed Notes

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