WP_Duotone::get_css_var
Get the CSS variable for a duotone preset.
Example output: var(--wp--preset--duotone--blue-orange)
Method of the class: WP_Duotone{}
No Hooks.
Returns
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() WP Duotone::get css var code WP 6.8.3
private static function get_css_var( $slug ) {
$name = self::get_css_custom_property_name( $slug );
return "var($name)";
}