/** * Remove one website from the timeline * * @access private */ private function delete() { if (VGet::action() == 'remove' && VGet::id(false) !== false) { try { $data = $this->_prefs->_data; unset($data['timeline'][VGet::id()]); $this->_prefs->_data = json_encode($data); $this->_prefs->update('_data', 'str'); $this->_prefs->_data = json_decode($this->_prefs->_data, true); $result = true; } catch (Exception $e) { $result = $e->getMessage(); } $this->_action_msg = ActionMessages::pref_updated($result); } }