Changeset 55067
- Timestamp:
- 01/14/2023 09:34:55 AM (22 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json-resolver.php
r54824 r55067 323 323 // Classic themes without a theme.json don't support global duotone. 324 324 $theme_support_data['settings']['color']['defaultDuotone'] = false; 325 326 // Allow themes to enable appearance tools via theme_support. 327 if ( current_theme_supports( 'appearance-tools' ) ) { 328 $theme_support_data['settings']['appearanceTools'] = true; 329 } 325 330 } 326 331 $with_theme_supports = new WP_Theme_JSON( $theme_support_data ); -
trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php
r54896 r55067 450 450 /** 451 451 * @ticket 54336 452 * @ticket 56467 453 * 454 * @covers ::add_theme_support 452 455 */ 453 456 public function test_add_theme_supports_are_loaded_for_themes_without_theme_json() { … … 472 475 add_theme_support( 'editor-color-palette', $color_palette ); 473 476 add_theme_support( 'custom-line-height' ); 477 add_theme_support( 'appearance-tools' ); 474 478 475 479 $settings = WP_Theme_JSON_Resolver::get_theme_data()->get_settings(); … … 477 481 remove_theme_support( 'custom-line-height' ); 478 482 remove_theme_support( 'editor-color-palette' ); 483 remove_theme_support( 'appearance-tools' ); 479 484 480 485 $this->assertFalse( WP_Theme_JSON_Resolver::theme_has_support() ); 481 486 $this->assertTrue( $settings['typography']['lineHeight'] ); 482 487 $this->assertSame( $color_palette, $settings['color']['palette']['theme'] ); 488 $this->assertTrue( $settings['border']['color'], 'Support for appearance-tools was not added.' ); 483 489 } 484 490
Note: See TracChangeset
for help on using the changeset viewer.