Commit 088b191c authored by alexpott's avatar alexpott

Issue #1828536 by sun, thedavidmeister, benjf, derek.deraps, jenlampton, dcam,...

Issue #1828536 by sun, thedavidmeister, benjf, derek.deraps, jenlampton, dcam, pwieck: Rename 'type' variable of theme_item_list() to 'list_type'.
parent 972bdf17
......@@ -2275,7 +2275,7 @@ function template_preprocess_item_list(&$variables) {
}
// Lastly, inherit the original theme variables of the current list.
$child['#theme'] = $variables['theme_hook_original'];
$child['#type'] = $variables['type'];
$child['#list_type'] = $variables['list_type'];
}
}
}
......@@ -2291,19 +2291,18 @@ function template_preprocess_item_list(&$variables) {
* render arrays. Render arrays can specify list item attributes in the
* #wrapper_attributes property.
* - title: The title of the list.
* - type: The type of list to return (e.g. "ul", "ol").
* - list_type: The type of HTML list (e.g. "ul", "ol").
* - attributes: The attributes applied to the list element.
*/
function theme_item_list($variables) {
$items = $variables['items'];
$title = (string) $variables['title'];
// @todo 'type' clashes with '#type'. Rename to 'tag'.
$type = $variables['type'];
$list_type = $variables['list_type'];
$list_attributes = $variables['attributes'];
$output = '';
if ($items) {
$output .= '<' . $type . new Attribute($list_attributes) . '>';
$output .= '<' . $list_type . new Attribute($list_attributes) . '>';
$num_items = count($items);
$i = 0;
......@@ -2325,7 +2324,7 @@ function theme_item_list($variables) {
}
$output .= '<li' . new Attribute($attributes) . '>' . $item . '</li>';
}
$output .= "</$type>";
$output .= "</$list_type>";
}
// Only output the list container and title, if there are any list items.
......@@ -3130,7 +3129,7 @@ function drupal_common_theme() {
'variables' => array('mark_type' => MARK_NEW),
),
'item_list' => array(
'variables' => array('items' => array(), 'title' => '', 'type' => 'ul', 'attributes' => array()),
'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array()),
),
'more_help_link' => array(
'variables' => array('url' => NULL),
......
......@@ -629,7 +629,7 @@ protected function renderItems($items) {
array(
'items' => $items,
'title' => NULL,
'type' => $this->options['multi_type']
'list_type' => $this->options['multi_type'],
));
}
}
......
......@@ -54,7 +54,7 @@ function testItemList() {
'childlist' => array(
'#theme' => 'item_list',
'#attributes' => array('id' => 'blist'),
'#type' => 'ol',
'#list_type' => 'ol',
'#items' => array(
'ba',
array(
......
......@@ -56,7 +56,7 @@ public function viewMultiple(array $entities = array(), $view_mode = 'full', $la
$build[$entity_id] = array(
'#theme' => 'item_list',
'#items' => $list_items,
'#type' => 'ol',
'#list_type' => 'ol',
'#attributes' => array(
'id' => 'tour',
'class' => array(
......
......@@ -1705,7 +1705,7 @@ public function buildOptionsForm(&$form, &$form_state) {
$item_list = array(
'#theme' => 'item_list',
'#items' => $items,
'#type' => $type,
'#list_type' => $type,
);
$output .= drupal_render($item_list);
}
......
......@@ -873,7 +873,7 @@ public function buildOptionsForm(&$form, &$form_state) {
$item_list = array(
'#theme' => 'item_list',
'#items' => $items,
'#type' => $type,
'#list_type' => $type,
);
$output .= drupal_render($item_list);
}
......
......@@ -83,7 +83,7 @@ protected function renderItems($items) {
'#theme' => 'item_list',
'#items' => $items,
'#title' => NULL,
'#type' => $this->options['type'],
'#list_type' => $this->options['type'],
);
return drupal_render($item_list);
}
......
......@@ -1201,7 +1201,7 @@ function theme_views_mini_pager($vars) {
'#theme' => 'item_list',
'#items' => $items,
'#title' => NULL,
'#type' => 'ul',
'#list_type' => 'ul',
'#attributes' => array(
'class' => array('pager'),
),
......
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