Service_Provider::register()

Registers the bindings and hooks the filters required for the Elementor integration to work.

Contents


Source

File: src/Tribe/Integrations/Elementor/Service_Provider.php

	public function register() {
		$this->container->singleton( Shortcodes::class, Shortcodes::class );

		// Support Elementor widgets if views v2 is enabled.
		if ( tribe_events_views_v2_is_enabled() ) {
			$this->container->singleton( Widgets\Widget_Countdown::class, Widgets\Widget_Countdown::class );
			$this->container->singleton( Widgets\Widget_Event_List::class, Widgets\Widget_Event_List::class );
			$this->container->singleton( Widgets\Widget_Event_Single_Legacy::class, Widgets\Widget_Event_Single_Legacy::class );
			$this->container->singleton( Widgets\Widget_Events_View::class, Widgets\Widget_Events_View::class );
		}

		$this->container->singleton( Templates::class, Templates::class );

		// Register the hooks related to this integration.
		$this->register_hooks();
	}

Top ↑

Changelog

Changelog
Version Description
6.1.0 Added check for ElementorWidget_Base class before registering Elementor widgets to avoid fatal errors.
5.1.4 Introduced.