Widgets_Manager

Class Widgets_Manager


Source

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

class Widgets_Manager extends Manager_Abstract {
	/**
	 * {@inheritdoc}
	 */
	protected $type = 'widgets';

	/**
	 * Constructor
	 *
	 * @since 5.4.4
	 */
	public function __construct() {
		$this->objects = [
			Widget_Tickets::get_slug() => Widget_Tickets::class,
			Widget_RSVP::get_slug()    => Widget_RSVP::class
		];
	}

	/**
	 * Registers the widgets with Elementor.
	 *
	 * @since 5.4.4
	 */
	public function register() {
		$widgets = $this->get_registered_objects();

		foreach ( $widgets as $slug => $widget_class ) {
			Elementor_Plugin::instance()->widgets_manager->register( tribe( $widget_class ) );
		}
	}
}

Top ↑

Changelog

Changelog
Version Description
5.4.4 Introduced.

Top ↑

Methods