Created
February 16, 2012 08:47
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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