Moving the code that loads the config so gets loaded earlier.

This commit is contained in:
Andrew Meyer 2013-09-04 10:29:04 -05:00
parent 45cd4ca5b7
commit 580419ef4f

View file

@ -23,6 +23,10 @@ class Pico {
$this->load_plugins();
$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
$url = '';
$request_url = (isset($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : '';
@ -51,10 +55,6 @@ class Pico {
$this->run_hooks('after_404_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);
$this->run_hooks('file_meta', array(&$meta));