Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
manooweb opened this issue Jul 3, 2023 · 1 comment

Comments

@manooweb
Copy link
Contributor

manooweb commented Jul 3, 2023

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

@manooweb
Copy link
Contributor Author

manooweb commented Jul 4, 2023

This changeset https://core.trac.wordpress.org/changeset/56126 should be fixed the issue in WordPress 6.3 release.
Changeset was commited in WordPress 6.3-beta3. So I close this issue.

@manooweb manooweb closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant