Skip to content

Commit

Permalink
Refactor: streamline color support handling in navigation submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Jan 6, 2025
1 parent 57fb66e commit 2b4e452
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/block-library/src/navigation-submenu/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}
Expand Down

0 comments on commit 2b4e452

Please sign in to comment.