Add support for nested ul and ol lists.
This commit is contained in:
parent
6b50e8b04d
commit
e0a8d173bd
|
@ -195,13 +195,13 @@ public static function ul($list, $attributes = array())
|
|||
* @param array $attributes
|
||||
* @return string
|
||||
*/
|
||||
private static function list_elements($type, $list, $attributes)
|
||||
private static function list_elements($type, $list, $attributes = array())
|
||||
{
|
||||
$html = '';
|
||||
|
||||
foreach ($list as $key => $value)
|
||||
{
|
||||
$html .= '<li>'.static::entities($value).'</li>';
|
||||
$html .= (is_array($value)) ? static::list_elements($type, $value) : '<li>'.static::entities($value).'</li>';
|
||||
}
|
||||
|
||||
return '<'.$type.static::attributes($attributes).'>'.$html.'</'.$type.'>';
|
||||
|
|
Loading…
Reference in New Issue