From: Sarven Capadisli Date: Thu, 21 Jan 2010 15:49:49 +0000 (+0100) Subject: Event hooks for before and after site_notice X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=51fdba09d4bdc2b933e40c9ea5ea6de76c4aa799;p=quix0rs-gnu-social.git Event hooks for before and after site_notice --- diff --git a/EVENTS.txt b/EVENTS.txt index 6e6afa070f..1ed670697b 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -150,6 +150,12 @@ StartAddressData: Allows the site owner to provide additional information about EndAddressData: At the end of
- $action: the current action +StartShowSiteNotice: Before showing site notice +- $action: the current action + +EndShowSiteNotice: After showing site notice +- $action: the current action + StartLoginGroupNav: Before showing the login and register navigation menu - $action: the current action diff --git a/lib/action.php b/lib/action.php index 171bea17c7..22425e6821 100644 --- a/lib/action.php +++ b/lib/action.php @@ -373,7 +373,11 @@ class Action extends HTMLOutputter // lawsuit $this->elementStart('div', array('id' => 'header')); $this->showLogo(); $this->showPrimaryNav(); - $this->showSiteNotice(); + if (Event::handle('StartShowSiteNotice', array($this))) { + $this->showSiteNotice(); + + Event::handle('EndShowSiteNotice', array($this)); + } if (common_logged_in()) { $this->showNoticeForm(); } else {