Make WordPress Core


Ignore:
Timestamp:
01/26/2017 01:38:27 PM (7 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-post-types-controller.php

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