WordPress.org

Make WordPress Core

Changeset 49300


Ignore:
Timestamp:
10/24/2020 01:52:22 PM (12 months ago)
Author:
TimothyBlynJacobs
Message:

REST API: Reuse namespace property instead of the undeclared rest_namespace.

Props itowhid06.
Fixes #48297.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php

    r48102 r49300  
    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;
     
    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(
     
    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(
Note: See TracChangeset for help on using the changeset viewer.