Skip to content

Commit

Permalink
Global Styles: Add support for caption elements
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Jun 16, 2022
1 parent f58a3c0 commit 0a68440
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ public static function get_element_class_name( $element ) {
return array_key_exists( $element, static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES ) ? static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $element ] : '';
}

/**
* The valid elements that can be found under styles.
*
* @var string[]
*/
const ELEMENTS = array(
'link' => 'a',
'h1' => 'h1',
'h2' => 'h2',
'h3' => 'h3',
'h4' => 'h4',
'h5' => 'h5',
'h6' => 'h6',
'caption' => 'figcaption',
);

/**
* Returns the metadata for each block.
*
Expand Down

0 comments on commit 0a68440

Please sign in to comment.