| 1 |
<?php |
| 2 |
declare(strict_types=1); |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; // Exit if accessed directly |
| 6 |
} |
| 7 |
/** |
| 8 |
* The BotBlocker Security bootstrap file |
| 9 |
* |
| 10 |
* This file is responsible for loading the necessary files and initializing the plugin functionality. |
| 11 |
* It defines various constants and includes the main class file, which is responsible for running the plugin. |
| 12 |
* The plugin is activated and deactivated using the activate_botblocker() and deactivate_botblocker() functions. |
| 13 |
* The BotBlockerBootstrap::runShield() method initializes the plugin and its admin functionality. |
| 14 |
* |
| 15 |
* @link https://globus.studio |
| 16 |
* @package botblocker-security |
| 17 |
* @version 1.7.5 |
| 18 |
* |
| 19 |
* @wordpress-plugin |
| 20 |
* Plugin Name: BotBlocker Security - Complete security platform |
| 21 |
* Plugin URI: https://botblocker.top/ |
| 22 |
* Description: Complete security platform for everyday: block bots, brute-force, viruses, spam, fake crawlers. WAF, 2FA, no-malware, proactive defense, 200+ tools |
| 23 |
* Version: 1.7.5 |
| 24 |
* Author: Yevhen Leonidov |
| 25 |
* Author URI: https://leonidov.dev/ |
| 26 |
* License: GPL-2.0+ |
| 27 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 28 |
* Requires at least: 5.1 |
| 29 |
* Tested up to: 7.1 |
| 30 |
* Requires PHP: 7.4 |
| 31 |
* Text Domain: botblocker-security |
| 32 |
* Domain Path: /languages |
| 33 |
*/ |
| 34 |
|
| 35 |
require_once __DIR__ . '/includes/class-botblocker-bootstrap.php'; |
| 36 |
if ( ! BotBlockerBootstrap::register() ) { |
| 37 |
return; |
| 38 |
} |
| 39 |
|
| 40 |
/** |
| 41 |
* Constants for the BotBlocker plugin. |
| 42 |
* These constants define various settings and values used throughout the plugin. |
| 43 |
*/ |
| 44 |
if ( ! defined( 'BOTBLOCKER' ) ) { |
| 45 |
define( 'BOTBLOCKER', true ); |
| 46 |
} |
| 47 |
define( 'BOTBLOCKER_DIR', plugin_dir_path( __FILE__ ) ); |
| 48 |
define( 'BOTBLOCKER_URL', plugin_dir_url( __FILE__ ) ); |
| 49 |
define( 'BOTBLOCKER_BASENAME', plugin_basename( __FILE__ ) ); |
| 50 |
|
| 51 |
// Include the helper functions file |
| 52 |
require_once BOTBLOCKER_DIR . 'helpers-shield.php'; |
| 53 |
// Include the core helpers file |
| 54 |
require_once BOTBLOCKER_DIR . 'core-helpers-shield.php'; |
| 55 |
|
| 56 |
if ( is_admin() || wp_doing_cron() || wp_doing_ajax() || ( defined( 'WP_CLI' ) && WP_CLI ) ) { |
| 57 |
require_once BOTBLOCKER_DIR . 'helpers-admin-deferred.php'; |
| 58 |
require_once BOTBLOCKER_DIR . 'core-helpers-admin.php'; |
| 59 |
require_once BOTBLOCKER_DIR . 'helpers-admin.php'; |
| 60 |
} |
| 61 |
|
| 62 |
// Include license functionality |
| 63 |
if ( class_exists( 'BotBlockerCloudBb' ) ) { |
| 64 |
BotBlockerCloudBb::register(); |
| 65 |
} |
| 66 |
|
| 67 |
/** |
| 68 |
* Activates the BotBlocker plugin. |
| 69 |
* |
| 70 |
* This function is called when the plugin is activated. |
| 71 |
* It includes the necessary files, performs database operations, and creates rule files. |
| 72 |
* |
| 73 |
* @return void |
| 74 |
*/ |
| 75 |
register_activation_hook( __FILE__, array( 'Botblocker_Activator', 'activate' ) ); |
| 76 |
|
| 77 |
/** |
| 78 |
* Deactivates the BotBlocker plugin. |
| 79 |
* |
| 80 |
* This function is called when the plugin is deactivated. |
| 81 |
* It includes the necessary files and performs cleanup operations. |
| 82 |
* |
| 83 |
* @return void |
| 84 |
*/ |
| 85 |
register_deactivation_hook( __FILE__, array( 'Botblocker_Deactivator', 'deactivate' ) ); |
| 86 |
|
| 87 |
/* End of file botblocker-security.php */ |
| 88 |
|