REST API: Reuse `namespace` property instead of the undeclared `rest_namespace`.
Props itowhid06. Fixes #48297. Built from https://develop.svn.wordpress.org/trunk@49300 git-svn-id: http://core.svn.wordpress.org/trunk@49062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9baba12f00
commit
3a01517c90
|
@ -67,7 +67,7 @@ class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller {
|
|||
|
||||
$this->parent_controller = $parent_controller;
|
||||
$this->revisions_controller = new WP_REST_Revisions_Controller( $parent_post_type );
|
||||
$this->rest_namespace = 'wp/v2';
|
||||
$this->namespace = 'wp/v2';
|
||||
$this->rest_base = 'autosaves';
|
||||
$this->parent_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller {
|
|||
*/
|
||||
public function register_routes() {
|
||||
register_rest_route(
|
||||
$this->rest_namespace,
|
||||
$this->namespace,
|
||||
'/' . $this->parent_base . '/(?P<id>[\d]+)/' . $this->rest_base,
|
||||
array(
|
||||
'args' => array(
|
||||
|
@ -107,7 +107,7 @@ class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller {
|
|||
);
|
||||
|
||||
register_rest_route(
|
||||
$this->rest_namespace,
|
||||
$this->namespace,
|
||||
'/' . $this->parent_base . '/(?P<parent>[\d]+)/' . $this->rest_base . '/(?P<id>[\d]+)',
|
||||
array(
|
||||
'args' => array(
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.6-beta1-49299';
|
||||
$wp_version = '5.6-beta1-49300';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue