mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Editor: remove Group inner container from Grid variation in classic themes.
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: http://core.svn.wordpress.org/trunk@58110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
80784d8b9d
commit
981871c922
@ -951,6 +951,7 @@ add_filter( 'render_block', 'wp_render_layout_support_flag', 10, 2 );
|
|||||||
* to avoid breaking styles relying on that div.
|
* to avoid breaking styles relying on that div.
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
|
* @since 6.6.1 Removed inner container from Grid variations.
|
||||||
* @access private
|
* @access private
|
||||||
*
|
*
|
||||||
* @param string $block_content Rendered block content.
|
* @param string $block_content Rendered block content.
|
||||||
@ -967,7 +968,7 @@ function wp_restore_group_inner_container( $block_content, $block ) {
|
|||||||
if (
|
if (
|
||||||
wp_theme_has_theme_json() ||
|
wp_theme_has_theme_json() ||
|
||||||
1 === preg_match( $group_with_inner_container_regex, $block_content ) ||
|
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;
|
return $block_content;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user