mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Editor: Only add layout classes to inner wrapper if block is a container
Backport of https://github.com/WordPress/gutenberg/issues/48606, which fixes an issue found in adding fixtures for deprecated Gallery block versions in #55571. See #55571. Fixes #57831. Props isabel_brison, Mamaduka, dasnitesh780. git-svn-id: https://develop.svn.wordpress.org/trunk@55439 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -492,7 +492,7 @@ function wp_render_layout_support_flag( $block_content, $block ) {
|
||||
*/
|
||||
$inner_content_classnames = '';
|
||||
|
||||
if ( isset( $block['innerContent'][0] ) && 'string' === gettype( $block['innerContent'][0] ) ) {
|
||||
if ( isset( $block['innerContent'][0] ) && 'string' === gettype( $block['innerContent'][0] ) && count( $block['innerContent'] ) > 1 ) {
|
||||
$tags = new WP_HTML_Tag_Processor( $block['innerContent'][0] );
|
||||
$last_classnames = '';
|
||||
while ( $tags->next_tag() ) {
|
||||
|
||||
Reference in New Issue
Block a user