Make WordPress Core


Ignore:
Timestamp:
01/04/2022 05:37:25 AM (5 years ago)
Author:
noisysocks
Message:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Site Logo: Add option to set site icon from Site Logo block
  • Navigation: Enable even more compact setup state.
  • Remove template parts from post content inserter an unstable filter
  • Template Editor Mode: Hide editor mode switcher
  • Avoid using CSS variables for block gap styles
  • Try to fix auto resizing in template part focus mode
  • Lower the specificity of font size CSS Custom Properties in the editor
  • Site icon: Fix site icon styling to display non-square site icons within a square button
  • [Site Editor]: Register block editor shortcuts
  • Update regex to handle 404 template slug
  • Site Editor: Remove dead code
  • [Block Editor]: Restrict delete multi selected blocks shortcut
  • Fix: Gradients are not being applied by class
  • Update: Make the global styles subtitles font smaller
  • Post Content/Title: Reflect changes when previewing post
  • ServerSideRender: Fix loading state
  • [Block Library]: Fix editable post blocks in Query Loop with zero queryId
  • Post Excerpt: Fix previews
  • WP59: Contextualize "Export" string to differentiate it from other occurrences in WP Core
  • Tools Panel: Fix race conditions caused by conditionally displayed ToolsPanelItems
  • ToolsPanel: Allow items to register when panelId is null
  • Font Size Picker: Allow non-integers as simple CSS values and in hints
  • [Components - FontSizePicker]: Use incremental sequence of numbers as labels for the available font-sizes at the segmented control (conditionally)

See #54487.

File:
1 edited

Legend:

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

    r52402 r52434  
    420420                                                'blockGap' => '1em',
    421421                                        ),
    422                                         'blocks'  => array(
    423                                                 'core/columns' => array(
    424                                                         'spacing' => array(
    425                                                                 'blockGap' => '24px',
    426                                                         ),
    427                                                 ),
    428                                         ),
    429                                 ),
    430                         )
    431                 );
    432 
    433                 $expected = 'body { margin: 0; }body{--wp--style--block-gap: 1em;}.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }.wp-site-blocks > * { margin-top: 0; margin-bottom: 0; }.wp-site-blocks > * + * { margin-top: var( --wp--style--block-gap ); }.wp-block-columns{--wp--style--block-gap: 24px;}';
     422                                ),
     423                        )
     424                );
     425
     426                $expected = 'body { margin: 0; }body{--wp--style--block-gap: 1em;}.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }.wp-site-blocks > * { margin-top: 0; margin-bottom: 0; }.wp-site-blocks > * + * { margin-top: var( --wp--style--block-gap ); }';
    434427                $this->assertSame( $expected, $theme_json->get_stylesheet() );
    435428                $this->assertSame( $expected, $theme_json->get_stylesheet( array( 'styles' ) ) );
     
    23492342        }
    23502343
     2344        /**
     2345         * @ticket 54487
     2346         */
     2347        public function test_sanitization() {
     2348                $theme_json = new WP_Theme_JSON(
     2349                        array(
     2350                                'version' => 2,
     2351                                'styles'  => array(
     2352                                        'spacing' => array(
     2353                                                'blockGap' => 'valid value',
     2354                                        ),
     2355                                        'blocks'  => array(
     2356                                                'core/group' => array(
     2357                                                        'spacing' => array(
     2358                                                                'margin'   => 'valid value',
     2359                                                                'blockGap' => 'invalid value',
     2360                                                        ),
     2361                                                ),
     2362                                        ),
     2363                                ),
     2364                        )
     2365                );
     2366
     2367                $actual   = $theme_json->get_raw_data();
     2368                $expected = array(
     2369                        'version' => 2,
     2370                        'styles'  => array(
     2371                                'spacing' => array(
     2372                                        'blockGap' => 'valid value',
     2373                                ),
     2374                                'blocks'  => array(
     2375                                        'core/group' => array(
     2376                                                'spacing' => array(
     2377                                                        'margin' => 'valid value',
     2378                                                ),
     2379                                        ),
     2380                                ),
     2381                        ),
     2382                );
     2383
     2384                $this->assertEqualSetsWithIndex( $expected, $actual );
     2385        }
     2386
    23512387}
Note: See TracChangeset for help on using the changeset viewer.