From 08b82913d44a79720211cf252100cf316400e7cd Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 23 Jun 2002 13:31:30 +0000 Subject: - Added the theme_invoke() function from Moshe's sandbox. --- includes/theme.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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); + } +} + ?> -- cgit v1.2.3