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.
32 lines
608 B
PHP
32 lines
608 B
PHP
<?php
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
class Argus_Autoloader {
|
|
|
|
public static function register() {
|
|
spl_autoload_register( array( __CLASS__, 'autoload' ) );
|
|
}
|
|
|
|
public static function autoload( $class ) {
|
|
if ( 0 !== strpos( $class, 'Argus_' ) ) {
|
|
return;
|
|
}
|
|
|
|
$file_slug = strtolower( str_replace( '_', '-', $class ) );
|
|
$candidates = array(
|
|
ARGUS_WPD_DIR . 'includes/class-' . $file_slug . '.php',
|
|
ARGUS_WPD_DIR . 'admin/class-' . $file_slug . '.php',
|
|
);
|
|
|
|
foreach ( $candidates as $path ) {
|
|
if ( file_exists( $path ) ) {
|
|
require_once $path;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|