mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 15:14:37 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@40605 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -998,30 +998,4 @@ class Tests_Query_DateQuery extends WP_UnitTestCase {
|
||||
$expected = array( $p1, $p4, $p5, );
|
||||
$this->assertEqualSets( $expected, $q->posts );
|
||||
}
|
||||
|
||||
/** Helpers **********************************************************/
|
||||
|
||||
/**
|
||||
* There's no way to change post_modified through the API.
|
||||
*/
|
||||
protected function update_post_modified( $post_id, $date ) {
|
||||
global $wpdb;
|
||||
return $wpdb->update(
|
||||
$wpdb->posts,
|
||||
array(
|
||||
'post_modified' => $date,
|
||||
'post_modified_gmt' => $date,
|
||||
),
|
||||
array(
|
||||
'ID' => $post_id,
|
||||
),
|
||||
array(
|
||||
'%s',
|
||||
'%s',
|
||||
),
|
||||
array(
|
||||
'%d',
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user