set_query_params( $params ); } $response = rest_do_request( $request ); $server = rest_get_server(); $json = wp_json_encode( $server->response_to_data( $response, false ) ); return json_decode( $json, true ); } }