wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_get_duotone_filter_property › WordPress Function

Seit5.9.0
Veraltetn/v
wp_get_duotone_filter_property ( $preset )
Zugriff:
  • private
Parameter:
  • (array) $preset Duotone preset value as seen in theme.json.
    Erforderlich: Ja
Gibt zurück:
  • (string) Duotone CSS filter property url value.
Definiert in:
Codex:
Changelog:
  • 6.1.0

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



Quellcode

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