WP_Theme_JSON::get_element_class_name( string $element ): string

In this article

Returns a class name by an element name.

Parameters

$elementstringrequired
The name of the element.

Return

string The name of the class.

Source

	'link'   => array( ':link', ':any-link', ':visited', ':hover', ':focus', ':active' ),
	'button' => array( ':link', ':any-link', ':visited', ':hover', ':focus', ':active' ),
);

/**
 * The valid elements that can be found under styles.
 *
 * @since 5.8.0
 * @since 6.1.0 Added `heading`, `button`, and `caption` elements.
 * @var string[]
 */
const ELEMENTS = array(
	'link'    => 'a:where(:not(.wp-element-button))', // The `where` is needed to lower the specificity.

Changelog

VersionDescription
6.1.0Introduced.

User Contributed Notes

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