<?php

/**
 * Plugin Name: Charter Booker
 * Description: Booking engine for charter operators.
 * Version: 1.1.2
 * Requires PHP: 7.4
 * Author: Marcus Burnette
 * Text Domain: charter-booker
 * License: GPLv2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 */
if ( !function_exists( 'chbk_fs' ) ) {
    // Create a helper function for easy SDK access.
    function chbk_fs() {
        global $chbk_fs;
        if ( !isset( $chbk_fs ) ) {
            // Include Freemius SDK.
            require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';
            $chbk_fs = fs_dynamic_init( array(
                'id'               => '24010',
                'slug'             => 'charter-booker',
                'premium_slug'     => 'charter-booker-pro',
                'type'             => 'plugin',
                'public_key'       => 'pk_4c7b5a9ca91cbdc90bc1c4e33f131',
                'is_premium'       => false,
                'premium_suffix'   => 'Pro',
                'is_org_compliant' => true,
                'has_addons'       => false,
                'has_paid_plans'   => true,
                'menu'             => array(
                    'slug'    => 'chbk_dashboard',
                    'contact' => false,
                    'support' => false,
                ),
                'is_live'          => true,
            ) );
        }
        return $chbk_fs;
    }

    // Init Freemius.
    chbk_fs();
    // Signal that SDK was initiated.
    do_action( 'chbk_fs_loaded' );
}
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
if ( !defined( 'CHBK_VERSION' ) ) {
    define( 'CHBK_VERSION', '1.1.2' );
}
if ( !defined( 'CHBK_PLUGIN_FILE' ) ) {
    define( 'CHBK_PLUGIN_FILE', __FILE__ );
}
if ( !defined( 'CHBK_PLUGIN_DIR' ) ) {
    define( 'CHBK_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
}
if ( !defined( 'CHBK_PLUGIN_URL' ) ) {
    define( 'CHBK_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
}
require_once CHBK_PLUGIN_DIR . 'includes/bootstrap.php';
register_activation_hook( __FILE__, 'chbk_activate_core_plugin' );
register_deactivation_hook( __FILE__, 'chbk_deactivate_core' );
add_action( 'plugins_loaded', 'chbk_bootstrap' );
function chbk_activate_core_plugin() {
    chbk_activate_core();
}
