W3cubDocs

/WordPress

WP_Duotone::get_css_custom_property_name( string $slug ): string

Gets the CSS variable name for a duotone preset.

Description

Example output: –wp–preset–duotone–blue-orange

Parameters

$slugstringrequired
The slug of the duotone preset.

Return

string The CSS variable name.

Source

private static function get_css_custom_property_name( $slug ) {
	return "--wp--preset--duotone--$slug";
}

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_custom_property_name