From c539d3caa06b5e2ae83f135ebd48bea89db702a4 Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Wed, 25 May 2022 17:23:20 +0300 Subject: [PATCH 1/2] adds hover state link mapping to elements --- lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php | 7 +++++++ 1 file changed, 7 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 0331616fb1b9e5..ec2ba6903eff60 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 @@ -17,8 +17,15 @@ class WP_Theme_JSON_6_1 extends WP_Theme_JSON_6_0 { const __EXPERIMENTAL_ELEMENT_BUTTON_CLASS_NAME = 'wp-element-button'; + /** + * The valid elements that can be found under styles. + * + * @since 5.8.0 + * @var string[] + */ const ELEMENTS = array( 'link' => 'a', + 'link:hover' => 'a:hover', 'h1' => 'h1', 'h2' => 'h2', 'h3' => 'h3', From 6d248680571c56002784524dd613ee3a2ce7454e Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Thu, 26 May 2022 10:00:56 +0300 Subject: [PATCH 2/2] adds the hover state to links to the client side elements API --- packages/blocks/src/api/constants.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/blocks/src/api/constants.js b/packages/blocks/src/api/constants.js index a5ed771d72d2fa..9a92bbee1a0891 100644 --- a/packages/blocks/src/api/constants.js +++ b/packages/blocks/src/api/constants.js @@ -183,6 +183,7 @@ export const __EXPERIMENTAL_STYLE_PROPERTY = { export const __EXPERIMENTAL_ELEMENTS = { link: 'a', + 'link:hover': 'a:hover', h1: 'h1', h2: 'h2', h3: 'h3',