From: Mikael Nordfeldth Date: Tue, 10 Mar 2015 12:07:36 +0000 (+0100) Subject: Let the creator decide which HTML tag to use for NoticeListItem X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e338931ffa7cdcc3749873398d478bf599f4db6c;p=quix0rs-gnu-social.git Let the creator decide which HTML tag to use for NoticeListItem --- diff --git a/lib/noticelistitem.php b/lib/noticelistitem.php index 282ace3724..9c2f2ed406 100644 --- a/lib/noticelistitem.php +++ b/lib/noticelistitem.php @@ -63,6 +63,7 @@ class NoticeListItem extends Widget protected $id_prefix = null; protected $options = true; protected $maxchars = 0; // if <= 0 it means use full posts + protected $item_tag = 'li'; /** * constructor @@ -101,7 +102,7 @@ class NoticeListItem extends Widget } } // string preferences - foreach(array('id_prefix') as $key) { + foreach(array('id_prefix', 'item_tag') as $key) { if (array_key_exists($key, $prefs)) { $this->$key = $prefs[$key]; } @@ -219,7 +220,7 @@ class NoticeListItem extends Widget $class .= ' notice-source-'.$this->notice->source; } $id_prefix = (strlen($this->id_prefix) ? $this->id_prefix . '-' : ''); - $this->out->elementStart('li', array('class' => $class, + $this->out->elementStart($this->item_tag, array('class' => $class, 'id' => "${id_prefix}notice-${id}")); Event::handle('EndOpenNoticeListItemElement', array($this)); }