Make WordPress Core


Ignore:
Timestamp:
01/09/2024 06:24:44 AM (13 months ago)
Author:
isabel_brison
Message:

Themes: Add theme support for appearance tools.

Reapplies the patch reverted in #57649 as the original patch was no longer applying cleanly. Adds theme support for appearance tools to WP_Theme_JSON_Resolver.

Props andrewserong, mukesh27, noisysocks.
Fixes #60118.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php

    r56559 r57255  
    434434    /**
    435435     * @ticket 54336
     436     * @ticket 60118
     437     *
     438     * @covers ::add_theme_support
    436439     */
    437440    public function test_add_theme_supports_are_loaded_for_themes_without_theme_json() {
     
    456459        add_theme_support( 'editor-color-palette', $color_palette );
    457460        add_theme_support( 'custom-line-height' );
     461        add_theme_support( 'appearance-tools' );
    458462
    459463        $settings = WP_Theme_JSON_Resolver::get_theme_data()->get_settings();
     
    461465        remove_theme_support( 'custom-line-height' );
    462466        remove_theme_support( 'editor-color-palette' );
     467        remove_theme_support( 'appearance-tools' );
    463468
    464469        $this->assertFalse( wp_theme_has_theme_json() );
    465470        $this->assertTrue( $settings['typography']['lineHeight'] );
    466471        $this->assertSame( $color_palette, $settings['color']['palette']['theme'] );
     472        $this->assertTrue( $settings['border']['color'], 'Support for "appearance-tools" was not added.' );
    467473    }
    468474
Note: See TracChangeset for help on using the changeset viewer.