From 452fa01456d5f48fbbf995ab43718f4655268057 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 7 May 2024 13:11:47 -0400 Subject: [PATCH] remove module loader registration --- includes/StagingFeature.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/includes/StagingFeature.php b/includes/StagingFeature.php index 17073e9..2b4dbab 100644 --- a/includes/StagingFeature.php +++ b/includes/StagingFeature.php @@ -4,7 +4,7 @@ use NewfoldLabs\WP\ModuleLoader\Container; use NewfoldLabs\WP\Module\Staging\Staging; -use function NewfoldLabs\WP\ModuleLoader\register; +use function NewfoldLabs\WP\ModuleLoader\container as getContainer; /** * Child class for a feature @@ -28,26 +28,13 @@ class StagingFeature extends \NewfoldLabs\WP\Module\Features\Feature { public function initialize() { if ( function_exists( 'add_action' ) ) { + // Register module add_action( 'plugins_loaded', function () { - - register( - array( - 'name' => 'staging', - 'label' => __( 'Staging', 'newfold-staging-module' ), - 'callback' => function ( Container $container ) { - return new Staging( $container ); - }, - 'isActive' => true, - 'isHidden' => true, - ) - ); - + new Staging( getContainer() ); } ); - } } - } \ No newline at end of file