Skip to content

Commit

Permalink
Themes: Add opt-in Appearance Tools support for Classic Themes.
Browse files Browse the repository at this point in the history
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: WordPress/gutenberg#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
  • Loading branch information
audrasjb committed Jan 14, 2023
1 parent 05a019f commit 367e6b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions wp-includes/class-wp-theme-json-resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 367e6b4

Please sign in to comment.