From bb2d13a6e1b0e47ba062ab09e12e07a019decf73 Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Tue, 1 Oct 2019 14:59:28 +0100 Subject: [PATCH] Support new autoload method --- composer.json | 6 +++++- load.php | 8 -------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 0c06e0a..45ccb46 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,11 @@ }, "autoload": { "files": [ - "load.php" + "inc/namespace.php", + "inc/site_verification/namespace.php" ] + }, + "extra": { + "altis": {} } } diff --git a/load.php b/load.php index 4b3ecb6..fb10999 100644 --- a/load.php +++ b/load.php @@ -9,14 +9,6 @@ use function Altis\register_module; -require_once __DIR__ . '/inc/namespace.php'; -require_once __DIR__ . '/inc/site_verification/namespace.php'; - -// Do not initialise if plugin.php hasn't been included yet. -if ( ! function_exists( 'add_action' ) ) { - return; -} - add_action( 'altis.modules.init', function () { $default_settings = [ 'enabled' => true,