From 3d4672ba88e2ef8cb47a9769e94fb3a45bdb3882 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 28 Nov 2009 23:48:38 -0800 Subject: [PATCH] Give the theme a chance to handle theme function callbacks as well. --- modules/gallery/libraries/Theme_View.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 817a46ad5d..f78a7018db 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -265,6 +265,13 @@ public function __call($function, $args) { } } + $helper_class = theme::$site_theme_name . "_theme"; + if (method_exists($helper_class, $function)) { + $blocks[] = call_user_func_array( + array($helper_class, $function), + array_merge(array($this), $args)); + } + if ($function == "head") { array_unshift($blocks, $this->combine_files($this->css, "css")); array_unshift($blocks, $this->combine_files($this->scripts, "javascript"));