public function preview_action() { require_once UNOSLIDER_BASE . '/application/models/unoslider_presets.php'; $model = new Unoslider_Presets_Model(); if ($_GET['preset_id'] != $_GET['preset_name']) { $data = $model->get_one($_GET['preset_id']); $this->view->response = json_encode(array('animation' => unserialize($data->animation), 'block' => unserialize($data->block), 'title' => $data->title)); } else { $this->view->response = json_encode($_GET['preset_id']); } $this->render_ajax('preview'); exit; }