From 3d9bdeebb681f2150b7718e92260f3690907e61c Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Tue, 23 Apr 2024 16:19:54 +1000 Subject: [PATCH] Fix responsive column span logic on the front end. (#60976) Co-authored-by: tellthemachines Co-authored-by: fabiankaegy --- lib/block-supports/layout.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/block-supports/layout.php b/lib/block-supports/layout.php index 325505ff60359..e18dcba462a5e 100644 --- a/lib/block-supports/layout.php +++ b/lib/block-supports/layout.php @@ -612,8 +612,8 @@ function gutenberg_render_layout_support_flag( $block_content, $block ) { 'declarations' => $child_layout_declarations, ); - $minimum_column_width = isset( $block['attrs']['style']['layout']['minimumColumnWidth'] ) ? $block['attrs']['style']['layout']['minimumColumnWidth'] : null; - $column_count = isset( $block['attrs']['style']['layout']['columnCount'] ) ? $block['attrs']['style']['layout']['columnCount'] : null; + $minimum_column_width = isset( $block['parentLayout']['minimumColumnWidth'] ) ? $block['parentLayout']['minimumColumnWidth'] : null; + $column_count = isset( $block['parentLayout']['columnCount'] ) ? $block['parentLayout']['columnCount'] : null; /* * If columnSpan or columnStart is set, and the parent grid is responsive, i.e. if it has a minimumColumnWidth set,