Skip to content

Instantly share code, notes, and snippets.

@jo-snips
Created October 8, 2012 18:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jo-snips/3854047 to your computer and use it in GitHub Desktop.
Save jo-snips/3854047 to your computer and use it in GitHub Desktop.
The Events Calendar: Filter iCal Event Item
function filter_ical_description($item, $eventPost) {
$description = preg_replace( "/[\n\t\r]/", ' ', strip_tags( strip_shortcodes( $eventPost->post_content ) ) );
$item[] = 'DESCRIPTION:' . str_replace( ',','\,', $description );
return $item;
}
add_filter('tribe_ical_feed_item','filter_ical_description', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment