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

Use WordPress Menu API #25132

Merged
merged 1 commit into from Sep 8, 2020
Merged

Use WordPress Menu API #25132

merged 1 commit into from Sep 8, 2020

Conversation

dd32
Copy link
Member

@dd32 dd32 commented Sep 8, 2020

Description

As a follow up to #25073 / #25054 after noticing the same warning on WordPress.org, I've converted the code away from directly modifying the $submenu global and using the WordPress menu API instead, which yes, supports this use-case.

Types of changes

Swaps from direct global $submenu alterations to using the WordPress menu API.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • ~~ My code follows the accessibility standards. ~~
  • ~~ My code has proper inline documentation. ~~
  • ~~ I've included developer documentation if appropriate. ~~
  • ~~ I've updated all React Native files affected by any refactorings/renamings in this PR. ~~

@dd32 dd32 requested a review from aristath September 8, 2020 04:53
Copy link
Member

@aristath aristath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and makes a lot more sense.
Tested and confirmed 👍

@aristath aristath merged commit 2407c9e into WordPress:master Sep 8, 2020
@github-actions github-actions bot added this to the Gutenberg 9.0 milestone Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants