]> 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 19:49:26 +0000 (12:49 -0700)
EVENTS.txt
lib/noticelist.php

index 7b6ad40eb997100e96d74d3b181e2341785d6eef..e0dc7514d6006725c8938cfdb7db43939ab3166d 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');
     }