Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert this module into a runtime package #12

Merged
merged 10 commits into from
Oct 9, 2023
Merged
27 changes: 8 additions & 19 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,13 @@

use function NewfoldLabs\WP\ModuleLoader\register;

if ( function_exists( 'add_action' ) ) {

if ( function_exists( 'add_action' ) ) {
add_action(
'plugins_loaded',
function () {
register(
array(
'name' => 'runtime',
'label' => __( 'Runtime', 'wp-module-runtime' ),
'callback' => function ( Container $container ) {
$runtime = new Runtime( $container );
$runtime->loadIntoPage( 'admin_enqueue_scripts' );
},
'isActive' => true,
'isHidden' => true,
)
);
}
);

'newfold_container_set',
function ( $container ) {
$runtime = new Runtime( $container );
$runtime->loadIntoPage( 'admin_enqueue_scripts' );
}
);
}

Loading