]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add Start/EndShowNoticeInfo events
authorZach Copley <zach@status.net>
Wed, 29 Sep 2010 19:49:26 +0000 (12:49 -0700)
committerZach Copley <zach@status.net>
Wed, 29 Sep 2010 23:35:13 +0000 (16:35 -0700)
EVENTS.txt
lib/noticelist.php

index d722bc4ac7803b25ccfa86303c131b65895ba207..7f6890ff0cd1b96aca73b83e0b6edb6e1e8fe693 100644 (file)
@@ -263,6 +263,12 @@ StartShowNoticeItem: just before showing the notice item
 EndShowNoticeItem: just after showing the notice item
 - $item: the NoticeListItem object being shown
 
+StartShowNoticeInfo: just before showing notice info
+- $item: The NoticeListItem object being shown
+
+EndShowNoticeInfo: just after showing notice info
+- $item: The NoticeListItem object being shown
+
 StartShowNoticeOptions: just before showing notice options like fave, repeat, etc.
 - $item: the NoticeListItem object being shown
 
index cc460005ad240fd85ce841800a454fcb8759b61c..df1533980a6ea32194bade727dc69fe74210c156 100644 (file)
@@ -226,11 +226,15 @@ class NoticeListItem extends Widget
     function showNoticeInfo()
     {
         $this->out->elementStart('div', 'entry-content');
-        $this->showNoticeLink();
-        $this->showNoticeSource();
-        $this->showNoticeLocation();
-        $this->showContext();
-        $this->showRepeat();
+        if (Event::handle('StartShowNoticeInfo', array($this))) {
+            $this->showNoticeLink();
+            $this->showNoticeSource();
+            $this->showNoticeLocation();
+            $this->showContext();
+            $this->showRepeat();
+            Event::handle('EndShowNoticeInfo', array($this));
+        }
+
         $this->out->elementEnd('div');
     }