Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jo-snips/5258255 to your computer and use it in GitHub Desktop.

Select an option

Save jo-snips/5258255 to your computer and use it in GitHub Desktop.
<?php
//Add to your theme's functions.php
add_filter( 'tribe_ical_feed_item', 'tribe_ical_modify_event', 10, 2 );
function tribe_ical_modify_event( $item, $eventPost ) {
$searchValue = "DESCRIPTION";
$fl_array = preg_grep('/^' . "$searchValue" . '.*/', $item);
$key = array_values($fl_array);
$keynum = key($fl_array);
$mod = substr($key[0], 0, 1000);
unset($item[$keynum]);
$item[] = $mod;
return $item;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment