Plugin Author
Franky
(@liedekef)
EME has a filter called eme_ical_filter, you can use that to change the content of the generated ical info. It *might* be that outlook is happy if just the ORGANIZER-line is removed from the ical, otherwise you need to find the difference in meeting and appointment ical formats …
For the filter, see https://www.e-dynamics.be/wordpress/category/documentation/12-hooks-and-filters/ (it contains an example on how to remove the ORGANIZER line too).
Worked a treat, cheers Franky.
Plugin Author
Franky
(@liedekef)
Glad to hear. Did you just remove the organizer line? Or also added the class:public?
I also added the class:public. I tried the function as it is on the page you linked me to, to test that first.
Plugin Author
Franky
(@liedekef)
Well, I have no outlook that I can test it on, so it would be nice if people told me what was needed or not, but for now I’ll add a comment to it that outlook likes that filter more π
Just tested it…
Both seems to work, the one you directed me to works as it is, but the below also worked, both opening up just as an appointment rather than a meeting.
// Remove organiser field from iCal to make appointment rather than meeting
function my_ical_filter($ical_entry) {
// do a print_r of $ical_entry to see the content
// as an example, let’s add a line “CLASS:PUBLIC”
// $ical_entry .= eme_esc_ical(“CLASS:PUBLIC”);
// other example: remove lines that contains “ORGANIZER”
$ical_entry = preg_replace(‘/ORGANIZER.*\r\n/’,”,$ical_entry);
return $ical_entry;
}
add_filter(’eme_ical_filter’,’my_ical_filter’);
Plugin Author
Franky
(@liedekef)
Ok, then it means that ORGANIZER is the one not needed for outlook.
According to https://www.kanzaki.com/docs/ical/organizer.html (which I probably misread), it is indeed not needed for “entities only on a single user’s calendar”. So I assume I can remove that line by default.
And according to https://www.kanzaki.com/docs/ical/class.html, CLASS is by default PUBLIC.
So I’ll change the code to remove the ORGANIZER line by default.