Changeset 55273
- Timestamp:
- 02/07/2023 04:42:11 PM (23 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json-resolver.php
r55231 r55273 315 315 // Classic themes without a theme.json don't support global duotone. 316 316 $theme_support_data['settings']['color']['defaultDuotone'] = false; 317 318 // Allow themes to enable appearance tools via theme_support.319 if ( current_theme_supports( 'appearance-tools' ) ) {320 $theme_support_data['settings']['appearanceTools'] = true;321 }322 317 } 323 318 $with_theme_supports = new WP_Theme_JSON( $theme_support_data ); -
trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php
r55231 r55273 434 434 /** 435 435 * @ticket 54336 436 * @ticket 56467437 *438 * @covers ::add_theme_support439 436 */ 440 437 public function test_add_theme_supports_are_loaded_for_themes_without_theme_json() { … … 459 456 add_theme_support( 'editor-color-palette', $color_palette ); 460 457 add_theme_support( 'custom-line-height' ); 461 add_theme_support( 'appearance-tools' );462 458 463 459 $settings = WP_Theme_JSON_Resolver::get_theme_data()->get_settings(); … … 465 461 remove_theme_support( 'custom-line-height' ); 466 462 remove_theme_support( 'editor-color-palette' ); 467 remove_theme_support( 'appearance-tools' );468 463 469 464 $this->assertFalse( wp_theme_has_theme_json() ); 470 465 $this->assertTrue( $settings['typography']['lineHeight'] ); 471 466 $this->assertSame( $color_palette, $settings['color']['palette']['theme'] ); 472 $this->assertTrue( $settings['border']['color'], 'Support for appearance-tools was not added.' );473 467 } 474 468
Note: See TracChangeset
for help on using the changeset viewer.