From 2e63587852e61629397da4b478468321e3cb7204 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Wed, 18 May 2022 16:02:43 +0100 Subject: [PATCH] Global Styles: Add support for caption elements --- .../wordpress-6.1/class-wp-theme-json-6-1.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php b/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php index cea9bd77cf17e..48cd15fef631a 100644 --- a/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php +++ b/lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php @@ -15,6 +15,22 @@ * @access private */ class WP_Theme_JSON_6_1 extends WP_Theme_JSON_6_0 { + /** + * 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. *