mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge branch 'ticket/igorw/9924' into develop-olympus
* ticket/igorw/9924: [ticket/9924] Pass template instance into $template->display hook
This commit is contained in:
commit
5e258a0a90
2 changed files with 3 additions and 1 deletions
|
@ -380,6 +380,8 @@ a:active { color: #368AD2; }
|
|||
<code>$template->display($handle, $include_once = true);</code> which is called directly before outputting the (not-yet-compiled) template.<br />
|
||||
<code>exit_handler();</code> which is called at the very end of phpBB3's execution.</p>
|
||||
|
||||
<p>Please note: The <code>$template->display</code> hook takes a third <code>$template</code> argument, which is the template instance being used, which should be used instead of the global.</p>
|
||||
|
||||
<p>There are also valid external constants you may want to use if you embed phpBB3 into your application:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
|
|
|
@ -205,7 +205,7 @@ class template
|
|||
{
|
||||
global $user, $phpbb_hook;
|
||||
|
||||
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once))
|
||||
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once, $this))
|
||||
{
|
||||
if ($phpbb_hook->hook_return(array(__CLASS__, __FUNCTION__)))
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue