Skip to content
This repository was archived by the owner on Nov 25, 2022. It is now read-only.

Commit 520ac65

Browse files
committed
Used the registered "post_controller_construtor" instead of calling the method on KB_Controller.
1 parent 0dd836a commit 520ac65

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/skeleton/core/KB_Router.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ public function __construct()
129129
log_message('info', 'KB_Router Class Initialized');
130130

131131
parent::__construct();
132+
133+
// Register the action after controller constructor.
134+
add_action('post_controller_constructor', array($this, '_load_modules'));
132135
}
133136

134137
// ------------------------------------------------------------------------
@@ -583,7 +586,7 @@ public function list_modules($details = false)
583586
// ------------------------------------------------------------------------
584587

585588
/**
586-
* load_modules
589+
* _load_modules
587590
*
588591
* Because modules are loaded ONLY when they are requested via HTTP and
589592
* there tons of ways to make them load. We created the "init.php" file
@@ -600,7 +603,7 @@ public function list_modules($details = false)
600603
* @param none
601604
* @return void
602605
*/
603-
public function load_modules()
606+
public function _load_modules()
604607
{
605608
foreach ($this->modules_paths() as $i => $module)
606609
{

0 commit comments

Comments
 (0)