Plugin::register()
Setup the Extension’s properties.
This always executes even if the required plugins are not present.
Source
File: src/Tribe/Plugin.php
public function register() {
tribe_events_virtual_load_text_domain();
// Set up the plugin provider properties.
$this->plugin_path = trailingslashit( dirname( static::FILE ) );
$this->plugin_dir = trailingslashit( basename( $this->plugin_path ) );
$this->plugin_url = plugins_url( $this->plugin_dir, $this->plugin_path );
$this->register_autoloader();
// Register this provider as the main one and use a bunch of aliases.
$this->container->singleton( static::class, $this );
$this->container->singleton( 'events-virtual', $this );
$this->container->singleton( 'events-virtual.plugin', $this );
$this->container->register( PUE::class );
$this->load_template_tags();
if ( ! $this->check_plugin_dependencies() ) {
// If the plugin dependency manifest is not met, then bail and stop here.
return;
}
// Start binds.
$this->container->singleton( Template::class, Template::class );
$this->container->singleton( Event_Meta::class, Event_Meta::class );
$this->container->singleton( Metabox::class, Metabox::class );
$this->container->singleton( JSON_LD::class, JSON_LD::class );
$this->container->singleton( Template_Modifications::class, Template_Modifications::class );
// End binds.
$this->container->register( Hooks::class );
$this->container->register( Assets::class );
$this->container->register( Compatibility::class );
$this->container->register( Export_Provider::class );
$this->container->register( Rewrite\Rewrite_Provider::class );
$this->container->register( Context\Context_Provider::class );
$this->container->register( ORM\ORM_Provider::class );
$this->container->register( Views\V2\Views_Provider::class );
$this->container->register( Editor\Provider::class );
}