bespokomatic-ebs/bespokomatic-ebs.php

99 lines
3.5 KiB
PHP

<?php
/**
* The plugin bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @link https://www.bespokomatic.co.uk
* @since 0.1
* @package Bespokomatic_Ebs
*
* @wordpress-plugin
* Plugin Name: bespokomatic Embedded Booked Scheduler
* Plugin URI: https://code.lapwing.org/wordpress/bespokomatic-ebs/
* Description: Embed Booked Scheduler into WordPress.
* Version: 0.1
* Author: Sam Black
* Author URI: https://www.bespokomatic.co.uk
* License: GPL-3.0+
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
* Text Domain: bespokomatic-ebs
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
define( 'BESPOKOMATIC_EBS_NAME', 'bespokomatic-ebs' );
define( 'BESPOKOMATIC_EBS_AJAX_PREFIX', 'bespokomatic_ebs' );
define( 'BESPOKOMATIC_EBS_VERSION', '0.1' );
define( 'BESPOKOMATIC_EBS_BOOKED_VERSION', '2.8.4' );
define( 'BESPOKOMATIC_EBS_BOOKED_MAJOR_VERSION', '2.8' );
define( 'BESPOKOMATIC_EBS_BOOKED_PATH', plugin_dir_path( __FILE__ ) . 'includes/booked/' );
define( 'BESPOKOMATIC_EBS_BOOKED_URL', plugins_url( 'includes/booked/Web/', __FILE__ ) );
define( 'BESPOKOMATIC_EBS_TEMPLATES_DIR', plugin_dir_path( __FILE__ ) . 'includes/templates/' );
define( 'BESPOKOMATIC_EBS_BOOKED_DB_VERSION', '2.8.4.20200810' );
define( 'BESPOKOMATIC_EBS_BOOKED_DB_PREFIX', 'bebs' );
define( 'BESPOKOMATIC_EBS_CONFIG_DB_VERSION', 'bebs_db_version' );
define( 'BESPOKOMATIC_EBS_DEBUG', false );
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-bespokomatic-ebs-activator.php
*/
function activate_bespokomatic_ebs() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-bespokomatic-ebs-activator.php';
( new Bespokomatic_Ebs_Activator() )->activate();
}
/**
* The code that runs during plugin loading, mostly for plugin upgrades.
* This action is documented in includes/class-bespokomatic-ebs-activator.php
*/
function loading_bespokomatic_ebs() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-bespokomatic-ebs-activator.php';
( new Bespokomatic_Ebs_Activator() )->loading();
}
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/class-bespokomatic-ebs-deactivator.php
*/
function deactivate_bespokomatic_ebs() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-bespokomatic-ebs-deactivator.php';
( new Bespokomatic_Ebs_Deactivator() )->deactivate();
}
register_activation_hook( __FILE__, 'activate_bespokomatic_ebs' );
register_deactivation_hook( __FILE__, 'deactivate_bespokomatic_ebs' );
add_action( 'plugins_loaded', 'loading_bespokomatic_ebs' );
/**
* The core plugin class that is used to define internationalization,
* admin-specific hooks, and public-facing site hooks.
*/
require plugin_dir_path( __FILE__ ) . 'includes/class-bespokomatic-ebs.php';
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 0.1
*/
function run_bespokomatic_ebs() {
$plugin = new Bespokomatic_Ebs();
$plugin->run();
}
run_bespokomatic_ebs();