[wp-trac] [WordPress Trac] #38629: REST API: Allowed public or private WP_Query vars are lost in `prepare_items_query()`
WordPress Trac
noreply at wordpress.org
Wed Nov 2 22:20:44 UTC 2016
#38629: REST API: Allowed public or private WP_Query vars are lost in
`prepare_items_query()`
--------------------------+-----------------------
Reporter: rachelbaker | Owner: rmccue
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.7
Component: REST API | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------
Comment (by danielbachhuber):
Replying to [comment:6 jnylen0]:
> - Do all of the affected arguments have working test cases, including
anything that touches `WP_REST_Attachments_Controller`? I know `'slug' =>
'post_name__in'` is fine and `'status' => 'post_status'` will be fine once
#38420 is resolved.
Our test coverage is pretty good but not perfect right now. We'd probably
want to add a test for registering a custom public query arg and a custom
private query arg
{{{
$ ack 'test_get_items' rest-posts-controller.php rest-pages-controller.php
rest-attachments-controller.php
rest-posts-controller.php
111: public function test_get_items() {
123: public function test_get_items_empty_query() {
134: public function test_get_items_author_query() {
160: public function test_get_items_author_exclude_query() {
188: public function test_get_items_include_query() {
207: public function test_get_items_exclude_query() {
229: public function test_get_items_search_query() {
245: public function test_get_items_slug_query() {
257: public function test_get_items_multiple_slugs_array_query() {
275: public function test_get_items_multiple_slugs_string_query() {
293: public function test_get_items_status_query() {
313: public function test_get_items_invalid_status_query() {
321: public function test_get_items_status_without_permissions() {
338: public function test_get_items_order_and_orderby() {
357: public function test_get_items_with_orderby_relevance() {
367: public function test_get_items_ignore_sticky_posts_by_default() {
388: public function test_get_items_offset_query() {
407: public function test_get_items_tags_query() {
424: public function test_get_items_tags_exclude_query() {
443: public function test_get_items_tags_and_categories_query() {
463: public function test_get_items_tags_and_categories_exclude_query()
{
485: public function test_get_items_sticky_query() {
502: public function test_get_items_sticky_with_post__in_query() {
531: public function test_get_items_not_sticky_query() {
548: public function test_get_items_sticky_with_post__not_in_query() {
570: public function test_get_items_pagination_headers() {
649: public function test_get_items_private_status_query_var() {
666: public function test_get_items_invalid_per_page() {
673: public function test_get_items_invalid_context() {
680: public function test_get_items_invalid_date() {
688: public function test_get_items_valid_date() {
rest-pages-controller.php
80: public function test_get_items() {
84: public function test_get_items_parent_query() {
100: public function test_get_items_parents_query() {
118: public function test_get_items_parent_exclude_query() {
134: public function test_get_items_menu_order_query() {
161: public function test_get_items_min_max_pages_query() {
178: public function test_get_items_private_filter_query_var() {
196: public function test_get_items_invalid_date() {
204: public function test_get_items_valid_date() {
rest-attachments-controller.php
166: public function test_get_items() {
194: public function test_get_items_logged_in_editor() {
221: public function test_get_items_media_type() {
240: public function test_get_items_mime_type() {
259: public function test_get_items_parent() {
295: public function
test_get_items_invalid_status_param_is_error_response() {
310: public function test_get_items_private_status() {
330: public function test_get_items_invalid_date() {
338: public function test_get_items_valid_date() {
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38629#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list