Add 'template_vars' hook
This commit is contained in:
parent
a687999d42
commit
545a7a80e4
|
@ -271,6 +271,12 @@ $b is an array, params to mail()
|
|||
is called after the navigational menu is build in include/nav.php.
|
||||
$b is an array containing $nav from nav.php.
|
||||
|
||||
###'template_vars'
|
||||
is called before vars are passed to the template engine to render the page.
|
||||
The registered function can add,change or remove variables passed to template.
|
||||
$b is the array of vars pased to 'replace_macros()' function.
|
||||
|
||||
|
||||
Complete list of hook callbacks
|
||||
---
|
||||
|
||||
|
|
|
@ -19,6 +19,10 @@ function replace_macros($s,$r) {
|
|||
|
||||
$stamp1 = microtime(true);
|
||||
|
||||
// "middleware": inject variables into templates
|
||||
call_hooks("template_vars", $r);
|
||||
|
||||
|
||||
$a = get_app();
|
||||
|
||||
$t = $a->template_engine();
|
||||
|
|
Loading…
Reference in New Issue
Block a user