Skip to content

Commit 42c2f33

Browse files
committed
big improvements like removing need for the typerocket mu plugin
1 parent 6e31c95 commit 42c2f33

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Your Files
2+
/wordpress/tr_cache/rapid_cache/*
3+
/wordpress/wp-content/*
4+
!/wordpress/wp-content/mu-plugins/
5+
!/wordpress/wp-content/advanced-cache.php
26

37
# Vendor
48
node_modules
@@ -19,8 +23,6 @@ yarn-error.log
1923
/wordpress/.maintenance
2024
/wordpress/wp-admin
2125
/wordpress/wp-includes
22-
/wordpress/wp-content/*
23-
!/wordpress/wp-content/mu-plugins/
2426

2527
# Source Maps
2628
*.css.map

galaxy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ if(!defined('TYPEROCKET_GALAXY_PATH'))
1717

1818
require TYPEROCKET_GALAXY_PATH . '/init.php';
1919

20-
new \TypeRocket\Console\Launcher();
20+
new \TypeRocket\Console\GalaxyConsoleLauncher();

init.php

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

41-
// Boot application kernel
42-
( new ApplicationKernel )->boot();
41+
if( ! defined('TYPEROCKET_SKIP_BOOT') )
42+
define('TYPEROCKET_SKIP_BOOT', false );
4343

44-
// Load TypeRocket
45-
if (defined('WPINC')) {
46-
(new System)->boot();
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+
}
4766
}

0 commit comments

Comments
 (0)