Skip to content

Instantly share code, notes, and snippets.

@richsalvucci
Last active July 31, 2018 13:06
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 richsalvucci/70a73b5463002a757bfc52af2f74f172 to your computer and use it in GitHub Desktop.
Save richsalvucci/70a73b5463002a757bfc52af2f74f172 to your computer and use it in GitHub Desktop.
Event Espresso Cose Added
<?php
add_action( 'template_redirect', 'my_add_ee_calendar_assets' );
function my_add_ee_calendar_assets() {
// change is_page() parameter to match your calendar page slug
if ( class_exists( 'EED_Espresso_Calendar' ) && is_page('2567') ) {
global $is_espresso_calendar;
$is_espresso_calendar = TRUE;
add_action( 'wp_enqueue_scripts', array( EED_Espresso_Calendar::instance(), 'calendar_scripts' ) );
if ( EED_Espresso_Calendar::instance()->config()->tooltip->show ) {
add_filter('FHEE_load_qtip', '__return_true' );
}
}
}
add_action( 'template_redirect', 'my_add_ee_home_calendar_assets' );
function my_add_ee_home_calendar_assets() {
// change is_page() parameter to match your calendar page slug
if ( class_exists( 'EED_Espresso_Calendar' ) && is_front_page()){
global $is_espresso_calendar;
$is_espresso_calendar = TRUE;
add_action( 'wp_enqueue_scripts', array( EED_Espresso_Calendar::instance(), 'calendar_scripts' ) );
if ( EED_Espresso_Calendar::instance()->config()->tooltip->show ) {
add_filter('FHEE_load_qtip', '__return_true' );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment