From 84e533ab9da76498c7ac49e84b047e92aa6f6edb Mon Sep 17 00:00:00 2001 From: Timothy Jacobs Date: Sat, 24 Oct 2020 13:52:22 +0000 Subject: [PATCH] REST API: Reuse `namespace` property instead of the undeclared `rest_namespace`. Props itowhid06. Fixes #48297. git-svn-id: https://develop.svn.wordpress.org/trunk@49300 602fd350-edb4-49c9-b593-d223f7449a82 --- .../endpoints/class-wp-rest-autosaves-controller.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php index 99a491de27..f3096444f2 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php @@ -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[\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[\d]+)/' . $this->rest_base . '/(?P[\d]+)', array( 'args' => array(