Commit 08b82913 authored by Dries's avatar Dries

- Added the theme_invoke() function from Moshe's sandbox.
parent 39373da7
......@@ -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);
}
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment