Make WordPress Core


Ignore:
Timestamp:
01/04/2022 05:37:25 AM (4 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/src/wp-includes/class-wp-theme-json.php

    r52403 r52434  
    318318            'margin'   => null,
    319319            'padding'  => null,
    320             'blockGap' => null,
     320            'blockGap' => 'top',
    321321        ),
    322322        'typography' => array(
     
    473473        $output = array_intersect_key( $input, array_flip( self::VALID_TOP_LEVEL_KEYS ) );
    474474
     475        // Some styles are only meant to be available at the top-level (e.g.: blockGap),
     476        // hence, the schema for blocks & elements should not have them.
     477        $styles_non_top_level = self::VALID_STYLES;
     478        foreach ( array_keys( $styles_non_top_level ) as $section ) {
     479            foreach ( array_keys( $styles_non_top_level[ $section ] ) as $prop ) {
     480                if ( 'top' === $styles_non_top_level[ $section ][ $prop ] ) {
     481                    unset( $styles_non_top_level[ $section ][ $prop ] );
     482                }
     483            }
     484        }
     485
    475486        // Build the schema based on valid block & element names.
    476487        $schema                 = array();
    477488        $schema_styles_elements = array();
    478489        foreach ( $valid_element_names as $element ) {
    479             $schema_styles_elements[ $element ] = self::VALID_STYLES;
     490            $schema_styles_elements[ $element ] = $styles_non_top_level;
    480491        }
    481492        $schema_styles_blocks   = array();
     
    483494        foreach ( $valid_block_names as $block ) {
    484495            $schema_settings_blocks[ $block ]           = self::VALID_SETTINGS;
    485             $schema_styles_blocks[ $block ]             = self::VALID_STYLES;
     496            $schema_styles_blocks[ $block ]             = $styles_non_top_level;
    486497            $schema_styles_blocks[ $block ]['elements'] = $schema_styles_elements;
    487498        }
Note: See TracChangeset for help on using the changeset viewer.