PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.10
Booktics – Appointment Booking Calendar for Service Businesses v1.0.10
1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 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.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 All 27 releases
booktics / booktics.php

booktics.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.10, at booktics.php

120 lines 3.9 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: Booktics
5 * Plugin URI: https://arraytics.com/booktics/
6 * Description: Schedule, Appointment and Seat Booking plugin.
7 * Version: 1.0.10
8 * Requires at least: 5.2
9 * Requires PHP: 7.4
10 * Author: Arraytics
11 * Author URI: https://arraytics.com/
12 * License: GPL v2 or later
13 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
14 * Text Domain: booktics
15 * Domain Path: /languages
16
17 * Booktics is free software: you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation, either version 2 of the License, or
20 * any later version.
21
22 * Booktics Essential is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
26
27 * You should have received a copy of the GNU General Public License
28 * along with Booktics. If not, see <http://www.gnu.org/licenses/>.
29 *
30 * @package Booktics
31 * @category Core
32 * @author Arraytics
33 * @version 1.0.1
34 */
35
36 use Booktics\Booktics;
37 use Booktics\Providers\Global_Service_Provider;
38
39 // Exit if accessed directly.
40 defined( 'ABSPATH' ) || exit;
41
42
43 require_once __DIR__ . '/vendor/autoload.php';
44
45
46 // Define constant for the Plugin file.
47 defined( 'BOOKTICS_FILE' ) || define( 'BOOKTICS_FILE', __FILE__ );
48 defined( 'BOOKTICS_DIR' ) || define( 'BOOKTICS_DIR', __DIR__ );
49 defined( 'BOOKTICS_VERSION' ) || define( 'BOOKTICS_VERSION', '1.0.10' );
50
51 global $booktics_container;
52
53 $booktics_container = new \Booktics\Container\Container();
54
55 $booktics_container->addServiceProvider( 'global', Global_Service_Provider::class );
56
57 /**
58 * Booktics container
59 *
60 * @return \Booktics\Container\Container
61 */
62 function booktics_container() {
63 global $booktics_container;
64
65 return $booktics_container;
66 }
67
68 /**
69 * Registers the uninstaller form backend.
70 *
71 * @return void
72 */
73 function register_uninstaller_form() {
74 try {
75 if ( class_exists( 'UninstallerForm\UninstallerForm' ) && is_callable( [ '\UninstallerForm\UninstallerForm', 'init' ] ) ) {
76 $reflection = new ReflectionMethod( '\UninstallerForm\UninstallerForm', 'init' );
77 $totalParams = $reflection->getNumberOfParameters(); // Maximum number of parameters allowed
78
79 if( $totalParams === 6 ) {
80 $uninstaller_form = new \UninstallerForm\UninstallerForm();
81 $uninstaller_form->init(
82 'Booktics', // Plugin name
83 'booktics', // Plugin Slug
84 __FILE__,
85 'booktics', // Text Domain Name
86 'booktics-feedback-modal', // plugins-admin-script-handler
87 'https://arraytics.com/?fluentcrm=1&route=contact&hash=09343e4f-30f7-4bda-b8b6-d4b6f90754ad' // web hook for booktics
88 );
89 } else {
90 // For compatibility with older versions of uninstaller form
91 $uninstaller_form = new \UninstallerForm\UninstallerForm();
92 $uninstaller_form->init(
93 'Booktics', // Plugin name
94 'booktics', // Plugin Slug
95 __FILE__,
96 'booktics', // Text Domain Name
97 'booktics-feedback-modal'
98 );
99 }
100 }
101 } catch ( \Throwable $e ) {
102 error_log('Error in initiating uninstaller form');
103 }
104 }
105
106 /**
107 * Load Booktics Plugin when all plugins loaded.
108 *
109 * @return Booktics The singleton instance of Booktics.
110 */
111 function booktics() {
112 add_action( 'admin_init', 'booktics_handle_conflicting_plugins' );
113 add_action( 'admin_notices', 'booktics_show_conflict_deactivation_notice' );
114 register_uninstaller_form();
115 return Booktics::instance();
116 }
117
118 // Let's go.
119 booktics();
120