wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_get_duotone_filter_property › WordPress Function

Since5.9.0
Deprecatedn/a
wp_get_duotone_filter_property ( $preset )
Access:
  • private
Parameters:
  • (array) $preset Duotone preset value as seen in theme.json.
    Required: Yes
Returns:
  • (string) Duotone CSS filter property url value.
Defined at:
Codex:
Change Log:
  • 6.1.0

Returns the CSS filter property url to reference the rendered SVG.



Source

function wp_get_duotone_filter_property( $preset ) {
	if ( isset( $preset['colors'] ) && 'unset' === $preset['colors'] ) {
		return 'none';
	}
	$filter_id = wp_get_duotone_filter_id( $preset );
	return "url('#" . $filter_id . "')";
}