From 367e6b4cdfd507e53c8c172f64881cb3d6a2d8f0 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Sat, 14 Jan 2023 09:36:14 +0000 Subject: [PATCH] Themes: Add opt-in Appearance Tools support for Classic Themes. This changeset merges the following changes from Gutenberg repository: - Allow themes without `theme.json` to opt-in to appearance tools via `add_theme_support( 'appearance-tools' );` - Update `wpThemeJsonResolver` unit tests accordingly See the following pull request for more info: https://github.com/WordPress/gutenberg/pull/43337 Props ironprogrammer, audrasjb. Fixes #57460. Built from https://develop.svn.wordpress.org/trunk@55067 git-svn-id: http://core.svn.wordpress.org/trunk@54600 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 b1f15897b1..e4afc3c148 100644 --- a/wp-includes/class-wp-theme-json-resolver.php +++ b/wp-includes/class-wp-theme-json-resolver.php @@ -322,6 +322,11 @@ class WP_Theme_JSON_Resolver { // Classic themes without a theme.json don't support global duotone. $theme_support_data['settings']['color']['defaultDuotone'] = false; + + // 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 884f3a131e..76830663fa 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-55066'; +$wp_version = '6.2-alpha-55067'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.