-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Closed
Copy link
Description
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?
- Revert both of the
block_core_navigation_submenu_build_css_colors() - Add a deprecation to warn developers that this function will be removed in a future release as suggested in Navigation Link: Don't remove 'block_core_navigation_link_build_css_colors' #49064
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
Labels
No labels