Skip to content

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

Closed

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

Activity

  1. manooweb commented on Jul 4, 2023

    @manooweb
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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