Skip to content

Commit c3db1af

Browse files
committed
Adding Path #250
1 parent b195441 commit c3db1af

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ public function get_items( $request ) {
126126
$data[ $type->name ] = $this->prepare_response_for_collection( $post_type );
127127
}
128128

129+
// Fields were already filtered in the nested objects. No further filtering needed.
130+
$request->set_param( '_fields', null );
131+
129132
return rest_ensure_response( $data );
130133
}
131134

src/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ public function get_items( $request ) {
144144
$data = (object) $data;
145145
}
146146

147+
// Fields were already filtered in the nested objects. No further filtering needed.
148+
$request->set_param( '_fields', null );
149+
147150
return rest_ensure_response( $data );
148151
}
149152

0 commit comments

Comments
 (0)