]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Event hooks for before and after site_notice
authorSarven Capadisli <csarven@status.net>
Thu, 21 Jan 2010 15:49:49 +0000 (16:49 +0100)
committerSarven Capadisli <csarven@status.net>
Sat, 23 Jan 2010 23:14:19 +0000 (00:14 +0100)
EVENTS.txt
lib/action.php

index 6e6afa070f56442824ee31a091edb8efd7aff3c3..1ed670697b7570506662bbf617f0754b25329cde 100644 (file)
@@ -150,6 +150,12 @@ StartAddressData: Allows the site owner to provide additional information about
 EndAddressData: At the end of <address>
 - $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
 
index 171bea17c721b864b80da750dcef9bbdf07f21c6..22425e6821336f5db6fb3fd6681188ec2e19ce8d 100644 (file)
@@ -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 {