Make WordPress Core


Ignore:
Timestamp:
01/26/2017 01:38:27 PM (10 years ago)
Author:
joehoyle
Message:

REST API: Unify object access handling for simplicity.

Rather than repeating ourselves, unifying the access into a single method keeps everything tidy. While we're at it, add in additional schema handling for common parameters.

See #38792.

File:
1 edited

Legend:

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

    r39342 r39954  
    4949
    5050                register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<taxonomy>[\w-]+)', array(
     51                        'args' => array(
     52                                'taxonomy' => array(
     53                                        'description'  => __( 'An alphanumeric identifier for the taxonomy.' ),
     54                                        'type'         => 'string',
     55                                ),
     56                        ),
    5157                        array(
    5258                                'methods'         => WP_REST_Server::READABLE,
Note: See TracChangeset for help on using the changeset viewer.