- if (function_exists(str_replace('-', '_', $this->getCurrentTheme()) . '_init')) {
- $func = str_replace('-', '_', $this->getCurrentTheme()) . '_init';
- $func($this);
- }
+ // Load current theme info after module has been initialized as theme could have been set in module
+ $theme_info_file = 'view/theme/' . $this->getCurrentTheme() . '/theme.php';
+ if (file_exists($theme_info_file)) {
+ require_once $theme_info_file;
+ }
+
+ if (function_exists(str_replace('-', '_', $this->getCurrentTheme()) . '_init')) {
+ $func = str_replace('-', '_', $this->getCurrentTheme()) . '_init';
+ $func($this);
+ }