diff --git a/system/twig.php b/system/twig.php index 87d2ad6f..4f3639d8 100644 --- a/system/twig.php +++ b/system/twig.php @@ -90,14 +90,14 @@ $function = new TwigFunction('truncate', function ($s, $n) { }); $twig->addFunction($function); -$function = new TwigFunction('hook', function ($hook) { +$function = new TwigFunction('hook', function ($hook, array $params = []) { global $hooks; if(is_string($hook)) { $hook = constant($hook); } - $hooks->trigger($hook); + $hooks->trigger($hook, $params); }); $twig->addFunction($function);