Tribe__Tickets__Main::hooks()
set up hooks for this class
Source
File: src/Tribe/Main.php
public function hooks() {
add_action( 'init', array( $this, 'init' ) );
// connect upgrade script
add_action( 'init', array( $this, 'run_updates' ), 0, 0 );
add_filter( 'tribe_post_types', array( $this, 'inject_post_types' ) );
// Setup Help Tab texting
add_action( 'tribe_help_pre_get_sections', array( $this, 'add_help_section_support_content' ) );
add_action( 'tribe_help_pre_get_sections', array( $this, 'add_help_section_featured_content' ) );
add_action( 'tribe_help_pre_get_sections', array( $this, 'add_help_section_extra_content' ) );
add_filter( 'tribe_support_registered_template_systems', array( $this, 'add_template_updates_check' ) );
add_action( 'tribe_tickets_plugin_loaded', array( 'Tribe__Support', 'getInstance' ) );
// Setup Front End Display
add_action( 'tribe_events_inside_cost', 'tribe_tickets_buy_button', 10, 0 );
// Hook to oembeds
add_action( 'tribe_events_embed_after_the_cost_value', array( $this, 'inject_buy_button_into_oembed' ) );
add_action( 'embed_head', array( $this, 'embed_head' ) );
// Attendee screen enhancements
add_action( 'tribe_events_tickets_attendees_event_details_top', array( $this, 'setup_attendance_totals' ), 20 );
// CSV Import options
if ( class_exists( 'Tribe__Events__Main' ) ) {
add_filter( 'tribe_events_import_options_rows', array( Tribe__Tickets__CSV_Importer__Rows::instance(), 'filter_import_options_rows' ) );
add_filter( 'tribe_aggregator_csv_post_types', array( Tribe__Tickets__CSV_Importer__Rows::instance(), 'filter_csv_post_types' ) );
add_filter( 'tribe_aggregator_csv_column_mapping', array( Tribe__Tickets__CSV_Importer__Column_Names::instance(), 'filter_rsvp_column_mapping' ) );
add_filter( 'tribe_event_import_rsvp_tickets_column_names', array( Tribe__Tickets__CSV_Importer__Column_Names::instance(), 'filter_rsvp_column_names' ) );
add_filter( 'tribe_events_import_rsvp_tickets_importer', array( 'Tribe__Tickets__CSV_Importer__RSVP_Importer', 'instance' ), 10, 2 );
add_action( 'tribe_tickets_ticket_deleted', array( 'Tribe__Tickets__Attendance', 'delete_attendees_caches' ) );
/**
* Hooking to "rsvp" to fetch an importer to fetch Column names is deprecated
*
* These are kept in place during the transition from the old CSV importer to the new importer
* driven by Event Aggregator. We should remove these hooks when the old CSV interface gets
* retired completely.
*
* @todo remove these two hooks when the old CSV interface is retired, maybe 5.0?
*/
add_filter( 'tribe_events_import_rsvp_importer', array( 'Tribe__Tickets__CSV_Importer__RSVP_Importer', 'instance' ), 10, 2 );
add_filter( 'tribe_event_import_rsvp_column_names', array( Tribe__Tickets__CSV_Importer__Column_Names::instance(), 'filter_rsvp_column_names' ) );
}
// Load our assets
add_action( 'tribe_tickets_plugin_loaded', tribe_callback( 'tickets.assets', 'enqueue_scripts' ) );
add_action( 'tribe_tickets_plugin_loaded', tribe_callback( 'tickets.assets', 'admin_enqueue_scripts' ) );
add_action( 'admin_enqueue_scripts', tribe_callback( 'tickets.assets', 'enqueue_editor_scripts' ) );
add_filter( 'tribe_asset_data_add_object_tribe_l10n_datatables', tribe_callback( 'tickets.assets', 'add_data_strings' ) );
// Redirections
add_action( 'wp_loaded', tribe_callback( 'tickets.redirections', 'maybe_redirect' ) );
}