Skip to content

Commit 72eef20

Browse files
committed
make typerocket more configurable
1 parent 1a57ba1 commit 72eef20

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

init.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| TypeRocket by Robojuice
55
|--------------------------------------------------------------------------
66
|
7-
| TypeRocket is designed to work with WordPress 4.5+ and PHP 5.5+. You
7+
| TypeRocket is designed to work with WordPress 5.2+ and PHP 7+. You
88
| must initialize it exactly once. We suggest including TypeRocket
99
| from your theme and let plugins access TypeRocket from there.
1010
|
@@ -14,19 +14,28 @@
1414
|
1515
*/
1616

17-
define('TR_APP_NAMESPACE', 'App');
1817
define('TR_PATH', __DIR__ );
1918

20-
if(!defined('TR_SKIP_AUTOLOAD')) {
19+
// Define App Namespace
20+
if(!defined('TR_APP_NAMESPACE')) {
21+
define('TR_APP_NAMESPACE', 'App');
22+
}
23+
24+
// Auto Loader Init
25+
if(!defined('TR_AUTO_LOADER')) {
2126
require __DIR__ . '/vendor/autoload.php';
27+
} else {
28+
call_user_func(TR_AUTO_LOADER);
2229
}
2330

31+
// Define Config
2432
if(!defined('TR_LAUNCHER_CONFIG')) {
2533
define('TR_LAUNCHER_CONFIG', __DIR__ . '/config' );
2634
}
2735

2836
new \TypeRocket\Core\Config( TR_LAUNCHER_CONFIG );
2937

38+
// Load TypeRocket
3039
if( defined('WPINC') ) {
3140
( new \TypeRocket\Core\Launcher() )->initCore();
3241
}

0 commit comments

Comments
 (0)