WP_Theme_JSON::get_element_class_name( string $element ): string
Returns a class name by an element name.
Parameters
-
$element
string Required -
The name of the element.
Return
string The name of the class.
Source
File: wp-includes/class-wp-theme-json.php
.
View all references
public static function get_element_class_name( $element ) {
$class_name = '';
if ( array_key_exists( $element, static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES ) ) {
$class_name = static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $element ];
}
return $class_name;
}
Changelog
Version | Description |
---|---|
6.1.0 | Introduced. |