Skip to content

Instantly share code, notes, and snippets.

@afragen
Last active October 5, 2015 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afragen/2758724 to your computer and use it in GitHub Desktop.
Save afragen/2758724 to your computer and use it in GitHub Desktop.
Truncate the details parameter of Google calendar link to 1000 characters.
<?php
//Add the following to your theme's functions.php
add_filter( 'tribe_google_calendar_parameters', 'tribe_google_calendar_link_modify', 10, 2 );
function tribe_google_calendar_link_modify( $params ) {
$mod = urldecode( $params['details'] );
$mod = strip_tags( $mod );
$mod = str_replace( ' ', '+', $mod );
unset($params['details']);
$params['details'] = $mod;
return $params;
}
?>
@afragen
Copy link
Author

afragen commented Jun 8, 2012

This hack is no longer required. It is written in to ECP 2.0.7.

@afragen
Copy link
Author

afragen commented Nov 10, 2013

Updated to work with ECP 3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment