Skip to content

Commit 9358d6b

Browse files
committed
improve Galaxy CLI and Application Kernel
1 parent 7aad6f8 commit 9358d6b

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

init.php

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,9 @@
3838
if( !defined('TYPEROCKET_CORE_CONFIG_PATH') )
3939
define('TYPEROCKET_CORE_CONFIG_PATH', __DIR__ . '/config' );
4040

41-
if( ! defined('TYPEROCKET_SKIP_BOOT') )
42-
define('TYPEROCKET_SKIP_BOOT', false );
41+
if( ! defined('TYPEROCKET_SKIP_INIT') )
42+
define('TYPEROCKET_SKIP_INIT', false );
4343

44-
if( ! TYPEROCKET_SKIP_BOOT ) {
45-
// Boot application kernel
46-
( new ApplicationKernel )->boot();
47-
48-
// TypeRocket
49-
if (defined('WPINC')) {
50-
(new System)->boot();
51-
}
52-
else {
53-
if(!defined('TYPEROCKET_ROOT_INSTALL'))
54-
define('TYPEROCKET_ROOT_INSTALL', true);
55-
56-
// Manually WordPress Load Hook
57-
$GLOBALS['wp_filter']['muplugins_loaded'][0]['callbacks'] = ['function' => function() {
58-
if( file_exists(TYPEROCKET_ALT_PATH . '/rooter.php') ) {
59-
include(TYPEROCKET_ALT_PATH . '/rooter.php');
60-
}
61-
62-
(new System)->boot();
63-
(new Rooter)->boot();
64-
}, 'accepted_args' => 0];
65-
}
44+
if( ! TYPEROCKET_SKIP_INIT ) {
45+
ApplicationKernel::init();
6646
}

0 commit comments

Comments
 (0)