]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
new event for notice option items
authorEvan Prodromou <evan@status.net>
Thu, 8 Mar 2012 12:58:45 +0000 (06:58 -0600)
committerEvan Prodromou <evan@status.net>
Thu, 8 Mar 2012 12:59:25 +0000 (06:59 -0600)
EVENTS.txt
lib/noticelistitem.php

index 8358bed0b7dc75b505937eb7dc0afb344d02bb9f..5fb775c76562e94cc2dccaf9dc3891a447d726cc 100644 (file)
@@ -1425,3 +1425,8 @@ EndUpgrade: when ending a site upgrade; good place to do your own upgrades
 HaveIMPlugin: is there an IM plugin loaded?
 - &$haveIMPlugin: set me to true if you're loaded!
 
+StartShowNoticeOptionItems: Before showing first controls in a notice list item; inside the div
+- $nli: NoticeListItem being shown
+
+EndShowNoticeOptionItems: After showing last controls in a notice list item; inside the div
+- $nli: NoticeListItem being shown
index ef7fc0d1e6123c0ea149328ceb7a4e2f80a9a296..d045f0034299a46fd4a932b4c094c8e4273154bd 100644 (file)
@@ -144,10 +144,13 @@ class NoticeListItem extends Widget
             $user = common_current_user();
             if ($user) {
                 $this->out->elementStart('div', 'notice-options');
-                $this->showFaveForm();
-                $this->showReplyLink();
-                $this->showRepeatForm();
-                $this->showDeleteLink();
+                if (Event::handle('StartShowNoticeOptionItems', array($this))) {
+                    $this->showFaveForm();
+                    $this->showReplyLink();
+                    $this->showRepeatForm();
+                    $this->showDeleteLink();
+                    Event::handle('EndShowNoticeOptionItems', array($this));
+                }
                 $this->out->elementEnd('div');
             }
             Event::handle('EndShowNoticeOptions', array($this));