Skip to content

Don't remove 'block_core_navigation_link_build_css_colors()' without a deprecation #52244

@manooweb

Description

@manooweb

What?

Revert block_core_navigation_submenu_build_css_colors().

Why?

As reported in WordPress trac https://core.trac.wordpress.org/ticket/58670, remove block_core_navigation_submenu_build_css_colors() function without any deprecation can probably trigger a PHP Fatal error when we update to WordPress 6.3 and a third-party plugins as ours use this function.

The block_core_navigation_submenu_build_css_colors() function was removed in https:/github.com//pull/48936 and doc block in #52152

How?

Step-by-step reproduction instructions

For example we use this function in one of our block which is a child of the core/navigation block

$colors      = block_core_navigation_submenu_build_css_colors( $context, $attributes, $has_submenu );
$classes     = array_merge(
	array( 'wp-block-navigation__submenu-container' ),
	$colors['class']
);
$css_classes = trim( implode( ' ', $classes ) );

to be able to get the style from the context of the core/navigation block.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions