Added the possibility for themes to override core module functions
This commit is contained in:
parent
acefb84681
commit
48e6ff21aa
2 changed files with 24 additions and 3 deletions
11
index.php
11
index.php
|
@ -233,7 +233,16 @@ if(strlen($a->module)) {
|
|||
}
|
||||
|
||||
/**
|
||||
* If not, next look for a 'standard' program module in the 'mod' directory
|
||||
* If not, next look for module overrides by the theme
|
||||
*/
|
||||
|
||||
if((! $a->module_loaded) && (file_exists("view/theme/" . current_theme() . "/mod/{$a->module}.php"))) {
|
||||
include_once("view/theme/" . current_theme() . "/mod/{$a->module}.php");
|
||||
// We will not set module_loaded to true to allow for partial overrides.
|
||||
}
|
||||
|
||||
/**
|
||||
* Finally, look for a 'standard' program module in the 'mod' directory
|
||||
*/
|
||||
|
||||
if((! $a->module_loaded) && (file_exists("mod/{$a->module}.php"))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue