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

Add menus rest api endpoints. #1814

Closed
wants to merge 5 commits into from

Conversation

spacedmonkey
Copy link
Member

Feature plugin - https://github.com/WP-API/menus-endpoints

Trac ticket: https://core.trac.wordpress.org/ticket/40878


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@spacedmonkey spacedmonkey mentioned this pull request Nov 5, 2021
@spacedmonkey spacedmonkey changed the base branch from master to trunk November 8, 2021 22:12
@TimothyBJacobs TimothyBJacobs force-pushed the fix/menu-endpoints branch 2 times, most recently from bea1082 to c7e2c02 Compare November 9, 2021 02:00
spacedmonkey and others added 4 commits November 8, 2021 22:02
Set cap type and meta cap mapping

Restore original error messages.

Fix invalid menu location error code.

More test fixes.
- Tests cleanup: Use assertSame, follow naming conventions.
- Doc block and comment fixes.
- Ensure parameter types/names and return types are consistent when extending base classes.
- Type out doc blocks for menu items filters since they don't match the signature because they pass the prepared menu item instead of a `WP_Post` object.
- Don't duplicate validation and sanitization that happens at the schema level.
- Use JSON schema multi-type support instead of disabling validation/sanitization.

Fix test CS issue

A bit more docblock cleanup.
@TimothyBJacobs
Copy link
Member

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.

3 participants