WS_OK_7.4.33
<?php
/**
* Cardinal Store Locator
*
* Store locator plugin for WordPress
*
* @package BH_Store_Locator
* @author Bjorn Holine <bjorn@cardinalwp.com>
* @license GPL-3.0+
* @link https://cardinalwp.com/
* @copyright 2021 Bjorn Holine
*
* @wordpress-plugin
* Plugin Name: Cardinal Store Locator
* Plugin URI: https://cardinalwp.com/
* Description: Store locator and mapping plugin for WordPress
* Version: 1.5.4
* Author: Bjorn Holine
* Author URI: https://bjornholine.com/
* Text Domain: bh-storelocator
* License: GPL-3.0+
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**----------------------------------------------------------------------------*
* Global Constants
*----------------------------------------------------------------------------*/
define( 'CARDINAL_STORE_LOCATOR_VERSION', '1.5.4' );
define( 'CARDINAL_STORE_LOCATOR_URL', plugin_dir_url( __FILE__ ) );
define( 'CARDINAL_STORE_LOCATOR_PATH', plugin_dir_path( __FILE__ ) );
define( 'CARDINAL_STORE_LOCATOR_INC', CARDINAL_STORE_LOCATOR_PATH . 'includes/' );
define( 'CARDINAL_STORE_LOCATOR_ADMIN_INC', CARDINAL_STORE_LOCATOR_PATH . 'admin/includes/' );
define( 'CARDINAL_STORE_LOCATOR_PUBLIC_INC', CARDINAL_STORE_LOCATOR_PATH . 'public/includes/' );
define( 'CARDINAL_STORE_LOCATOR_BLOCKS_INC', CARDINAL_STORE_LOCATOR_PUBLIC_INC . 'blocks/' );
/**----------------------------------------------------------------------------*
* Updater
*----------------------------------------------------------------------------*/
if ( ! class_exists( 'BH_Store_Locator_Plugin_Updater' ) ) {
include CARDINAL_STORE_LOCATOR_INC . 'BH_Store_Locator_Plugin_Updater.php';
}
/**----------------------------------------------------------------------------*
* Shared Functionality
*----------------------------------------------------------------------------*/
require_once CARDINAL_STORE_LOCATOR_INC . 'class-bh-store-locator-defaults.php';
require_once CARDINAL_STORE_LOCATOR_INC . 'helpers.php';
require_once CARDINAL_STORE_LOCATOR_INC . 'class-database.php';
/**----------------------------------------------------------------------------*
* Public-Facing Functionality
*----------------------------------------------------------------------------*/
require_once CARDINAL_STORE_LOCATOR_PATH . 'public/class-bh-store-locator.php';
/**
* The code that runs during plugin activation.
*/
function activate_bh_store_locator() {
require_once CARDINAL_STORE_LOCATOR_INC . 'class-bh-store-locator-activator.php';
BH_Store_Locator_Activator::activate();
}
/**
* The code that runs during plugin deactivation.
*/
function deactivate_bh_store_locator() {
require_once CARDINAL_STORE_LOCATOR_INC . 'class-bh-store-locator-deactivator.php';
BH_Store_Locator_Deactivator::deactivate();
}
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*/
register_activation_hook( __FILE__, 'activate_bh_store_locator' );
register_deactivation_hook( __FILE__, 'deactivate_bh_store_locator' );
add_action( 'plugins_loaded', [ 'BH_Store_Locator', 'get_instance' ] );
/**----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
if ( is_admin() ) {
require_once CARDINAL_STORE_LOCATOR_PATH . 'admin/class-bh-store-locator-admin.php';
add_action( 'plugins_loaded', [ 'BH_Store_Locator_Admin', 'get_instance' ] );
}