ARGUS WordPress Defence 1.0.0 — first production release
Automatic WordPress security: local firewall, malware and file-integrity scanning, vulnerability protection, quarantine, scheduled backups, an optional page cache, and automatic global threat intelligence. See README.md for installation, update, and uninstall instructions.
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class Argus_Activator {
|
||||
|
||||
public static function activate() {
|
||||
require_once ARGUS_WPD_DIR . 'includes/class-argus-db.php';
|
||||
Argus_DB::install();
|
||||
|
||||
require_once ARGUS_WPD_DIR . 'includes/class-argus-mu-installer.php';
|
||||
Argus_MU_Installer::install();
|
||||
|
||||
require_once ARGUS_WPD_DIR . 'includes/class-argus-malware-scanner.php';
|
||||
Argus_Malware_Scanner::ensure_uploads_lockdown();
|
||||
|
||||
self::schedule_cron();
|
||||
|
||||
require_once ARGUS_WPD_DIR . 'includes/class-argus-anis-client.php';
|
||||
require_once ARGUS_WPD_DIR . 'includes/class-argus-ban-engine.php';
|
||||
require_once ARGUS_WPD_DIR . 'includes/class-argus-events.php';
|
||||
if ( Argus_ANIS_Client::is_enabled() ) {
|
||||
$result = Argus_ANIS_Client::register();
|
||||
if ( $result['success'] ) {
|
||||
Argus_ANIS_Client::scheduled_sync();
|
||||
}
|
||||
}
|
||||
|
||||
require_once ARGUS_WPD_DIR . 'includes/class-argus-vuln-intel.php';
|
||||
require_once ARGUS_WPD_DIR . 'includes/class-argus-findings.php';
|
||||
require_once ARGUS_WPD_DIR . 'includes/class-argus-explain.php';
|
||||
if ( Argus_Settings::get( 'vuln_intel_enabled', true ) ) {
|
||||
Argus_Vuln_Intel::scheduled_check();
|
||||
}
|
||||
|
||||
update_option( 'argus_wpd_activated_at', current_time( 'mysql', true ), false );
|
||||
}
|
||||
|
||||
protected static function schedule_cron() {
|
||||
|
||||
add_filter( 'cron_schedules', array( 'Argus_Plugin', 'register_cron_schedules' ) ); // phpcs:ignore WordPress.WP.CronInterval
|
||||
|
||||
if ( ! wp_next_scheduled( 'argus_wpd_hourly' ) ) {
|
||||
wp_schedule_event( time(), 'hourly', 'argus_wpd_hourly' );
|
||||
}
|
||||
if ( ! wp_next_scheduled( 'argus_wpd_daily' ) ) {
|
||||
wp_schedule_event( time(), 'daily', 'argus_wpd_daily' );
|
||||
}
|
||||
if ( ! wp_next_scheduled( 'argus_wpd_five_minutes' ) ) {
|
||||
wp_schedule_event( time(), 'argus_wpd_five_minutes', 'argus_wpd_five_minutes' );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user