Generated an extra class on bookmark notice <li>s

This commit is contained in:
Evan Prodromou 2010-12-30 16:57:28 -08:00
parent 66f6b2a342
commit 5dfc9e1b18
1 changed files with 21 additions and 0 deletions

View File

@ -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)
*