Skip to content

Instantly share code, notes, and snippets.

@jkudish
Created February 16, 2012 08:47
Show Gist options
  • Save jkudish/1843411 to your computer and use it in GitHub Desktop.
Save jkudish/1843411 to your computer and use it in GitHub Desktop.
Filter the iCal link generated by The Events Calendar Pro to use the webcal protocol instead of http
<?php
/**
* Filter the iCal link generated by The Events Calendar Pro to use the webcal
* protocal instead of http
*
* Note: if you have https:// on your site, pelase adjust accordingly
*
* @author jkudish
* @param string $link the original
* @return string $link the filtered link
*/
add_filter('tribe_get_ical_link', 'tribe_filter_ical_link');
function tribe_filter_ical_link($link) {
return str_replace('http://', 'webcal://', $link);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment