From 331e060fd98181aa02bc9e2529d555262fbb63ea Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Tue, 27 Sep 2022 09:53:22 +0200 Subject: [PATCH] Backport appearance tools theme_support --- src/wp-includes/class-wp-theme-json-resolver.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-includes/class-wp-theme-json-resolver.php b/src/wp-includes/class-wp-theme-json-resolver.php index b1f15897b1af5..e4afc3c1489d8 100644 --- a/src/wp-includes/class-wp-theme-json-resolver.php +++ b/src/wp-includes/class-wp-theme-json-resolver.php @@ -322,6 +322,11 @@ public static function get_theme_data( $deprecated = array(), $options = array() // 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 );