I’m looking at how the Events Manager plugin overrides the calls for event data to see if I can do something similar. May just end up using the Events Manager plugin even though it is overkill for what I need.
In the wp-fullcalendar.php the code checks to see if the Events Manager plugin is installed:
//START Events Manager Integration
if( defined('EM_VERSION') ){
include('wpfc-events-manager.php');
wpfc_em_init();
}
//END Events Manager Integration
In the wpfc_em_init() function it removes the actions that get the event posts and use the post publish date to build the json, and adds in it’s own that build the json using the Event Manager specific info:
remove_action('wp_ajax_WP_FullCalendar', array('WP_FullCalendar','ajax'));
remove_action('wp_ajax_nopriv_WP_FullCalendar', array('WP_FullCalendar','ajax'));
add_action('wp_ajax_WP_FullCalendar', 'wpfc_em_ajax');
add_action('wp_ajax_nopriv_WP_FullCalendar', 'wpfc_em_ajax');
So I’m thinking that maybe I’ll create my own function that is the equivalent of wpfc_em_ajax and add it in the same way. The problem is that I think I’ll have to hack the core code of wp-fullcalendar.php so that it recognizes my function – may try it without that first.