Files
root df0f2fccb8 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.
2026-08-09 13:40:16 +00:00

78 lines
3.1 KiB
PHP

<?php
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}
require_once __DIR__ . '/includes/class-argus-db.php';
require_once __DIR__ . '/includes/class-argus-mu-installer.php';
define( 'ARGUS_WPD_DIR', plugin_dir_path( __FILE__ ) );
Argus_MU_Installer::uninstall();
Argus_DB::uninstall();
function argus_wpd_rrmdir( $dir ) {
if ( ! is_dir( $dir ) ) {
return;
}
$items = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $dir, FilesystemIterator::SKIP_DOTS ), RecursiveIteratorIterator::CHILD_FIRST );
foreach ( $items as $item ) {
$item->isDir() ? rmdir( $item->getPathname() ) : unlink( $item->getPathname() );
}
rmdir( $dir );
}
$argus_uploads = wp_get_upload_dir();
$argus_data_dir = trailingslashit( $argus_uploads['basedir'] ) . 'argus-wpd-data';
argus_wpd_rrmdir( $argus_data_dir );
delete_option( 'argus_wpd_settings' );
delete_option( 'argus_wpd_activated_at' );
delete_option( 'argus_wpd_mu_install_status' );
delete_option( 'argus_wpd_geoip_cursor' );
delete_option( 'argus_wpd_geoip_build_path' );
delete_option( 'argus_wpd_geoip_last_refresh' );
delete_option( 'argus_wpd_geoip_range_count' );
delete_option( 'argus_wpd_geoip_last_error' );
delete_option( 'argus_wpd_active_template' );
delete_option( 'argus_wpd_integrity_watermark' );
delete_option( 'argus_wpd_trusted_update_windows' );
delete_option( 'argus_wpd_integrity_last_full_scan' );
delete_option( 'argus_wpd_integrity_last_full_scan_files' );
delete_option( 'argus_wpd_correlation_watermark' );
delete_option( 'argus_wpd_malware_restored_trust' );
delete_option( 'argus_wpd_mu_self_heal_last_logged' );
delete_option( 'argus_wpd_cache_discovery_last_run' );
delete_option( 'argus_wpd_cache_discovery_last_error' );
delete_option( 'argus_wpd_cache_warmer_backoff' );
delete_option( 'argus_wpd_geoip_corrupt_detected' );
delete_option( 'argus_wpd_mu_core_heartbeat' );
delete_option( 'argus_wpd_anis_status' );
delete_option( 'argus_wpd_anis_tier' );
delete_option( 'argus_wpd_anis_last_error' );
delete_option( 'argus_wpd_anis_last_register' );
delete_option( 'argus_wpd_anis_last_sync' );
delete_option( 'argus_wpd_anis_sync_watermark' );
delete_option( 'argus_wpd_anis_features' );
delete_option( 'argus_wpd_anis_circuit' );
delete_option( 'argus_wpd_anis_install_secret' );
delete_option( 'argus_wpd_anis_retry_stage' );
delete_option( 'argus_wpd_anis_next_retry_at' );
delete_option( 'argus_wpd_anis_last_success' );
delete_option( 'argus_wpd_vuln_last_success' );
delete_option( 'argus_wpd_vuln_retry_stage' );
delete_option( 'argus_wpd_vuln_next_retry_at' );
delete_option( 'argus_wpd_backup_lockdown_status' );
delete_option( 'argus_wpd_backup_last_success' );
delete_option( 'argus_wpd_ajax_inventory' );
delete_option( 'argus_wpd_rest_inventory' );
delete_option( 'argus_wpd_malware_watermark' );
delete_option( 'argus_wpd_uploads_lockdown_status' );
delete_option( 'argus_wpd_quarantine_lockdown_status' );
delete_option( 'argus_wpd_update_last_check' );
delete_option( 'argus_wpd_update_manifest_etag' );
delete_option( 'argus_wpd_update_pending_manifest' );
delete_option( 'argus_wpd_update_last_success' );
delete_option( 'argus_wpd_update_last_failure' );