load EE4 calendar scripts to home page
This file contains 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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_action( 'template_redirect', 'my_add_calendar_scripts_to_home_page' ); | |
function my_add_calendar_scripts_to_home_page() { | |
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