WP_Duotone::get_filter_css_property_value_from_preset()public staticWP 6.3.0

Deprecated from version 6.3.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Gets the CSS filter property value from a preset.

Exported for the deprecated function wp_get_duotone_filter_id().

Method of the class: WP_Duotone{}

No Hooks.

Return

String. The CSS filter property value.

Usage

$result = WP_Duotone::get_filter_css_property_value_from_preset( $preset );
$preset(array) (required)
The duotone preset.

Changelog

Since 6.3.0 Introduced.
Deprecated since 6.3.0

WP_Duotone::get_filter_css_property_value_from_preset() code WP 6.7.1

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 . ')';
}