REST API: Add author, modified, and parent sort order options for posts.

These (and a few others that can be revisited later if needed) were present in
beta versions of the WP REST API but were removed during the merge to WP 4.7.

Props ChopinBach, jnylen0.
Fixes #38693.

Built from https://develop.svn.wordpress.org/trunk@40605


git-svn-id: http://core.svn.wordpress.org/trunk@40475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
James Nylen 2017-05-10 18:52:44 +00:00
parent 30bdd11fd5
commit 7d337c1327
2 changed files with 6 additions and 3 deletions

View File

@ -2130,12 +2130,15 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
'type' => 'string',
'default' => 'date',
'enum' => array(
'author',
'date',
'relevance',
'id',
'include',
'title',
'modified',
'parent',
'relevance',
'slug',
'title',
),
);

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40604';
$wp_version = '4.8-alpha-40605';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.