Given an array of presets keyed by origin and the value key of the preset, it returns an array where each key is the preset slug and each value the preset value.
$preset_per_originarrayrequired
$value_keystringrequired
protected static function schema_in_root_and_per_origin( $schema ) {
$schema_in_root_and_per_origin = $schema;
foreach ( static::VALID_ORIGINS as $origin ) {
$schema_in_root_and_per_origin[ $origin ] = $schema;
}
return $schema_in_root_and_per_origin;
}
/**
* Returns a class name by an element name.
*
* @since 6.1.0
*
* @param string $element The name of the element.
* @return string The name of the class.
*/
public static function get_element_class_name( $element ) {
$class_name = '';
| Version | Description |
|---|---|
| 5.8.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_theme_json/get_merged_preset_by_slug