Skip to content

Commit 8be9de1

Browse files
anton-vlasenkoAnton Vlasenko
authored andcommitted
Don't prepare response for a single taxonomy.
1 parent c023d53 commit 8be9de1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ public function get_item( $request ) {
191191
);
192192
}
193193

194+
if ( $request->is_method( 'head' ) ) {
195+
return new WP_REST_Response();
196+
}
197+
194198
$data = $this->prepare_item_for_response( $tax_obj, $request );
195199

196200
return rest_ensure_response( $data );

0 commit comments

Comments
 (0)