New configurable: hooks_debug

To view where hooks are located in .twig files
This commit is contained in:
slawkens
2025-10-11 18:34:15 +02:00
parent 2eae44e075
commit 8c3cb0e06f

View File

@@ -101,7 +101,9 @@ $twig->addFunction($function);
$function = new TwigFunction('hook', function ($context, $hook, array $params = []) { $function = new TwigFunction('hook', function ($context, $hook, array $params = []) {
global $hooks; global $hooks;
//note($hook); if (config('hooks_debug')) {
note($hook);
}
if(is_string($hook)) { if(is_string($hook)) {
if (defined($hook)) { if (defined($hook)) {