From 331502a9790806ca48e61eb94d9489ddf7baeb55 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 29 Sep 2010 12:49:26 -0700 Subject: [PATCH] Add Start/EndShowNoticeInfo events --- EVENTS.txt | 6 ++++++ lib/noticelist.php | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/EVENTS.txt b/EVENTS.txt index d722bc4ac7..7f6890ff0c 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -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 diff --git a/lib/noticelist.php b/lib/noticelist.php index cc460005ad..df1533980a 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -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'); }