Make WordPress Core


Ignore:
Timestamp:
10/04/2017 02:51:03 PM (9 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-posts-controller.php

    r41727 r41731  
    16861686
    16871687                $schema = array(
    1688                         '$schema'    => 'http://json-schema.org/schema#',
     1688                        '$schema'    => 'http://json-schema.org/draft-04/schema#',
    16891689                        'title'      => $this->post_type,
    16901690                        'type'       => 'object',
Note: See TracChangeset for help on using the changeset viewer.