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

Commit

Permalink
Used the registered "post_controller_construtor" instead of calling t…
Browse files Browse the repository at this point in the history
…he method on KB_Controller.
  • Loading branch information
bkader committed Apr 28, 2018
1 parent 0dd836a commit 520ac65
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/skeleton/core/KB_Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ public function __construct()
log_message('info', 'KB_Router Class Initialized');

parent::__construct();

// Register the action after controller constructor.
add_action('post_controller_constructor', array($this, '_load_modules'));
}

// ------------------------------------------------------------------------
Expand Down Expand Up @@ -583,7 +586,7 @@ public function list_modules($details = false)
// ------------------------------------------------------------------------

/**
* load_modules
* _load_modules
*
* Because modules are loaded ONLY when they are requested via HTTP and
* there tons of ways to make them load. We created the "init.php" file
Expand All @@ -600,7 +603,7 @@ public function list_modules($details = false)
* @param none
* @return void
*/
public function load_modules()
public function _load_modules()
{
foreach ($this->modules_paths() as $i => $module)
{
Expand Down

0 comments on commit 520ac65

Please sign in to comment.