-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Move WP_REST_Block_Navigation_Areas_Controller from Gutenberg to Core. #36374
Move WP_REST_Block_Navigation_Areas_Controller from Gutenberg to Core. #36374
Conversation
We have to use /wp/v2 namespace.
Size Change: +602 B (0%) Total Size: 1.09 MB
ℹ️ View Unchanged
|
We have to use /wp/v2 namespace.
@anton-vlasenko Do you want a review for this yet? |
@spacedmonkey Yes, please :) |
@@ -37,7 +37,8 @@ public function register_routes() { | |||
'permission_callback' => array( $this, 'get_items_permissions_check' ), | |||
'args' => $this->get_collection_params(), | |||
), | |||
'schema' => array( $this, 'get_public_item_schema' ), | |||
'schema' => array( $this, 'get_public_item_schema' ), | |||
'allow_batch' => array( 'v1' => true ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are now following this pattern.
WordPress/wordpress-develop@ecf1d6a
So this should be
'allow_batch' => $this->allow_batch,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know.
This task is already merged, but I will be using 'allow_batch' => $this->allow_batch
from now on.
I posted some comments on #36178. Like someone to look at those comments. |
Going to merge this now so as to fix CI which is failing now that Core has the endpoint committed. |
#36374) * Move WP_REST_Block_Navigation_Areas_Controller from Gutenberg to Core. We have to use /wp/v2 namespace. * Move WP_REST_Block_Navigation_Areas_Controller from Gutenberg to Core. We have to use /wp/v2 namespace. * Enable batching.
Description
This PR aims to change the route of the
__experimental/block-navigation-areas
REST API endpoint.It has to be renamed to
/wp/v2/block-navigation-areas
because we have to merge theWP_REST_Block_Navigation_Areas_Controller
controller into Core.Also, this PR enables batching for this new (old) REST route.
How has this been tested?
Gutenberg -> Experiments
and enableNavigation Screen
.Gutenberg -> Navigation
page.Screenshots
No screenshots are needed.
Types of changes
New feature
Checklist:
*.native.js
files for terms that need renaming or removal).