Tribe__Events__Aggregator__Records::hook()
Hooks all the actions and filters needed by the class.
Source
File: src/Tribe/Aggregator/Records.php
public function hook() {
// Register the Custom Post Type
add_action( 'init', array( $this, 'get_post_type' ) );
// Register the Custom Post Statuses
add_action( 'init', array( $this, 'get_status' ) );
// Run the Import when Hitting the Event Aggregator Endpoint
add_action( 'tribe_aggregator_endpoint_insert', array( $this, 'action_do_import' ) );
// Delete Link Filter
add_filter( 'get_delete_post_link', array( $this, 'filter_delete_link' ), 15, 3 );
// Edit Link Filter
add_filter( 'get_edit_post_link', array( $this, 'filter_edit_link' ), 15, 3 );
// Filter Eventbrite to Add Site to URL
add_filter( 'tribe_aggregator_get_import_data_args', array( 'Tribe__Events__Aggregator__Record__Eventbrite', 'filter_add_site_get_import_data' ), 10, 2 );
// Filter ical events to preserve some fields that aren't supported by iCalendar
add_filter( 'tribe_aggregator_before_update_event', array( 'Tribe__Events__Aggregator__Record__iCal', 'filter_event_to_preserve_fields' ), 10, 2 );
// Filter ics events to preserve some fields that aren't supported by ICS
add_filter( 'tribe_aggregator_before_update_event', array( 'Tribe__Events__Aggregator__Record__ICS', 'filter_event_to_preserve_fields' ), 10, 2 );
// Filter gcal events to preserve some fields that aren't supported by Google Calendar
add_filter( 'tribe_aggregator_before_update_event', array( 'Tribe__Events__Aggregator__Record__gCal', 'filter_event_to_preserve_fields' ), 10, 2 );
// Filter meetup events to force an event URL
add_filter( 'tribe_aggregator_before_save_event', array( 'Tribe__Events__Aggregator__Record__Meetup', 'filter_event_to_force_url' ), 10, 2 );
// Filter meetup events to preserve some fields that aren't supported by Meetup
add_filter( 'tribe_aggregator_before_update_event', array( 'Tribe__Events__Aggregator__Record__Meetup', 'filter_event_to_preserve_fields' ), 10, 2 );
// Filter eventbrite events to preserve some fields that aren't supported by Eventbrite
add_filter( 'tribe_aggregator_before_update_event', array( 'Tribe__Events__Aggregator__Record__Eventbrite', 'filter_event_to_preserve_fields' ), 10, 2 );
add_filter( 'tribe_aggregator_default_eventbrite_post_status', array( 'Tribe__Events__Aggregator__Record__Eventbrite', 'filter_set_default_post_status' ) );
add_filter( 'tribe_aggregator_new_event_post_status_before_import', array( 'Tribe__Events__Aggregator__Record__Eventbrite', 'filter_setup_do_not_override_post_status' ), 10, 3 );
}
Changelog
| Version | Description |
|---|---|
| 4.6.15 | Introduced. |