<?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.wpultimatesecurity.com/
 * @since             1.0.0
 * @package           Ultimate_Security
 *
 * @wordpress-plugin
 * Plugin Name:       Ultimate Security
 * Plugin URI:        https://www.wpultimatesecurity.com
 * Description:       Robust WordPress Protection Without the Complexity.
 * Version:           1.0.17
 * Author:            programmelab, wpultimatesecurity
 * Author URI:        https://www.wpultimatesecurity.com/
 * License:           GPL-2.0+
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       ultimate-security
 * Domain Path:       /languages
 */


// Your code starts here.
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly.
}

// Load Composer autoloader
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
    require_once __DIR__ . '/vendor/autoload.php';
}

// Load global helper functions
require_once __DIR__ . '/php/src/Support/functions.php';

// Define plugin constants
if (!defined('ULTIMATE_SECURITY_PATH')) {
    define('ULTIMATE_SECURITY_PATH', plugin_dir_path(__FILE__));
}

if (!defined('ULTIMATE_SECURITY_URL')) {
    define('ULTIMATE_SECURITY_URL', plugin_dir_url(__FILE__));
}

if (!defined('ULTIMATE_SECURITY_NAME')) {
    define('ULTIMATE_SECURITY_NAME', 'Ultimate Security'); // Plugin name
}

if (!defined('ULTIMATE_SECURITY_VERSION')) {
    define('ULTIMATE_SECURITY_VERSION', '1.0.17'); // Plugin version
}

if (!defined('ULTIMATE_SECURITY_DB_VERSION')) {
    define('ULTIMATE_SECURITY_DB_VERSION', '1.0.12'); // Database version - Added vulnerability scan history table
}

// Config
if (!defined('ULTIMATE_SECURITY_SLUG')) {
    define('ULTIMATE_SECURITY_SLUG', 'ultimate-security'); // folder slug
}

if (!defined('ULTIMATE_SECURITY_FILE')) {
    define('ULTIMATE_SECURITY_FILE', 'ultimate-security/ultimate-security.php');
}

if (!defined('ULTIMATE_SECURITY_MAIN_FILE')) {
    define('ULTIMATE_SECURITY_MAIN_FILE', __FILE__);
}

// Register activation hook
register_activation_hook(__FILE__, function () {
    \WPUltimateSecurity\UltimateSecurity\Bootstrap\Lifecycle\Activator::activate();
});

// Register deactivation hook
register_deactivation_hook(__FILE__, function () {
    \WPUltimateSecurity\UltimateSecurity\Bootstrap\Lifecycle\Deactivator::deactivate();
});

// Initialize the plugin
new \WPUltimateSecurity\UltimateSecurity\Bootstrap\Initializer();
