From ea0ea2f00e7c66f75b69c6d565c413d01a8d0ced Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Fri, 27 Jan 2023 16:30:13 +1100 Subject: [PATCH] Add comment clarifying early return --- lib/class-wp-theme-json-gutenberg.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/class-wp-theme-json-gutenberg.php b/lib/class-wp-theme-json-gutenberg.php index a486b720ff49b7..2ca582b4f60f4e 100644 --- a/lib/class-wp-theme-json-gutenberg.php +++ b/lib/class-wp-theme-json-gutenberg.php @@ -1166,6 +1166,8 @@ protected function get_layout_styles( $block_metadata ) { return $block_rules; } + // Skip outputting layout styles if the block does not support layout or margin. + // For blocks that have margin but not layout support, only layout aware margin styles are output. if ( isset( $block_metadata['name'] ) ) { $block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block_metadata['name'] ); if (