Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Enable appearance tools via theme_support
  • Loading branch information
pbking committed Aug 17, 2022
commit ceed6d8ba30d8286ff6fc871db61cdbd46201e61
6 changes: 6 additions & 0 deletions lib/experimental/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class WP_Theme_JSON_Resolver_Gutenberg extends WP_Theme_JSON_Resolver_6_1 {
* @return WP_Theme_JSON_Gutenberg Entity that holds theme data.
*/
public static function get_theme_data( $deprecated = array(), $settings = array( 'with_supports' => true ) ) {

if ( ! empty( $deprecated ) ) {
_deprecated_argument( __METHOD__, '5.9' );
}
Expand Down Expand Up @@ -92,6 +93,11 @@ public static function get_theme_data( $deprecated = array(), $settings = 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_Gutenberg( $theme_support_data );
$with_theme_supports->merge( static::$theme );
Expand Down