Skip to content

Commit

Permalink
For the boxes endpoint, remove cmb_id as array key to ensure an array…
Browse files Browse the repository at this point in the history
… response in JSON
  • Loading branch information
jtsternberg committed Oct 21, 2016
1 parent e24a482 commit 65983c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/CMB2_REST_Controller_Boxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function get_items( $request ) {
foreach ( $boxes as $this->rest_box ) {
if ( $this->rest_box->rest_read ) {
$rest_box = $this->get_rest_box();
$boxes_data[ $this->rest_box->cmb->cmb_id ] = $this->server->response_to_data( $rest_box, isset( $this->request['_embed'] ) );
$boxes_data[] = $this->server->response_to_data( $rest_box, isset( $this->request['_embed'] ) );
}
}

Expand Down

0 comments on commit 65983c4

Please sign in to comment.