Skip to content

Instantly share code, notes, and snippets.

@jeffcdavis
Last active August 29, 2015 14:06
Show Gist options
  • Save jeffcdavis/a852bbeb4a2b6c4ec7d1 to your computer and use it in GitHub Desktop.
Save jeffcdavis/a852bbeb4a2b6c4ec7d1 to your computer and use it in GitHub Desktop.
Add new placeholders to Event Rocket plugin
<?php
/*may need additional placeholders for the event rocket plugin, which in turn extends The Events Calendar */
add_filter( 'eventrocket_embedded_event_placeholders', 'my_new_inline_template_tag' );
function my_new_inline_template_tag( $placeholders ) {
$placeholders['{random_number}'] = 'my_inline_template_tag_hander';
return $placeholders;
}
function my_inline_template_tag_handler() {
return rand( 0, 1000000 );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment