WP_Theme_JSON::get_element_class_name()public staticWP 6.1.0

Returns a class name by an element name.

Method of the class: WP_Theme_JSON{}

No Hooks.

Return

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() code WP 6.5.4

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;
}