Make WordPress Core


Ignore:
Timestamp:
11/11/2021 07:41:38 AM (3 years ago)
Author:
noisysocks
Message:

Update @wordpress packages

Update packages to include these bug fixes from Gutenberg:

  • Group - Fix inner container regexes using fixed div tag
  • Image block: Make sure the Image block border radius is inherited if the image is linked
  • Navigation: Small fixes
  • FSE: Add template_type guards
  • Template Part Block: Add some guards
  • Fix getEntityRecords to ensure resolution on REST API failure
  • Ensure menus before map operation in Nav block
  • Link editing: Account for link anchor no longer being present when generating unique link instance key
  • Navigation: Hide post attributes meta box
  • Fix failing tests and compatibility with 5.9.
  • Fix missing <MainDashboardButton> slot fill in site editor
  • Move WP_REST_Block_Navigation_Areas_Controller from Gutenberg to Core.
  • Fix site editor reset styles in WP 5.9

See #54337.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-supports/layout.php

    r52103 r52135  
    221221 */
    222222function wp_restore_group_inner_container( $block_content, $block ) {
    223     $group_with_inner_container_regex = '/(^\s*<div\b[^>]*wp-block-group(\s|")[^>]*>)(\s*<div\b[^>]*wp-block-group__inner-container(\s|")[^>]*>)((.|\S|\s)*)/';
     223    $tag_name                         = isset( $block['attrs']['tagName'] ) ? $block['attrs']['tagName'] : 'div';
     224    $group_with_inner_container_regex = sprintf(
     225        '/(^\s*<%1$s\b[^>]*wp-block-group(\s|")[^>]*>)(\s*<div\b[^>]*wp-block-group__inner-container(\s|")[^>]*>)((.|\S|\s)*)/',
     226        preg_quote( $tag_name, '/' )
     227    );
    224228
    225229    if (
     
    232236    }
    233237
    234     $replace_regex   = '/(^\s*<div\b[^>]*wp-block-group[^>]*>)(.*)(<\/div>\s*$)/ms';
     238    $replace_regex   = sprintf(
     239        '/(^\s*<%1$s\b[^>]*wp-block-group[^>]*>)(.*)(<\/%1$s>\s*$)/ms',
     240        preg_quote( $tag_name, '/' )
     241    );
    235242    $updated_content = preg_replace_callback(
    236243        $replace_regex,
Note: See TracChangeset for help on using the changeset viewer.