WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/26/2017 01:46:54 PM (3 years ago)
Author:
ocean90
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.

Merge of [39954] to the 4.7 branch.

See #38792.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php

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