Commit 8d460b40 authored by Dries's avatar Dries

- Patch #32573 by Moshe: added support for ordered lists to theme_item_list().

parent 909d6928
......@@ -862,21 +862,23 @@ function theme_stylesheet_import($path, $media = 'all') {
* An array of items to be displayed in the list.
* @param $title
* The title of the list.
* @param $type
* The type of list to return (e.g. "ul", "ol")
* @return
* A string containing the list output.
*/
function theme_item_list($items = array(), $title = NULL) {
function theme_item_list($items = array(), $title = NULL, $type = 'ul') {
$output = '<div class="item-list">';
if (isset($title)) {
$output .= '<h3>'. $title .'</h3>';
}
if (isset($items)) {
$output .= '<ul>';
$output .= "<$type>";
foreach ($items as $item) {
$output .= '<li>'. $item .'</li>';
}
$output .= '</ul>';
$output .= "</$type>";
}
$output .= '</div>';
return $output;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment