Skip to content

Commit

Permalink
remove module loader registration
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed May 7, 2024
1 parent acf3f7b commit 452fa01
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions includes/StagingFeature.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() );
}
);

}
}

}

0 comments on commit 452fa01

Please sign in to comment.