WP_Duotone::get_filter_css_property_value_from_preset( array $preset ): string

This method has been deprecated.

Gets the CSS filter property value from a preset.

Description

Exported for the deprecated function wp_get_duotone_filter_id() .

Parameters

$presetarrayrequired
The duotone preset.

Return

string The CSS filter property value.

Source

public static function get_filter_css_property_value_from_preset( $preset ) {
	_deprecated_function( __FUNCTION__, '6.3.0' );

	if ( isset( $preset['colors'] ) && is_string( $preset['colors'] ) ) {
		return $preset['colors'];
	}

	$filter_id = self::get_filter_id_from_preset( $preset );

	return 'url(#' . $filter_id . ')';
}

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

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