mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
0c005fdb0e
Previously, when getting posts from the API with `sticky=true`, if there were no sticky posts set, the query would return all posts as if the `sticky` argument was not set. In this situation, the query should return an empty array instead. A `sticky=true` query that should return an empty array (in the previous situation, or with `include` and no intersecting post IDs) was also broken in that it would query the post with ID 1. Finally, this commit significantly improves test coverage for the `sticky` filter argument, including direct testing of the `WHERE` clauses generated by `WP_Query`. Props ryelle. Fixes #39947. Built from https://develop.svn.wordpress.org/trunk@40122 git-svn-id: http://core.svn.wordpress.org/trunk@40059 1a063a9b-81f0-0310-95a4-ce76da25c4cd |
||
---|---|---|
.. | ||
class-wp-rest-attachments-controller.php | ||
class-wp-rest-comments-controller.php | ||
class-wp-rest-controller.php | ||
class-wp-rest-post-statuses-controller.php | ||
class-wp-rest-post-types-controller.php | ||
class-wp-rest-posts-controller.php | ||
class-wp-rest-revisions-controller.php | ||
class-wp-rest-settings-controller.php | ||
class-wp-rest-taxonomies-controller.php | ||
class-wp-rest-terms-controller.php | ||
class-wp-rest-users-controller.php |