Load calendar in Admin
-
Is there any way of getting the calendar to load within the admin side? I have tried adding the enqueue scripts action and the shortcodes to the init() function, however i get Uncaught ReferenceError: WPFC is not defined within The browser console :
if( !is_admin() ){ //show only in public area
add_action(‘wp_enqueue_scripts’,array(‘WP_FullCalendar’,’enqueue_scripts’));
//shortcodes
add_shortcode(‘fullcalendar’, array(‘WP_FullCalendar’,’calendar’));
add_shortcode(‘events_fullcalendar’, array(‘WP_FullCalendar’,’calendar’)); //depreciated, will be gone by 1.0
}else{
//admin actions
include(‘wpfc-admin.php’);
add_action(‘wp_enqueue_scripts’,array(‘WP_FullCalendar’,’enqueue_scripts’));
//shortcodes
add_shortcode(‘fullcalendar’, array(‘WP_FullCalendar’,’calendar’));
add_shortcode(‘events_fullcalendar’, array(‘WP_FullCalendar’,’calendar’)); //depreciated, will be gone by 1.0
}
- The topic ‘Load calendar in Admin’ is closed to new replies.