Skip to content

Commit

Permalink
Declare orderby_hierarchy in post controller test
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Dec 17, 2024
1 parent 096976a commit 219a01b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3007,8 +3007,10 @@ public function get_collection_params() {
),
'default' => array(),
);
}
if ( $post_type->hierarchical ) {
$query_params['orderby_hierarchy'] = array(
'description' => 'Sort pages by hierarchy.',
'description' => __( 'Whether the post should be grouped by parent-child relationship (hierarchy).' ),
'type' => 'boolean',
'default' => false,
);
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/tests/rest-api/rest-posts-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public function test_registered_query_params() {
'offset',
'order',
'orderby',
'orderby_hierarchy',
'page',
'per_page',
'search',
Expand Down

0 comments on commit 219a01b

Please sign in to comment.