I needed to add a date parameter to the url in the fullcalendar js, this works fine.
return '<a class="' + classes.join(' ') + '"' +
(event.url ? /// DATE param adjusted and the format
' href="' + htmlEscape(event.url) + '?date=' + htmlEscape(this.getEventTimeText( event, "MMMM D, YYYY")) + '"' :
''
) +
I replaced the script using the modified version like this and it works fine, do you foresee issues with this?
add_action( 'init', 'joy_replace_eo_fullcalendar_with_custom_version', 0 );
/**
* Replace Full Calendar js from Event Organiser plugin with custom version.
*/
function joy_replace_eo_fullcalendar_with_custom_version() {
global $wp_locale;
$version = defined( 'EVENT_ORGANISER_VER' ) ? EVENT_ORGANISER_VER : false;
wp_register_script( 'eo_fullcalendar', ASSETS_URL . 'js/eo-joy-fullcalendar.packed.js',array(
'jquery',
'eo_momentjs',
'jquery-ui-core',
'jquery-ui-widget',
'jquery-ui-button',
), $version, true );
}
Joy Katzen-Guthrie
Also, thank you for replying during the holidays. I’m trying to get a head now because family visits this week when everyone else is back at work.
BTW, I’m not Joy, my name is Christina. Joy is my client.
Joy Katzen-Guthrie
At some point, it’d be nice to have a filter to add variables to the jQuery. I am grateful for the eventorganiser_event_tooltip
filter for the qtip content.
Joy Katzen-Guthrie
You’re welcome :).
There’s a filter for changing the event URL: http://codex.wp-event-organiser.com/hook-eventorganiser_calendar_event_link.html
As with the tooltip, the calendar is cached, so changes are not immediate (you can update an event to clear the cache).
Something like this should work:
add_filter('eventorganiser_calendar_event_link', function($link, $event_id, $occurrence_id){
$date = eo_get_the_start( 'Y-m-d', $event_id, $occurrence_id );
return add_query_arg( 'date', $date, $link );
}, 10, 3);
Stephen Harris