PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.1
Booking for Appointments and Events Calendar – Amelia v2.4.1
2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / src / Infrastructure / WP / Elementor / ElementorBlock.php
ameliabooking / src / Infrastructure / WP / Elementor Last commit date
AmeliaBookingElementorWidget.php 6 months ago AmeliaCatalogBookingElementorWidget.php 6 months ago AmeliaCatalogElementorWidget.php 6 months ago AmeliaEventsCalendarBookingElementorWidget.php 1 month ago AmeliaEventsElementorWidget.php 1 month ago AmeliaEventsListBookingButtonElementorWidget.php 2 months ago AmeliaEventsListBookingElementorWidget.php 1 month ago AmeliaStepBookingButtonElementorWidget.php 2 months ago AmeliaStepBookingElementorWidget.php 1 month ago ElementorBlock.php 2 months ago
ElementorBlock.php
89 lines
1 <?php
2
3 /**
4 * @copyright © Melograno Ventures. All rights reserved.
5 * @licence See LICENCE.md for license details.
6 */
7
8 namespace AmeliaBooking\Infrastructure\WP\Elementor;
9
10 use Elementor\AmeliaBookingElementorWidget;
11 use Elementor\AmeliaStepBookingElementorWidget;
12 use Elementor\AmeliaStepBookingButtonElementorWidget;
13 use Elementor\AmeliaCatalogBookingElementorWidget;
14 use Elementor\AmeliaCatalogElementorWidget;
15 use Elementor\AmeliaEventsElementorWidget;
16 use Elementor\AmeliaEventsListBookingElementorWidget;
17 use Elementor\AmeliaEventsListBookingButtonElementorWidget;
18 use Elementor\Plugin;
19
20 /**
21 * Class ElementorBlock
22 *
23 * @package AmeliaBooking\Infrastructure\WP\Elementor
24 */
25 class ElementorBlock
26 {
27 protected static $instance;
28
29 public static function get_instance()
30 {
31 if (!isset(static::$instance)) {
32 static::$instance = new static();
33 }
34
35 return static::$instance;
36 }
37
38 protected function __construct()
39 {
40 add_action('elementor/editor/before_enqueue_scripts', [$this, 'widget_styles']);
41 add_action('elementor/widgets/register', [$this, 'register_widgets']);
42 add_action('elementor/frontend/after_enqueue_styles', [$this, 'widget_styles']);
43 add_action('elementor/elements/categories_registered', [$this, 'register_widget_categories']);
44 }
45
46 public function includes()
47 {
48 require_once(AMELIA_PATH . '/src/Infrastructure/WP/Elementor/AmeliaStepBookingElementorWidget.php');
49 require_once(AMELIA_PATH . '/src/Infrastructure/WP/Elementor/AmeliaStepBookingButtonElementorWidget.php');
50 require_once(AMELIA_PATH . '/src/Infrastructure/WP/Elementor/AmeliaCatalogBookingElementorWidget.php');
51 require_once(AMELIA_PATH . '/src/Infrastructure/WP/Elementor/AmeliaBookingElementorWidget.php');
52 require_once(AMELIA_PATH . '/src/Infrastructure/WP/Elementor/AmeliaCatalogElementorWidget.php');
53 require_once(AMELIA_PATH . '/src/Infrastructure/WP/Elementor/AmeliaEventsElementorWidget.php');
54 require_once(AMELIA_PATH . '/src/Infrastructure/WP/Elementor/AmeliaEventsListBookingElementorWidget.php');
55 require_once(AMELIA_PATH . '/src/Infrastructure/WP/Elementor/AmeliaEventsListBookingButtonElementorWidget.php');
56 }
57
58 public function register_widgets()
59 {
60 $this->includes();
61 Plugin::instance()->widgets_manager->register(new AmeliaStepBookingElementorWidget());
62 Plugin::instance()->widgets_manager->register(new AmeliaStepBookingButtonElementorWidget());
63 Plugin::instance()->widgets_manager->register(new AmeliaCatalogBookingElementorWidget());
64 Plugin::instance()->widgets_manager->register(new AmeliaBookingElementorWidget());
65 Plugin::instance()->widgets_manager->register(new AmeliaCatalogElementorWidget());
66 Plugin::instance()->widgets_manager->register(new AmeliaEventsElementorWidget());
67 Plugin::instance()->widgets_manager->register(new AmeliaEventsListBookingElementorWidget());
68 Plugin::instance()->widgets_manager->register(new AmeliaEventsListBookingButtonElementorWidget());
69 }
70
71 public function widget_styles()
72 {
73 wp_register_style('amelia-elementor-widget-font', AMELIA_URL . 'public/css/frontend/elementor.css', array(), AMELIA_VERSION);
74 wp_enqueue_style('amelia-elementor-widget-font');
75 }
76
77 public function register_widget_categories($elements_manager)
78 {
79 $elements_manager->add_category(
80 'amelia-elementor',
81 [
82 'title' => 'Amelia',
83 'icon' => 'amelia-logo',
84 ],
85 1
86 );
87 }
88 }
89