Skip to content

Commit

Permalink
Give the theme a chance to handle theme function callbacks as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Nov 29, 2009
1 parent f3981bb commit 3d4672b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/gallery/libraries/Theme_View.php
Expand Up @@ -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") { if ($function == "head") {
array_unshift($blocks, $this->combine_files($this->css, "css")); array_unshift($blocks, $this->combine_files($this->css, "css"));
array_unshift($blocks, $this->combine_files($this->scripts, "javascript")); array_unshift($blocks, $this->combine_files($this->scripts, "javascript"));
Expand Down

0 comments on commit 3d4672b

Please sign in to comment.