summaryrefslogtreecommitdiffstats
path: root/wp-includes/class-wp-theme-json-resolver.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-includes/class-wp-theme-json-resolver.php')
-rw-r--r--wp-includes/class-wp-theme-json-resolver.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/wp-includes/class-wp-theme-json-resolver.php b/wp-includes/class-wp-theme-json-resolver.php
index 90710a5..3ad5ecf 100644
--- a/wp-includes/class-wp-theme-json-resolver.php
+++ b/wp-includes/class-wp-theme-json-resolver.php
@@ -312,8 +312,16 @@ class WP_Theme_JSON_Resolver {
}
$theme_support_data['settings']['color']['defaultGradients'] = $default_gradients;
- // Classic themes without a theme.json don't support global duotone.
- $theme_support_data['settings']['color']['defaultDuotone'] = false;
+ if ( ! isset( $theme_support_data['settings']['shadow'] ) ) {
+ $theme_support_data['settings']['shadow'] = array();
+ }
+ /*
+ * Shadow presets are explicitly disabled for classic themes until a
+ * decision is made for whether the default presets should match the
+ * other presets or if they should be disabled by default in classic
+ * themes. See https://github.com/WordPress/gutenberg/issues/59989.
+ */
+ $theme_support_data['settings']['shadow']['defaultPresets'] = false;
// Allow themes to enable link color setting via theme_support.
if ( current_theme_supports( 'link-color' ) ) {
@@ -327,6 +335,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 );