Changeset 57255
- Timestamp:
- 01/09/2024 06:24:44 AM (8 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json-resolver.php
r56709 r57255 327 327 $theme_support_data['settings']['border']['style'] = true; 328 328 $theme_support_data['settings']['border']['width'] = true; 329 } 330 331 // Allow themes to enable appearance tools via theme_support. 332 if ( current_theme_supports( 'appearance-tools' ) ) { 333 $theme_support_data['settings']['appearanceTools'] = true; 329 334 } 330 335 } -
trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php
r56559 r57255 434 434 /** 435 435 * @ticket 54336 436 * @ticket 60118 437 * 438 * @covers ::add_theme_support 436 439 */ 437 440 public function test_add_theme_supports_are_loaded_for_themes_without_theme_json() { … … 456 459 add_theme_support( 'editor-color-palette', $color_palette ); 457 460 add_theme_support( 'custom-line-height' ); 461 add_theme_support( 'appearance-tools' ); 458 462 459 463 $settings = WP_Theme_JSON_Resolver::get_theme_data()->get_settings(); … … 461 465 remove_theme_support( 'custom-line-height' ); 462 466 remove_theme_support( 'editor-color-palette' ); 467 remove_theme_support( 'appearance-tools' ); 463 468 464 469 $this->assertFalse( wp_theme_has_theme_json() ); 465 470 $this->assertTrue( $settings['typography']['lineHeight'] ); 466 471 $this->assertSame( $color_palette, $settings['color']['palette']['theme'] ); 472 $this->assertTrue( $settings['border']['color'], 'Support for "appearance-tools" was not added.' ); 467 473 } 468 474
Note: See TracChangeset
for help on using the changeset viewer.