# bookit/2.6.0.5/includes/widgets/ElementorWidget.php

Bookit — Booking &amp; Appointment Calendar, version 2.6.0.5. 76 lines.

- Page: https://pluginprobe.com/plugins/bookit/2.6.0.5/code/includes/widgets/ElementorWidget.php
- Raw: https://pluginprobe.com/plugins/bookit/2.6.0.5/raw/includes/widgets/ElementorWidget.php
- Modified: 2026-09-14T17:08:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/bookit/2.6.0.5/code/includes/widgets/ElementorWidget.php#L10-L20`.

```php
<?php

namespace Bookit\Widgets;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/**
 * ElementorWidget Class
 *
 * Register new elementor widget.
 *
 * @since 1.0.0
 */
class ElementorWidget {

	/**
	 * Constructor
	 *
	 * @since 1.0.0
	 *
	 * @access public
	 */
	public function __construct() {
		$this->add_actions();
	}

	/**
	 * Add Actions
	 *
	 * @since 1.0.0
	 *
	 * @access private
	 */
	private function add_actions() {
		add_action( 'elementor/widgets/register', array( $this, 'on_widgets_registered' ) );
	}

	/**
	 * On Widgets Registered
	 *
	 * @since 1.0.0
	 *
	 * @access public
	 */
	public function on_widgets_registered() {
		$this->includes();
		$this->register_widget();
	}

	/**
	 * Includes
	 *
	 * @since 1.0.0
	 *
	 * @access private
	 */
	private function includes() {
		require BOOKIT_INCLUDES_PATH . '/widgets/ElementorWidgetSettings.php';
	}

	/**
	 * Register Widget
	 *
	 * @since 1.0.0
	 *
	 * @access private
	 */
	private function register_widget() {
		\Elementor\Plugin::instance()->widgets_manager->register( new ElementorWidgetSettings() );
	}
}

new ElementorWidget();

```
