Make WordPress Core


Ignore:
Timestamp:
10/04/2017 02:51:03 PM (8 years ago)
Author:
kadamwhite
Message:

REST API: Specify specific json-schema version.

Explicitly specifies that the REST API uses JSON Schema draft-04,
as JSON Schema has deprecated versionless schema URIs and recommends
the use of a specific draft version.

Props @TimothyBlynJacobs
Fixes #41734

File:
1 edited

Legend:

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

    r41588 r41731  
    805805    public function get_item_schema() {
    806806        $schema = array(
    807             '$schema'    => 'http://json-schema.org/schema#',
     807            '$schema'    => 'http://json-schema.org/draft-04/schema#',
    808808            'title'      => 'post_tag' === $this->taxonomy ? 'tag' : $this->taxonomy,
    809809            'type'       => 'object',
Note: See TracChangeset for help on using the changeset viewer.