Browse files

Give the theme a chance to handle theme function callbacks as well.

  • Loading branch information...
1 parent f3981bb commit 3d4672ba88e2ef8cb47a9769e94fb3a45bdb3882 @bharat bharat committed Nov 28, 2009
Showing with 7 additions and 0 deletions.
  1. +7 −0 modules/gallery/libraries/Theme_View.php
View
7 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"));

0 comments on commit 3d4672b

Please sign in to comment.