# booktics/1.0.14/booktics.php

Booktics – Appointment Booking Calendar for Service Businesses, version 1.0.14. 120 lines.

- Page: https://pluginprobe.com/plugins/booktics/1.0.14/code/booktics.php
- Raw: https://pluginprobe.com/plugins/booktics/1.0.14/raw/booktics.php
- Modified: 2026-01-12T13:09:20+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/booktics/1.0.14/code/booktics.php#L10-L20`.

```php
<?php

/**
 * Plugin Name:       Booktics
 * Plugin URI:        https://arraytics.com/booktics/
 * Description:       Schedule, Appointment and Seat Booking plugin.
 * Version:           1.0.14
 * Requires at least: 5.2
 * Requires PHP:      7.4
 * Author:            Arraytics
 * Author URI:        https://arraytics.com/
 * License:           GPL v2 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       booktics
 * Domain Path:       /languages

 * Booktics is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * any later version.

 * Booktics Essential is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with Booktics. If not, see <http://www.gnu.org/licenses/>.
 *
 * @package Booktics
 * @category Core
 * @author Arraytics
 * @version 1.0.1
 */

use Booktics\Booktics;
use Booktics\Providers\Global_Service_Provider;

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;


require_once __DIR__ . '/vendor/autoload.php';


// Define constant for the Plugin file.
defined( 'BOOKTICS_FILE' ) || define( 'BOOKTICS_FILE', __FILE__ );
defined( 'BOOKTICS_DIR' ) || define( 'BOOKTICS_DIR', __DIR__ );
defined( 'BOOKTICS_VERSION' ) || define( 'BOOKTICS_VERSION', '1.0.14' );

global $booktics_container;

$booktics_container = new \Booktics\Container\Container();

$booktics_container->addServiceProvider( 'global', Global_Service_Provider::class );

/**
 * Booktics container
 *
 * @return  \Booktics\Container\Container
 */
function booktics_container() {
    global $booktics_container;

    return $booktics_container;
}

/**
 * Registers the uninstaller form backend.
 * 
 * @return void
 */
function register_uninstaller_form() {
    try {
        if ( class_exists( 'UninstallerForm\UninstallerForm' ) && is_callable( [ '\UninstallerForm\UninstallerForm', 'init' ] ) ) {
            $reflection  = new ReflectionMethod( '\UninstallerForm\UninstallerForm', 'init' );
            $totalParams = $reflection->getNumberOfParameters(); // Maximum number of parameters allowed

            if( $totalParams === 6 ) {
                $uninstaller_form = new \UninstallerForm\UninstallerForm();
                $uninstaller_form->init(
                    'Booktics',         // Plugin name
                    'booktics',         // Plugin Slug
                    __FILE__,
                    'booktics',   // Text Domain Name
                    'booktics-feedback-modal',    // plugins-admin-script-handler
                    'https://arraytics.com/?fluentcrm=1&route=contact&hash=09343e4f-30f7-4bda-b8b6-d4b6f90754ad' // web hook for booktics
                );
            } else {
                // For compatibility with older versions of uninstaller form
                $uninstaller_form = new \UninstallerForm\UninstallerForm();
                $uninstaller_form->init(
                    'Booktics',         // Plugin name
                    'booktics',         // Plugin Slug
                    __FILE__,
                    'booktics',   // Text Domain Name
                    'booktics-feedback-modal' 
                );
            }
        }
    } catch ( \Throwable $e ) {
        error_log('Error in initiating uninstaller form');
    }
}

/**
 * Load Booktics Plugin when all plugins loaded.
 *
 * @return Booktics The singleton instance of Booktics.
 */
function booktics() {
    add_action( 'admin_init', 'booktics_handle_conflicting_plugins' );
    add_action( 'admin_notices', 'booktics_show_conflict_deactivation_notice' );
    register_uninstaller_form();
    return Booktics::instance();
}

// Let's go.
booktics();

```
