mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 12:03:21 +01: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
@ -5069,6 +5069,17 @@ function page_footer($run_cron = true)
|
||||
{
|
||||
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;
|
||||
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
|
||||
if (defined('DEBUG'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user