aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorErik Frèrejean <erikfrerejean@phpbb.com>2012-04-02 11:53:12 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-08-01 10:18:45 +0200
commit6b1ca27a86ea8122d98d26ed4252754237d6cc1b (patch)
tree8f65c3a065f5e1a50155c196d8d1ab2166e8612f /phpBB/includes/functions.php
parenta247bfc2b6ee8f4aeb53f639294932fa16688666 (diff)
downloadforums-6b1ca27a86ea8122d98d26ed4252754237d6cc1b.tar
forums-6b1ca27a86ea8122d98d26ed4252754237d6cc1b.tar.gz
forums-6b1ca27a86ea8122d98d26ed4252754237d6cc1b.tar.bz2
forums-6b1ca27a86ea8122d98d26ed4252754237d6cc1b.tar.xz
forums-6b1ca27a86ea8122d98d26ed4252754237d6cc1b.zip
[feature/events] Add `core.page_header_override`
Add a ledge that will allow listeners to override the build in `page_header` function. http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=42741&p=237037 PHPBB3-9550
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index e5b721b1f5..4ad1ba5c82 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4753,6 +4753,16 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
define('HEADER_INC', true);
+ // A listener can set this variable to `true` when it overrides this function
+ $page_header_override = false;
+
+ $vars = array('page_title', 'display_online_list', 'item_id', 'item', 'page_header_override');
+ extract($phpbb_dispatcher->trigger_event('core.page_header_override', compact($vars)));
+ if ($page_header_override)
+ {
+ return;
+ }
+
// gzip_compression
if ($config['gzip_compress'])
{