W3cubDocs

/WordPress

WP_Duotone::get_css_var( string $slug ): string

Get the CSS variable for a duotone preset.

Description

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

Parameters

$slugstringrequired
The slug of the duotone preset.

Return

string The CSS variable.

Source

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

Changelog

Version Description
6.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_duotone/get_css_var