/** * Summary. * * This function is called internally in the plugin, searchs of an "id" in the _POST array * and deletes any referral with that id. * * @return type Returns a JSON with the reslt of the operation. */ public function delete_geeks_referrals() { header('Content-Type: application/json'); try { $this->model->delete_referral($_POST['id']); echo Response::wrapResult("ok"); } catch (Exeption $e) { echo Response::wrapFault($e->getMessage()); } exit; }