Make WordPress Core

Changeset 51374


Ignore:
Timestamp:
07/07/2021 06:59:21 PM (3 years ago)
Author:
desrosj
Message:

Themes: Remove mention of “FSE” in Core.

“FSE” themes are block themes.

Follow up to [51373].

Unprops desrosj.
Merges [51370-51371] to the 5.8 branch.
Fixes #53497.

Location:
branches/5.8
Files:
3 deleted
4 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/tests/phpunit/tests/blocks/block-editor.php

    r51200 r51374  
    345345
    346346    /**
     347     * @ticket 53458
     348     */
     349    function test_get_block_editor_settings_theme_json_settings() {
     350        switch_theme( 'block-theme' );
     351
     352        $post_editor_context = new WP_Block_Editor_Context( array( 'post' => get_post() ) );
     353
     354        $settings = get_block_editor_settings( array(), $post_editor_context );
     355
     356        // Related entry in theme.json: settings.color.palette
     357        $this->assertSameSetsWithIndex(
     358            array(
     359                array(
     360                    'slug'  => 'light',
     361                    'name'  => 'Light',
     362                    'color' => '#f5f7f9',
     363                ),
     364                array(
     365                    'slug'  => 'dark',
     366                    'name'  => 'Dark',
     367                    'color' => '#000',
     368                ),
     369            ),
     370            $settings['colors']
     371        );
     372        // settings.color.gradients
     373        $this->assertSameSetsWithIndex(
     374            array(
     375                array(
     376                    'name'     => 'Custom gradient',
     377                    'gradient' => 'linear-gradient(135deg,rgba(0,0,0) 0%,rgb(0,0,0) 100%)',
     378                    'slug'     => 'custom-gradient',
     379                ),
     380            ),
     381            $settings['gradients']
     382        );
     383        // settings.typography.fontSizes
     384        $this->assertSameSetsWithIndex(
     385            array(
     386                array(
     387                    'name' => 'Custom',
     388                    'slug' => 'custom',
     389                    'size' => '100px',
     390                ),
     391            ),
     392            $settings['fontSizes']
     393        );
     394        // settings.color.custom
     395        $this->assertTrue( $settings['disableCustomColors'] );
     396        // settings.color.customGradient
     397        $this->assertTrue( $settings['disableCustomGradients'] );
     398        // settings.typography.customFontSize
     399        $this->assertTrue( $settings['disableCustomFontSizes'] );
     400        // settings.typography.customLineHeight
     401        $this->assertTrue( $settings['enableCustomLineHeight'] );
     402        // settings.spacing.enableCustomUnits
     403        $this->assertSameSets( array( 'rem' ), $settings['enableCustomUnits'] );
     404        // settings.spacing.customPadding
     405        $this->assertTrue( $settings['enableCustomSpacing'] );
     406
     407        switch_theme( WP_DEFAULT_THEME );
     408    }
     409
     410    /**
    347411     * @ticket 52920
    348412     * @expectedDeprecated block_editor_settings
  • branches/5.8/tests/phpunit/tests/theme/themeDir.php

    r50960 r51374  
    162162            'camelCase',
    163163            'REST Theme',
    164             'FSE Theme',
     164            'Block Theme',
    165165        );
    166166
  • branches/5.8/tests/phpunit/tests/theme/wpThemeJsonResolver.php

    r51305 r51374  
    9797    public function test_translations_are_applied() {
    9898        add_filter( 'locale', array( $this, 'filter_set_locale_to_polish' ) );
    99         load_textdomain( 'fse', realpath( DIR_TESTDATA . '/languages/themes/fse-pl_PL.mo' ) );
     99        load_textdomain( 'block-theme', realpath( DIR_TESTDATA . '/languages/themes/block-theme-pl_PL.mo' ) );
    100100
    101         switch_theme( 'fse' );
     101        switch_theme( 'block-theme' );
    102102
    103103        $actual = WP_Theme_JSON_Resolver::get_theme_data();
    104104
    105         unload_textdomain( 'fse' );
     105        unload_textdomain( 'block-theme' );
    106106        remove_filter( 'locale', array( $this, 'filter_set_locale_to_polish' ) );
    107107
    108         $this->assertSame( wp_get_theme()->get( 'TextDomain' ), 'fse' );
     108        $this->assertSame( wp_get_theme()->get( 'TextDomain' ), 'block-theme' );
    109109        $this->assertSame(
    110110            array(
     
    155155
    156156        // Switch to a theme that does have support.
    157         switch_theme( 'fse' );
    158         $fse = WP_Theme_JSON_Resolver::theme_has_support();
     157        switch_theme( 'block-theme' );
     158        $has_theme_json_support = WP_Theme_JSON_Resolver::theme_has_support();
    159159
    160160        $this->assertFalse( $default );
    161         $this->assertTrue( $fse );
     161        $this->assertTrue( $has_theme_json_support );
    162162    }
    163163
Note: See TracChangeset for help on using the changeset viewer.