From 0e1b2b9494b93a1bf7422a10eeedafcc00d9b9bb Mon Sep 17 00:00:00 2001 From: savvasha Date: Mon, 26 Oct 2020 09:08:44 +0200 Subject: [PATCH] Add a Filter hook to make it possible to alter the event title in ical feeds --- feeds/ical.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/feeds/ical.php b/feeds/ical.php index bca617dd..8024bcce 100644 --- a/feeds/ical.php +++ b/feeds/ical.php @@ -138,6 +138,8 @@ foreach ( $events as $event): //Convert &#[0-9]+ entities to UTF-8 $summary = preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES"); }, $summary); + $summary = apply_filters( 'sportspress_ical_feed_summary', $summary, $event ); + // Append to output string $output .= "BEGIN:VEVENT\r\n" .