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.

Top ↑

Return

string The name of the class.


Top ↑

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


Top ↑

Changelog

Changelog
Version Description
6.1.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.