diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-06-23 13:31:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-06-23 13:31:30 +0000 |
commit | 08b82913d44a79720211cf252100cf316400e7cd (patch) | |
tree | fa99acbf27e1ac74bb631b0b8f279413feb0f2a2 | |
parent | 39373da716172f9e8a6e711125f5f2d156625129 (diff) | |
download | brdo-08b82913d44a79720211cf252100cf316400e7cd.tar.gz brdo-08b82913d44a79720211cf252100cf316400e7cd.tar.bz2 |
- Added the theme_invoke() function from Moshe's sandbox.
-rw-r--r-- | includes/theme.inc | 14 |
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); + } +} + ?> |