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

 *     // => false
 *
 *     static::get_metadata_boolean( $data, array( 'color', 'defaultPalette' ) );
 *     // => true
 *
 * @since 6.0.0
 *
 * @param array      $data          The data to inspect.
 * @param bool|array $path          Boolean or path to a boolean.
 * @param bool       $default_value Default value if the referenced path is missing.
 *                                  Default false.
 * @return bool Value of boolean metadata.
 */
protected static function get_metadata_boolean( $data, $path, $default_value = false ) {
	if ( is_bool( $path ) ) {
		return $path;
	}

	if ( is_array( $path ) ) {
		$value = _wp_array_get( $data, $path );
		if ( null !== $value ) {
			return $value;
		}
	}

Changelog

VersionDescription
5.9.1Introduced.

User Contributed Notes

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