From b0b64739ff794b9ac14a51bf9655c535042f1425 Mon Sep 17 00:00:00 2001 From: isabel_brison Date: Tue, 9 Jan 2024 06:26:16 +0000 Subject: [PATCH] Themes: Add theme support for appearance tools. Reapplies the patch reverted in #57649 as the original patch was no longer applying cleanly. Adds theme support for appearance tools to `WP_Theme_JSON_Resolver`. Props andrewserong, mukesh27, noisysocks. Fixes #60118. Built from https://develop.svn.wordpress.org/trunk@57255 git-svn-id: http://core.svn.wordpress.org/trunk@56761 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-theme-json-resolver.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-theme-json-resolver.php b/wp-includes/class-wp-theme-json-resolver.php index 90710a5c1b..5a785612ce 100644 --- a/wp-includes/class-wp-theme-json-resolver.php +++ b/wp-includes/class-wp-theme-json-resolver.php @@ -327,6 +327,11 @@ class WP_Theme_JSON_Resolver { $theme_support_data['settings']['border']['style'] = true; $theme_support_data['settings']['border']['width'] = true; } + + // Allow themes to enable appearance tools via theme_support. + if ( current_theme_supports( 'appearance-tools' ) ) { + $theme_support_data['settings']['appearanceTools'] = true; + } } $with_theme_supports = new WP_Theme_JSON( $theme_support_data ); $with_theme_supports->merge( static::$theme ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 5a4377a93b..9c712beda9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57254'; +$wp_version = '6.5-alpha-57255'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.