From 2b4e452dfa811d0068619cffd33688f9be0248bb Mon Sep 17 00:00:00 2001 From: yogeshbhutkar Date: Mon, 6 Jan 2025 12:49:35 +0530 Subject: [PATCH] Refactor: streamline color support handling in navigation submenu --- packages/block-library/src/navigation-submenu/index.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/navigation-submenu/index.php b/packages/block-library/src/navigation-submenu/index.php index f74bcada3b1df4..fb7c20483e0af3 100644 --- a/packages/block-library/src/navigation-submenu/index.php +++ b/packages/block-library/src/navigation-submenu/index.php @@ -255,9 +255,8 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) { } // This allows us to be able to get a response from wp_apply_colors_support. - $block->block_type->supports['color'] = true; - $colors_supports = wp_apply_colors_support( $block->block_type, $attributes ); - $css_classes = 'wp-block-navigation__submenu-container'; + $colors_supports = wp_apply_colors_support( $block->block_type, $attributes ); + $css_classes = 'wp-block-navigation__submenu-container'; if ( array_key_exists( 'class', $colors_supports ) ) { $css_classes .= ' ' . $colors_supports['class']; }