Skip to content

Instantly share code, notes, and snippets.

View johnpdang's full-sized avatar

jd johnpdang

  • San Diego, CA
View GitHub Profile
@johnpdang
johnpdang / functions.php
Last active April 20, 2021 16:37
EE - google calendar shortcode
/* This filter allows you to add custom shortcodes to the message system
* $shortcodes is an array of the available shortcodes for the current library
* $lib is the current shortcode library
*/
function ee_register_new_custom_messages_shortcodes( $shortcodes, EE_Shortcodes $lib ) {
//Add a shortcode to be used with the EE Datetimes within messages
if ( $lib instanceof EE_Datetime_Shortcodes ) {
//Add your shortcode to the add as the key, the value should be a description of the shortcode.
$shortcodes['[GOOGLE_CAL_LINK_*]'] = _('Google Calendar link');