Make WordPress Core

Ticket #48297: 48297.1.diff

File 48297.1.diff, 1.4 KB (added by itowhid06, 5 years ago)

Using $this->namespace instead of $this->rest_namespace

  • src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php

    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 b class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller { 
    6767
    6868                $this->parent_controller    = $parent_controller;
    6969                $this->revisions_controller = new WP_REST_Revisions_Controller( $parent_post_type );
    70                 $this->rest_namespace       = 'wp/v2';
     70                $this->namespace            = 'wp/v2';
    7171                $this->rest_base            = 'autosaves';
    7272                $this->parent_base          = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name;
    7373        }
    class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller { 
    8181         */
    8282        public function register_routes() {
    8383                register_rest_route(
    84                         $this->rest_namespace,
     84                        $this->namespace,
    8585                        '/' . $this->parent_base . '/(?P<id>[\d]+)/' . $this->rest_base,
    8686                        array(
    8787                                'args'   => array(
    class WP_REST_Autosaves_Controller extends WP_REST_Revisions_Controller { 
    107107                );
    108108
    109109                register_rest_route(
    110                         $this->rest_namespace,
     110                        $this->namespace,
    111111                        '/' . $this->parent_base . '/(?P<parent>[\d]+)/' . $this->rest_base . '/(?P<id>[\d]+)',
    112112                        array(
    113113                                'args'   => array(