Skip to content

Commit

Permalink
Editor: remove Group inner container from Grid variation in classic t…
Browse files Browse the repository at this point in the history
…hemes.

Updates the logic in the layout filter that replaces the Group block inner container in classic themes to exclude the Grid variation.

Props isabel_brison, aaronrobertshaw, andrewserong.
See #61635.


Built from https://develop.svn.wordpress.org/trunk@58708


git-svn-id: https://core.svn.wordpress.org/trunk@58110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
tellthemachines committed Jul 12, 2024
1 parent 067a9de commit 2d7d1ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion wp-includes/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@ function wp_add_parent_layout_to_parsed_block( $parsed_block, $source_block, $pa
* to avoid breaking styles relying on that div.
*
* @since 5.8.0
* @since 6.6.1 Removed inner container from Grid variations.
* @access private
*
* @param string $block_content Rendered block content.
Expand All @@ -967,7 +968,7 @@ function wp_restore_group_inner_container( $block_content, $block ) {
if (
wp_theme_has_theme_json() ||
1 === preg_match( $group_with_inner_container_regex, $block_content ) ||
( isset( $block['attrs']['layout']['type'] ) && 'flex' === $block['attrs']['layout']['type'] )
( isset( $block['attrs']['layout']['type'] ) && ( 'flex' === $block['attrs']['layout']['type'] || 'grid' === $block['attrs']['layout']['type'] ) )
) {
return $block_content;
}
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58707';
$wp_version = '6.7-alpha-58708';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 2d7d1ec

Please sign in to comment.