mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Editor: Allow default duotone styles if not explicitly disabled in theme.json.
Removes setting that disabled default duotone palette from being output in themes without theme.json. Props andrewserong. Fixes #60136. git-svn-id: https://develop.svn.wordpress.org/trunk@57260 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
788d709a56
commit
ca24196233
@ -312,9 +312,6 @@ 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;
|
||||
|
||||
// Allow themes to enable link color setting via theme_support.
|
||||
if ( current_theme_supports( 'link-color' ) ) {
|
||||
$theme_support_data['settings']['color']['link'] = true;
|
||||
|
||||
@ -472,6 +472,22 @@ class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase {
|
||||
$this->assertTrue( $settings['border']['color'], 'Support for "appearance-tools" was not added.' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that classic themes still get core default settings such as color palette and duotone.
|
||||
*
|
||||
* @ticket 60136
|
||||
*/
|
||||
public function test_core_default_settings_are_loaded_for_themes_without_theme_json() {
|
||||
switch_theme( 'default' );
|
||||
|
||||
$settings = WP_Theme_JSON_Resolver::get_merged_data( 'theme' )->get_settings();
|
||||
|
||||
$this->assertFalse( wp_theme_has_theme_json() );
|
||||
$this->assertTrue( $settings['color']['defaultPalette'] );
|
||||
$this->assertTrue( $settings['color']['defaultDuotone'] );
|
||||
$this->assertTrue( $settings['color']['defaultGradients'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 54336
|
||||
* @ticket 56611
|
||||
|
||||
Loading…
Reference in New Issue
Block a user