WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/10/2017 06:51:28 PM (2 years ago)
Author:
jnylen0
Message:

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.

File:
1 edited

Legend:

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

    r40602 r40605  
    21312131            'default'            => 'date',
    21322132            'enum'               => array(
     2133                'author',
    21332134                'date',
    2134                 'relevance',
    21352135                'id',
    21362136                'include',
     2137                'modified',
     2138                'parent',
     2139                'relevance',
     2140                'slug',
    21372141                'title',
    2138                 'slug',
    21392142            ),
    21402143        );
Note: See TracChangeset for help on using the changeset viewer.