public function destroy_action() { if ($this->_validate()) { require_once UNOSLIDER_BASE . '/application/models/unoslider_presets.php'; $model = new Unoslider_Presets_Model(); $model->delete($_POST['id']); $response = json_encode(array('success' => true)); header("Content-Type: application/json"); echo $response; } exit; }