/** * @Export data for one event ? dunno * @access public * @return void */ function export_event() { if (!isset($this->_req_data['event_id'])) { throw new EE_Error(__('We need an event_id to export events.', 'event_espresso')); } $event_ids = is_array($this->_req_data['event_id']) ? $this->_req_data['event_id'] : (array) $this->_req_data['event_id']; $filename = sanitize_title_with_dashes($this->_event_name); foreach ($event_ids as $this->_event_id) { $table_data[] = $this->espresso_event_export(); } $filename = $this->_req_data['all_events'] == "true" || count($event_ids) > 1 ? __('multiple-events', 'event_espresso') : $filename; $filename .= "-" . $this->today; if (!$this->EE_CSV->export_array_to_csv($table_data, $filename)) { EE_Error::add_error(__('An error occurred and the Event details could not be exported from the database.', "event_espresso"), __FILE__, __FUNCTION__, __LINE__); } }