PluginProbe
Hydra Booking — Appointment Scheduling & Booking Calendar / trunk
Hydra Booking — Appointment Scheduling & Booking Calendar vtrunk
1.2.5 1.2.4 1.2.3 1.2.2 1.2.1 1.2.0 1.1.45 1.1.44 1.1.43 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 All 85 releases
hydra-booking / hydra-booking.php

hydra-booking.php in Hydra Booking — Appointment Scheduling & Booking Calendar trunk, at hydra-booking.php

122 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: Hydra Booking — Appointment Scheduling & Booking Calendar
5 * Plugin URI: https://hydrabooking.com/
6 * Description: Appointment Booking Plugin with Automated Scheduling - Apple/Outlook/ Google Calendar, WooCommerce, Zoom, Fluent Forms, Zapier, Mailchimp & CRM Integration.
7 * Version: 1.2.5
8 * Tested up to: 7.0
9 * Author: Themefic
10 * Author URI: https://themefic.com/
11 * License: GPL-2.0+
12 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13 * Text Domain: hydra-booking
14 * Domain Path: /languages
15 */
16
17 // don't load directly
18 defined('ABSPATH') || exit;
19
20 use HydraBooking\Admin\Controller\Enqueue;
21
22 class THB_INIT
23 {
24 // CONSTARACT
25 public function __construct()
26 {
27 // DEFINE PATH
28
29 define('TFHB_PATH', plugin_dir_path(__FILE__));
30 define('TFHB_URL', plugin_dir_url(__FILE__));
31
32 define('TFHB_VERSION', '1.2.5');
33 define('TFHB_BASE_FILE', __FILE__);
34 define('TFHB_DEV_MODE', false); // Set true to enable dev mode
35
36
37 // Load Vendor Auto Load
38 if (file_exists(TFHB_PATH . '/vendor/autoload.php')) {
39 require_once TFHB_PATH . '/vendor/autoload.php';
40 }
41
42 // Helper Functions
43 if (file_exists(TFHB_PATH . '/includes/Includes.php')) {
44
45 require_once TFHB_PATH . '/includes/Includes.php';
46 }
47
48
49 add_action('init', array($this, 'init'));
50 add_action('current_screen', array($this, 'tfhb_get_plugin_screen'));
51
52 add_action('plugins_loaded', array($this, 'tfhb_load_textdomain'));
53 }
54
55
56 function tfhb_load_textdomain()
57 {
58 // phpcs:ignore PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound
59 load_plugin_textdomain('hydra-booking', false, dirname(plugin_basename(__FILE__)) . '/languages/');
60 }
61
62
63 public function init()
64 {
65
66
67 //Register text domain
68 // phpcs:ignore PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound
69 load_plugin_textdomain('hydra-booking', false, basename(dirname(__FILE__)) . '/languages');
70
71
72 new HydraBooking\Admin\Controller\ScheduleController();
73
74 // Post Type
75 new HydraBooking\PostType\Meeting\Meeting_CPT();
76 new HydraBooking\PostType\Booking\Booking_CPT();
77
78 // enqueue
79 new Enqueue();
80
81 // Create a New host Role
82 new HydraBooking\Admin\Controller\RouteController();
83 if (is_admin()) {
84 // Load Admin Class
85 new HydraBooking\Admin\Admin();
86 }
87
88 // Load iCalendar Controller
89 new HydraBooking\Admin\Controller\iCalendarController();
90
91 // load Promo Notice
92 new HydraBooking\Admin\Controller\PromoNotice();
93 new HydraBooking\Admin\Controller\DashboardWidget();
94
95 // Load App Class
96 new HydraBooking\App\App();
97 }
98
99
100
101
102 public function tfhb_get_plugin_screen()
103 {
104 $current_screen = get_current_screen();
105 // phpcs:ignore WordPress.Security.NonceVerification.Recommended
106 if (isset($_GET['page']) && $_GET['page'] === 'hydra-booking') {
107 // remove admin notice
108 add_action('in_admin_header', array($this, 'tfhb_hide_notices'), 99);
109 }
110 }
111
112 public function tfhb_hide_notices()
113 {
114 remove_all_actions('user_admin_notices');
115 remove_all_actions('admin_notices');
116 }
117 }
118
119
120
121 new THB_INIT();
122