public $raw_content;
function get_ics_content($include_repeats = false){
$HELP = new evo_helper();
$vir_url = $this->get_virtual_url();
$is_all_day = $this->is_all_day();
$extend_type = $this->get_time_ext_type();
$start_raw = (int)$this->get_prop('evcal_srow');
$end_raw = $this->get_prop('evcal_erow') ? (int)$this->get_prop('evcal_erow') : $start_raw;
// get ICS format
$ics_format = EVO()->cal->get_prop('evo_ics_format','evcal_1') ?: 'utc'; // utc or local event timezone
// Location information
$location = $this->get_location_string($HELP);
// if virtual link is set to show always
if( $this->get_prop('_vir_show') == 'always' && $this->get_attendance_mode() === 'online' && $vir_url){
$location = $vir_url;
}
$name = $summary = $this->get_title();
$content = !empty($this->content) ? strip_tags(str_replace(']]>', ']]>', $this->content)) : $name;
if (!empty($this->raw_content) && EVO()->cal->check_yn('evo_dis_icshtmldecode', 'evcal_1')) {
$content = $this->raw_content;
}
$summary = wp_trim_words($content, 50, '[..]');
$uid = uniqid();
$tz_key = $this->get_timezone_key();
// Add VTIMEZONE for local timezone if needed
if ($ics_format != 'utc' && $extend_type == 'n' ) {
$output .= eventon_get_vtimezone($tz_key, $start_raw); // Implement this function
}
$output = "BEGIN:VEVENTn";
$output .= "UID:{$uid}n";
$output .= "DTSTAMP:" . gmdate('YmdTHis') . "Zn";
// Apply repeat interval if applicable
if ($this->is_repeating_event() && $this->ri > 0) {
$intervals = $this->get_repeats();
if ($intervals && isset($intervals[$this->ri])) {
$start_raw = $intervals[$this->ri][0];
$end_raw = $intervals[$this->ri][1];
}
}
$format = $extend_type != 'n' ? 'Ymd' : 'YmdTHis';
$utc = new DateTimeZone('UTC');
// leave rest of the code in place.
ICS download issue 5.0.10
Code created on: 2026-06-22 09:41:42