diff options
Diffstat (limited to 'modules/gallery/helpers/module.php')
-rw-r--r-- | modules/gallery/helpers/module.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php index d89b8401..9fe2ec5e 100644 --- a/modules/gallery/helpers/module.php +++ b/modules/gallery/helpers/module.php @@ -338,6 +338,21 @@ class module_Core { call_user_func_array(array($class, $function), $args); } } + + // Give the admin theme a chance to respond, if we're in admin mode. + if (theme::$is_admin) { + $class = theme::$admin_theme_name . "_event"; + if (method_exists($class, $function)) { + call_user_func_array(array($class, $function), $args); + } + } + + // Give the site theme a chance to respond as well. It gets a chance even in admin mode, as + // long as the theme has an admin subdir. + $class = theme::$site_theme_name . "_event"; + if (method_exists($class, $function)) { + call_user_func_array(array($class, $function), $args); + } } /** |