mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Editor: fix classname output on blocks without layout.
Prevents layout classnames from being output on blocks with no layout support and no child layout classnames by returning early from `wp_render_layout_support_flag`. Props andrewserong. Fixes #60292. Built from https://develop.svn.wordpress.org/trunk@57328 git-svn-id: http://core.svn.wordpress.org/trunk@56834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
82d1434124
commit
b884ecf21e
@ -615,6 +615,9 @@ function wp_render_layout_support_flag( $block_content, $block ) {
|
||||
$processor->add_class( $class_name );
|
||||
}
|
||||
return $processor->get_updated_html();
|
||||
} elseif ( ! $block_supports_layout ) {
|
||||
// Ensure layout classnames are not injected if there is no layout support.
|
||||
return $block_content;
|
||||
}
|
||||
|
||||
$global_settings = wp_get_global_settings();
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57327';
|
||||
$wp_version = '6.5-alpha-57328';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user