PluginProbe
Bookit — Booking & Appointment Calendar / 2.6.0.5
Bookit — Booking & Appointment Calendar v2.6.0.5
2.6.0.5 2.6.0.4 2.6.0.3 2.6.0.2 2.6.0.1 2.6.0 trunk 1.2 1.2.2 1.2.3 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 All 62 releases
bookit / includes / widgets / ElementorWidget.php

ElementorWidget.php in Bookit — Booking & Appointment Calendar 2.6.0.5, at includes/widgets/ElementorWidget.php

76 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Bookit\Widgets;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit; // Exit if accessed directly
7 }
8
9 /**
10 * ElementorWidget Class
11 *
12 * Register new elementor widget.
13 *
14 * @since 1.0.0
15 */
16 class ElementorWidget {
17
18 /**
19 * Constructor
20 *
21 * @since 1.0.0
22 *
23 * @access public
24 */
25 public function __construct() {
26 $this->add_actions();
27 }
28
29 /**
30 * Add Actions
31 *
32 * @since 1.0.0
33 *
34 * @access private
35 */
36 private function add_actions() {
37 add_action( 'elementor/widgets/register', array( $this, 'on_widgets_registered' ) );
38 }
39
40 /**
41 * On Widgets Registered
42 *
43 * @since 1.0.0
44 *
45 * @access public
46 */
47 public function on_widgets_registered() {
48 $this->includes();
49 $this->register_widget();
50 }
51
52 /**
53 * Includes
54 *
55 * @since 1.0.0
56 *
57 * @access private
58 */
59 private function includes() {
60 require BOOKIT_INCLUDES_PATH . '/widgets/ElementorWidgetSettings.php';
61 }
62
63 /**
64 * Register Widget
65 *
66 * @since 1.0.0
67 *
68 * @access private
69 */
70 private function register_widget() {
71 \Elementor\Plugin::instance()->widgets_manager->register( new ElementorWidgetSettings() );
72 }
73 }
74
75 new ElementorWidget();
76