WP_Duotone::get_css_var()private staticWP 6.3.0

Get the CSS variable for a duotone preset.

Example output: var(--wp--preset--duotone--blue-orange)

Method of the class: WP_Duotone{}

No Hooks.

Return

String. The CSS variable.

Usage

$result = WP_Duotone::get_css_var( $slug );
$slug(string) (required)
The slug of the duotone preset.

Changelog

Since 6.3.0 Introduced.

WP_Duotone::get_css_var() code WP 6.7.1

private static function get_css_var( $slug ) {
	$name = self::get_css_custom_property_name( $slug );
	return "var($name)";
}