| 1 |
<?php |
| 2 |
/** |
| 3 |
* Module Name: Firewall |
| 4 |
* Module Description: Protect your site with Jetpack's Web Application Firewall |
| 5 |
* Sort Order: 5 |
| 6 |
* First Introduced: 10.9 |
| 7 |
* Requires Connection: Yes |
| 8 |
* Auto Activate: No |
| 9 |
* Module Tags: Firewall, WAF |
| 10 |
* Feature: Security |
| 11 |
* |
| 12 |
* @package automattic/jetpack |
| 13 |
*/ |
| 14 |
|
| 15 |
// Do not run in the WPCOM context |
| 16 |
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
| 17 |
return; |
| 18 |
} |
| 19 |
|
| 20 |
// Check if killswitch is defined as true |
| 21 |
if ( defined( 'DISABLE_JETPACK_WAF' ) && DISABLE_JETPACK_WAF ) { |
| 22 |
return; |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* Triggers when the Jetpack plugin is updated |
| 27 |
*/ |
| 28 |
add_action( 'upgrader_process_complete', array( 'Automattic\Jetpack\Waf\Waf_Runner', 'update_waf' ) ); |
| 29 |
|
| 30 |
Automattic\Jetpack\Waf\Waf_Runner::initialize(); |
| 31 |
|