-
Notifications
You must be signed in to change notification settings - Fork 6
/
crowdsec.php
34 lines (30 loc) · 1.19 KB
/
crowdsec.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
* Plugin Name: CrowdSec
* Plugin URI: https://github.com/crowdsecurity/cs-wordpress-bouncer
* Description: Safer Together. Protect your WordPress application with CrowdSec.
* Tags: security, captcha, ip-blocker, crowdsec, hacker-protection, appsec
* Version: 2.8.1
* Author: CrowdSec
* Author URI: https://www.crowdsec.net/
* Github: https://github.com/crowdsecurity/cs-wordpress-bouncer
* License: MIT
* License URI: https://opensource.org/licenses/MIT
* Requires PHP: 7.2
* Requires at least: 4.9
* Tested up to: 6.7
* Stable tag: 2.8.1
* Text Domain: crowdsec-wp
* First release: 2021.
*/
require_once __DIR__.'/vendor/autoload.php';
define('CROWDSEC_PLUGIN_PATH', __DIR__);
define('CROWDSEC_PLUGIN_URL', plugin_dir_url(__FILE__));
require_once __DIR__.'/inc/plugin-setup.php';
require_once __DIR__.'/inc/scheduling.php';
register_activation_hook(__FILE__, 'activate_crowdsec_plugin');
register_deactivation_hook(__FILE__, 'deactivate_crowdsec_plugin');
require_once __DIR__ . '/inc/Admin/init.php';
require_once __DIR__.'/inc/bounce-current-ip.php';
add_action('plugins_loaded', 'safelyBounceCurrentIp');
add_action( 'upgrader_process_complete', 'crowdsec_update_completed', 10, 2 );