Tribe__Image__Plus__Main::init_autoloading()
Requires the autoloader class from the main plugin class and sets up autoloading.
Source
File: src/Tribe/Main.php
public function init_autoloading() {
$prefixes = array();
if ( ! class_exists( 'Tribe__Autoloader' ) ) {
require_once $GLOBALS['tribe-common-info']['dir'] . '/Autoloader.php';
$prefixes['Tribe__'] = $GLOBALS['tribe-common-info']['dir'];
}
$autoloader = Tribe__Autoloader::instance();
// include the fake Tribe__Main if a preferred one from TEC/ET hasn't been prepped for use
if ( ! empty( $prefixes['Tribe__'] ) && "{$this->plugin_path}common/src/Tribe" === $prefixes['Tribe__'] ) {
require_once $this->plugin_path . 'Tribe__Main.php';
} else {
$autoloader->register_prefixes( $prefixes );
}
$autoloader->register_prefix( 'Tribe__Image__Plus__', dirname( __FILE__ ) . '/src/Tribe', 'image-widget-plus' );
// deprecated classes are registered in a class to path fashion
foreach ( glob( $this->plugin_path . 'src/deprecated/*.php' ) as $file ) {
$class_name = str_replace( '.php', '', basename( $file ) );
$autoloader->register_class( $class_name, $file );
}
$autoloader->register_autoloader();
}