eventorganiser_generate_occurrences
(filter)
Filters the event schedule after its dates has been generated by a given schedule.
The filtered array is an array of occurrences generated from a
schedule which may include:
- start (DateTime) - when the event starts
- end (DateTime) - when the event ends
- all_day (Bool) - If the event is all day or no
- all_day (Bool) - If the event is all day or not
- schedule (String) - One of once|weekl|daily|monthly|yearly|custom
- schedule_meta (Array|String) - See documentation for
eo_insert_event()
- frequency (int) - The frequency of which the event repeats
- until (DateTime) - date the schedule repeats until
- schedule_last (DateTime) - date of last occurrence of event
- number_occurrences (int) - number of times the event should repeat (if
until
is not specified).
- exclude (array) - Array of DateTime objects to exclude from the schedule
- include (array) - Array of DateTime objects to include in the schedule
- occurrences (array) - Array of DateTime objects generated from the above schedule.
Parameters
array
|
$_event_data |
The event schedule with generated occurrences.
|
array
|
$event_data |
The original event schedule (without occurrences).
|
Example Usage
add_filter( 'eventorganiser_generate_occurrences', 'my_callback_function', 10, 2 );
function my_callback_function( $_event_data, $event_data ){
//Change first value and return it
return $_event_data
};