Skip to content

Commit

Permalink
Excluding order and order by from the collection query params
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Jan 3, 2024
1 parent 40e93b9 commit edc8162
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ public function get_collection_params() {
unset( $query_params['exclude'] );
unset( $query_params['include'] );
unset( $query_params['search'] );
unset( $query_params['order'] );
unset( $query_params['orderby'] );
return $query_params;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ public function test_get_items_out_of_bounds_page_should_not_error_if_offset() {
* @doesNotPerformAssertions
*/
public function test_context_param() {
// Controller does not implement test_context_param().
// Controller does not implement get_context_param().
}

/**
Expand Down
25 changes: 0 additions & 25 deletions tests/qunit/fixtures/wp-api-generated.js
Original file line number Diff line number Diff line change
Expand Up @@ -10039,31 +10039,6 @@ mockedApiResponse.Schema = {
"description": "Offset the result set by a specific number of items.",
"type": "integer",
"required": false
},
"order": {
"description": "Order sort attribute ascending or descending.",
"type": "string",
"default": "desc",
"enum": [
"asc",
"desc"
],
"required": false
},
"orderby": {
"description": "Sort collection by object attribute.",
"type": "string",
"default": "date",
"enum": [
"date",
"id",
"include",
"relevance",
"slug",
"include_slugs",
"title"
],
"required": false
}
}
}
Expand Down

0 comments on commit edc8162

Please sign in to comment.