WP_Theme_JSON::get_element_class_name() – Returns a class name by an element name.

You appear to be a bot. Output may be restricted

Description

Returns a class name by an element name.

Usage

$string = WP_Theme_JSON::get_element_class_name( $element );

Parameters

$element
( string ) required – The name of the element.

Returns

string The name of the class.

Source

File name: wordpress/wp-includes/class-wp-theme-json.php


Lines:

1 to 12 of 12
  public static function get_element_class_name( $element ) {
    $class_name = '';

    // TODO: Replace array_key_exists() with isset() check once WordPress drops
    // support for PHP 5.6. See https://core.trac.wordpress.org/ticket/57067.
    if ( array_key_exists( $element, static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES ) ) {
      $class_name = static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $element ];
    }

    return $class_name;
  }
 

 View on GitHub View on Trac