event_tickets_plus_init()
Instantiate class and set up WordPress actions.
Source
File: event-tickets-plus.php
function event_tickets_plus_init() {
if ( class_exists( 'Tribe__Main' ) && ! is_admin() && ! class_exists( 'Tribe__Tickets_Plus__PUE__Helper' ) ) {
tribe_main_pue_helper();
}
new Tribe__Tickets_Plus__PUE( __FILE__ );
$classes_exist = class_exists( 'Tribe__Tickets__Main' ) && class_exists( 'Tribe__Tickets_Plus__Main' );
$plugin_can_run = $classes_exist && tribe_check_plugin( 'Tribe__Tickets_Plus__Main' );
/**
* Filter whether the plugin can run.
*
* @since 4.10
*
* @param boolean $plugin_can_run Whether the plugin can run.
*/
$plugin_can_run = apply_filters( 'tribe_event_tickets_plus_can_run', $plugin_can_run );
if ( $plugin_can_run ) {
tribe( 'tickets-plus.main' )->instance();
return;
}
// if we have the plugin register the dependency check will handle the messages
if ( class_exists( 'Tribe__Abstract_Plugin_Register' ) ) {
new Tribe__Tickets_Plus__PUE( __FILE__ );
return;
}
add_action( 'admin_notices', 'event_tickets_plus_show_fail_message' );
add_action( 'network_admin_notices', 'event_tickets_plus_show_fail_message' );
}
Changelog
| Version | Description |
|---|---|
| 4.10 | Introduced. |