summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/theme.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index dccb8cd22..5395cb22f 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -140,4 +140,18 @@ function theme_blocks($region, &$theme) {
}
}
+function theme_invoke() {
+ global $theme;
+ $args = func_get_args();
+
+ $function = array_shift($args);
+
+ if (method_exists($theme, $function)) {
+ return call_user_method_array($function, $theme, $args);
+ }
+ else {
+ return call_user_func_array($function, $args);
+ }
+}
+
?>