diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 79360fef2170a4a0e7d51b6d4d286e5b3d840fcd..45737c5ccbc69900e90d7eab80e4bc0f44528b8f 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -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), diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php index 1342ec5080986d2452161ee21b915b8321e6cf2b..0ae63b769d19637a7f3b2c21ea46d896c6c10783 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php @@ -629,7 +629,7 @@ protected function renderItems($items) { array( 'items' => $items, 'title' => NULL, - 'type' => $this->options['multi_type'] + 'list_type' => $this->options['multi_type'], )); } } diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php index 1faf6d86fdf9657d82da28ea45562a605d39bd3d..d8505bcc6c654ba8a0b57be9be2ada30498c090f 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php @@ -54,7 +54,7 @@ function testItemList() { 'childlist' => array( '#theme' => 'item_list', '#attributes' => array('id' => 'blist'), - '#type' => 'ol', + '#list_type' => 'ol', '#items' => array( 'ba', array( diff --git a/core/modules/tour/lib/Drupal/tour/TourRenderController.php b/core/modules/tour/lib/Drupal/tour/TourRenderController.php index 163882d149500303344a8cd8234718540cdeb929..aea0d336340562855603fedb27f96fd41af69b8b 100644 --- a/core/modules/tour/lib/Drupal/tour/TourRenderController.php +++ b/core/modules/tour/lib/Drupal/tour/TourRenderController.php @@ -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( diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index 4d13ee865837828ee9c3ec79c958870067d9032b..64b337e9507f733b49a70eb2971ecfcb20410494 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -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); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php index e14b009a74f55ae3d9e10e03d764c21520edcf6b..386eda0873586b3fcd800b9d5d942d1b0559e8f3 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php @@ -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); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/PrerenderList.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/PrerenderList.php index 01ee041e1e227c059e87536e508d07888d8f7457..ca2021cbe4c79e104ce4fb148290fe751c5cbed0 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/PrerenderList.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/PrerenderList.php @@ -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); } diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index 44403dd60269d792ae5f18f194d007224428333c..627e8ed7f74c1d0dc6329b248989f45e593442a6 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -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'), ),