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,31 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user