protected function display_status($success_message, $error_message, $response) { if (GFWebAPIError::is_error($response)) { $this->display_error($error_message . $response->get_message()); } else { $this->display_message($success_message); } }
/** * Delete one or more entries * Deletes a set of entries based on the $entry_ids parameter * @param array $entry_ids - An array of entry ids to be deleted * @return bool|GFWebAPIError - Returns true if all entries were deleted successfully. If one or more entries couldn't be deleted, an instance of GFWebAPIError is returned. */ public function delete_entries($entry_ids) { $entry_ids_string = implode(";", $entry_ids); $response = $this->send_request("DELETE", "entries/{$entry_ids_string}"); $result = $this->prepare_response($response); return GFWebAPIError::is_error($result) ? $result : true; }