[BUGFIX] load config and call hook before the other hooks
this bugfix is very important, because other hooks like "after_load_content" can not use the config.
This commit is contained in:
parent
6acc979655
commit
3d91c03979
@ -23,6 +23,10 @@ class Pico {
|
|||||||
$this->load_plugins();
|
$this->load_plugins();
|
||||||
$this->run_hooks('plugins_loaded');
|
$this->run_hooks('plugins_loaded');
|
||||||
|
|
||||||
|
// Load the settings
|
||||||
|
$settings = $this->get_config();
|
||||||
|
$this->run_hooks('config_loaded', array(&$settings));
|
||||||
|
|
||||||
// Get request url and script url
|
// Get request url and script url
|
||||||
$url = '';
|
$url = '';
|
||||||
$request_url = (isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : '';
|
$request_url = (isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : '';
|
||||||
@ -52,10 +56,6 @@ class Pico {
|
|||||||
}
|
}
|
||||||
$this->run_hooks('after_load_content', array(&$file, &$content));
|
$this->run_hooks('after_load_content', array(&$file, &$content));
|
||||||
|
|
||||||
// Load the settings
|
|
||||||
$settings = $this->get_config();
|
|
||||||
$this->run_hooks('config_loaded', array(&$settings));
|
|
||||||
|
|
||||||
$meta = $this->read_file_meta($content);
|
$meta = $this->read_file_meta($content);
|
||||||
$this->run_hooks('file_meta', array(&$meta));
|
$this->run_hooks('file_meta', array(&$meta));
|
||||||
$content = $this->parse_content($content);
|
$content = $this->parse_content($content);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user