private function enabled($dbst_id, $enabled_status) { $res = wpl_flex::update('wpl_dbst', $dbst_id, 'enabled', $enabled_status); $res = (int) $res; $message = $res ? __('Operation was successful.', WPL_TEXTDOMAIN) : __('Error Occured.', WPL_TEXTDOMAIN); $data = NULL; $response = array('success' => $res, 'message' => $message, 'data' => $data); echo json_encode($response); exit; }