WP_Theme_JSON::get_element_class_name
Returns a class name by an element name.
Method of the class: WP_Theme_JSON{}
No Hooks.
Returns
String. The name of the class.
Usage
$result = WP_Theme_JSON::get_element_class_name( $element );
- $element(string) (required)
- The name of the element.
Changelog
| Since 6.1.0 | Introduced. |
WP_Theme_JSON::get_element_class_name() WP Theme JSON::get element class name code WP 6.9.1
public static function get_element_class_name( $element ) {
$class_name = '';
if ( isset( static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $element ] ) ) {
$class_name = static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $element ];
}
return $class_name;
}