tribe_init_community_tickets_autoloading()

Requires the autoloader class from the main plugin class and sets up autoloading.


Source #

File: events-community-tickets.php

function tribe_init_community_tickets_autoloading() {
	if ( ! class_exists( 'Tribe__Autoloader' ) ) {
		return;
	}

	$autoloader = Tribe__Autoloader::instance();

	$autoloader->register_prefix( 'Tribe__Events__Community__Tickets__', dirname( __FILE__ ) . '/src/Tribe', 'events-community-tickets' );

	// deprecated classes are registered in a class to path fashion
	foreach ( glob( dirname( __FILE__ ) . '/src/deprecated/*.php' ) as $file ) {
		$class_name = str_replace( '.php', '', basename( $file ) );
		$autoloader->register_class( $class_name, $file );
	}

	$autoloader->register_autoloader();
}

Top ↑

Changelog #

Changelog
Version Description
4.6 Introduced.