Skip to content

Commit

Permalink
Navigation Link blocks don't need submenu colors as this is set in th…
Browse files Browse the repository at this point in the history
…e submenu block
  • Loading branch information
scruffian committed Mar 3, 2023
1 parent 51f5d64 commit b8a2b93
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/block-library/src/navigation-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@
* Build an array with CSS classes and inline styles defining the colors
* which will be applied to the navigation markup in the front-end.
*
* @param array $context Navigation block context.
* @param array $attributes Block attributes.
* @param array $context Navigation block context.
* @param array $attributes Block attributes.
* @param bool $is_sub_menu Whether the link is part of a sub-menu.
* @return array Colors CSS classes and inline styles.
*/
function block_core_navigation_link_build_css_colors( $context, $attributes ) {
function block_core_navigation_link_build_css_colors( $context, $attributes, $is_sub_menu = false ) {
$colors = array(
'css_classes' => array(),
'inline_styles' => '',
);

$is_sub_menu = isset( $attributes['isTopLevelLink'] ) ? ( ! $attributes['isTopLevelLink'] ) : false;

// Text color.
$named_text_color = null;
$custom_text_color = null;
Expand Down

0 comments on commit b8a2b93

Please sign in to comment.