Commit 245f07d87d for wordpress.org
commit 245f07d87d50c33961a6260ea7ff1e9c7082deb3
Author: peterwilsoncc <peterwilsoncc@git.wordpress.org>
Date: Fri Oct 23 01:53:51 2026 +0000
Themes: Add `label` support to `theme.json` schema.
Adds the `label` as a supported element within the `theme.json` schema to allow theme developers/editors to modify the styles as required.
Developed in https://github.com/WordPress/wordpress-develop/pull/13105.
Merges PHP component of https://github.com/WordPress/gutenberg/pull/81160 to WordPress-Develop.
Fixes #65899.
Props sarthaknagoshe2002, wildworks, onemaggie, im3dabasia1.
Built from https://develop.svn.wordpress.org/trunk@64683
git-svn-id: http://core.svn.wordpress.org/trunk@63833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/class-wp-theme-json.php b/wp-includes/class-wp-theme-json.php
index 555e6106d2..34c737bb0d 100644
--- a/wp-includes/class-wp-theme-json.php
+++ b/wp-includes/class-wp-theme-json.php
@@ -893,6 +893,7 @@ class WP_Theme_JSON {
*
* @since 5.8.0
* @since 6.1.0 Added `heading`, `button`, and `caption` elements.
+ * @since 7.2.0 Added `label` element.
* @var string[]
*/
const ELEMENTS = array(
@@ -909,6 +910,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',
+ 'label' => 'label',
'textInput' => 'textarea, input:where([type=email],[type=number],[type=password],[type=search],[type=text],[type=tel],[type=url])',
'select' => 'select',
);
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 7d9e3aa80e..7cf060120c 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-beta1-64682';
+$wp_version = '7.2-beta1-64683';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.