WP_Duotone::get_css_var( string $slug ): string

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

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

VersionDescription
6.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.