Make WordPress Core


Ignore:
Timestamp:
11/15/2021 12:47:22 PM (3 years ago)
Author:
noisysocks
Message:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Navigation: Fix click-button size, submenu directions, scrollbars.
  • Group - Fix overzealous regex when restoring inner containers
  • Babel Preset: Update Babel packages to 7.16 version
  • theme.json: adds a setting property that enables some other ones
  • Polish metabox container.
  • Fix submenu justification and spacer orientation.
  • Fix Gutenberg 11.8.2 in WordPress trunk
  • Strip meta tags from pasted links in Chromium
  • Hide visilibility and status for navigation posts
  • Navigation: Refactor and simplify setup state.
  • Nav block menu switcher - decode HTML entities and utilise accessible markup pattern
  • Rename fse_navigation_area to wp_navigation_area
  • theme.json: adds a setting property that enables some other ones
  • Revert "theme.json: adds a setting property that enables some other ones"
  • Skip flaky image block test
  • WordPress/gutenberg@3c935c4
  • React to any errors coming up in gutenberg_migrate_menu_to_navigation_post
  • Return wp error from wp_insert_post
  • Fix not transforming logical assignments for packages

See #54337.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/navigation.php

    r52103 r52161  
    148148    if ( ! empty( $block->context['navigationArea'] ) ) {
    149149        $area    = $block->context['navigationArea'];
    150         $mapping = get_option( 'fse_navigation_areas', array() );
     150        $mapping = get_option( 'wp_navigation_areas', array() );
    151151        if ( ! empty( $mapping[ $area ] ) ) {
    152152            $attributes['navigationMenuId'] = $mapping[ $area ];
     
    180180        return '';
    181181    }
     182
     183    // Restore legacy classnames for submenu positioning.
     184    $layout_class = '';
     185    if ( isset( $attributes['layout']['justifyContent'] ) ) {
     186        if ( 'right' === $attributes['layout']['justifyContent'] ) {
     187            $layout_class .= 'items-justified-right';
     188        } elseif ( 'space-between' === $attributes['layout']['justifyContent'] ) {
     189            $layout_class .= 'items-justified-space-between';
     190        }
     191    }
     192
    182193    $colors     = block_core_navigation_build_css_colors( $attributes );
    183194    $font_sizes = block_core_navigation_build_css_font_sizes( $attributes );
     
    185196        $colors['css_classes'],
    186197        $font_sizes['css_classes'],
    187         $is_responsive_menu ? array( 'is-responsive' ) : array()
     198        $is_responsive_menu ? array( 'is-responsive' ) : array(),
     199        $layout_class ? array( $layout_class ) : array()
    188200    );
    189201
Note: See TracChangeset for help on using the changeset viewer.