Skip to content

Commit

Permalink
Layout: Fix issue where layout classnames are injected for blocks wit…
Browse files Browse the repository at this point in the history
…hout layout support (#56187)

* Layout: Fix issue where layout classnames were sometimes injected for blocks without layout support

* Simplify comment
  • Loading branch information
andrewserong authored Nov 16, 2023
1 parent d39d2dd commit 802c7a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,9 @@ function gutenberg_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 = gutenberg_get_global_settings();
Expand Down

1 comment on commit 802c7a5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 802c7a5.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6897514333
📝 Reported issues:

Please sign in to comment.