mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[feature/events] Add core.page_footer_override
Add a ledge that will allow listeners to override the build in `page_footer` function. http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=42741&p=237037 PHPBB3-9550
This commit is contained in:
parent
6b1ca27a86
commit
1a1ae60d8d
1 changed files with 11 additions and 0 deletions
|
@ -5069,6 +5069,17 @@ function page_footer($run_cron = true)
|
||||||
{
|
{
|
||||||
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
|
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
|
||||||
global $request;
|
global $request;
|
||||||
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
|
// A listener can set this variable to `true` when it overrides this function
|
||||||
|
$page_footer_override = false;
|
||||||
|
|
||||||
|
$vars = array('run_cron', 'page_footer_override');
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.page_footer_override', compact($vars)));
|
||||||
|
if ($page_footer_override)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Output page creation time
|
// Output page creation time
|
||||||
if (defined('DEBUG'))
|
if (defined('DEBUG'))
|
||||||
|
|
Loading…
Add table
Reference in a new issue