- Added the theme_invoke() function from Moshe's sandbox.

4.1.x
Dries Buytaert 2002-06-23 13:31:30 +00:00
parent 39373da716
commit 08b82913d4
1 changed files with 14 additions and 0 deletions

View File

@ -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);
}
}
?>