From 5dfc9e1b185d841cbc4b3b85e984bf63dfa6508d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 30 Dec 2010 16:57:28 -0800 Subject: [PATCH] Generated an extra class on bookmark notice
  • s --- plugins/Bookmark/BookmarkPlugin.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/plugins/Bookmark/BookmarkPlugin.php b/plugins/Bookmark/BookmarkPlugin.php index faddf5aafa..8eef609751 100644 --- a/plugins/Bookmark/BookmarkPlugin.php +++ b/plugins/Bookmark/BookmarkPlugin.php @@ -648,6 +648,27 @@ class BookmarkPlugin extends Plugin return true; } + /** + * Output our CSS class for bookmark notice list elements + * + * @param NoticeListItem $nli The item being shown + * + * @return boolean hook value + */ + + function onStartOpenNoticeListItemElement($nli) + { + $nb = Bookmark::getByNotice($nli->notice); + if (!empty($nb)) { + $id = (empty($nli->repeat)) ? $nli->notice->id : $nli->repeat->id; + $nli->out->elementStart('li', array('class' => 'hentry notice bookmark', + 'id' => 'notice-' . $id)); + Event::handle('EndOpenNoticeListItemElement', array($nli)); + return false; + } + return true; + } + /** * Save a remote bookmark (from Salmon or PuSH) * -- 2.39.5