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 new core functions in menu items REST API #35648

Merged
merged 3 commits into from
Oct 18, 2021

Conversation

spacedmonkey
Copy link
Member

@spacedmonkey spacedmonkey commented Oct 14, 2021

Description

In the menu item controller, use the new functions rest_get_route_for_term and rest_get_route_for_post. These functions are not part of core at time of writing on the REST API menu item endpoints and were added in WP 5.5.

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • 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 (please manually search all *.native.js files for terms that need renaming or removal).

Copy link
Member

@TimothyBJacobs TimothyBJacobs left a comment

Choose a reason for hiding this comment

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

Let's create a follow up ticket to fix the link relation. object is really generic, perhaps menu-item-object instead.

@spacedmonkey spacedmonkey merged commit a192d38 into trunk Oct 18, 2021
@spacedmonkey spacedmonkey deleted the fix/use-code-functions branch October 18, 2021 23:19
@github-actions github-actions bot added this to the Gutenberg 11.8 milestone Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core REST API Task Task for Core REST API efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants