From c4e375fc4edd12cb6d36ed090caf9d63d77a761f Mon Sep 17 00:00:00 2001 From: scruffian Date: Tue, 21 Oct 2025 13:49:31 +0000 Subject: [PATCH] Editor: Add support for select elements to theme.json. Adds support for the select element in theme.json so that theme builders and extenders can be style select elements consistently. We are targeting the select HTML element rather than adding a CSS class, as we do for other elements that theme.json supports. This commit adds no extra styling unless a theme opts in to use this and the specificity of any generated CSS with the element is 0. See original Gutenberg PR: https://github.com/WordPress/gutenberg/pull/70379. Example usage: {{{ "elements": { "select": { "color": { "text": "red", "background": "blue" } } } }}} Props onemaggie, joen, get_dave, wildworks, ocean90, mikachan, poena, SirLouen, tusharbharti, yashjawale, abcd95. Fixes #63555. See #63878. Built from https://develop.svn.wordpress.org/trunk@61031 git-svn-id: http://core.svn.wordpress.org/trunk@60367 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-theme-json.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-theme-json.php b/wp-includes/class-wp-theme-json.php index 2be6a2a939..26e997e5f3 100644 --- a/wp-includes/class-wp-theme-json.php +++ b/wp-includes/class-wp-theme-json.php @@ -629,6 +629,7 @@ class WP_Theme_JSON { // The block classes are necessary to target older content that won't use the new class names. 'caption' => '.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption', 'cite' => 'cite', + 'select' => 'select', ); const __EXPERIMENTAL_ELEMENT_CLASS_NAMES = array( diff --git a/wp-includes/version.php b/wp-includes/version.php index 312619a72c..1be37583fc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-61030'; +$wp_version = '6.9-alpha-61031'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.