';
diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc
index 139b2d2..a8e28f9 100644
--- a/core/modules/node/node.admin.inc
+++ b/core/modules/node/node.admin.inc
@@ -385,7 +385,7 @@ function _node_mass_update_batch_finished($success, $results, $operations) {
else {
drupal_set_message(t('An error occurred and processing did not complete.'), 'error');
$message = format_plural(count($results), '1 item successfully processed:', '@count items successfully processed:');
- $message .= theme('item_list', array('items' => $results));
+ $message .= theme('unordered_list', array('items' => $results));
drupal_set_message($message);
}
}
diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index c2d96d4..7ce136d 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -327,7 +327,7 @@ function _simpletest_batch_operation($test_list_init, $test_id, &$context) {
}
$context['message'] = t('Processed test @num of @max - %test.', array('%test' => $info['name'], '@num' => $max - $size, '@max' => $max));
$context['message'] .= '
Overall results: ' . _simpletest_format_summary_line($test_results) . '
';
- $context['message'] .= theme('item_list', array('items' => $items));
+ $context['message'] .= theme('unordered_list', array('items' => $items));
// Save working values for the next iteration.
$context['sandbox']['tests'] = $test_list;
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 1faf6d8..7659856 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
@@ -23,18 +23,18 @@ public static function getInfo() {
}
/**
- * Tests theme_item_list().
+ * Tests theme_unordered_list().
*/
- function testItemList() {
+ function testUnorderedList() {
// Verify that empty variables produce no output.
$variables = array();
$expected = '';
- $this->assertThemeOutput('item_list', $variables, $expected, 'Empty %callback generates no output.');
+ $this->assertThemeOutput('unordered_list', $variables, $expected, 'Empty %callback generates no output.');
$variables = array();
$variables['title'] = 'Some title';
$expected = '';
- $this->assertThemeOutput('item_list', $variables, $expected, 'Empty %callback with title generates no output.');
+ $this->assertThemeOutput('unordered_list', $variables, $expected, 'Empty %callback with title generates no output.');
// Verify nested item lists.
$variables = array();
@@ -52,9 +52,8 @@ function testItemList() {
),
'#markup' => 'b',
'childlist' => array(
- '#theme' => 'item_list',
+ '#theme' => 'unordered_list',
'#attributes' => array('id' => 'blist'),
- '#type' => 'ol',
'#items' => array(
'ba',
array(
@@ -94,10 +93,10 @@ function testItemList() {
'f',
);
- $inner_b = '
';
+ $inner_b = '';
$inner_b .= '- ba
';
$inner_b .= '- bb
';
- $inner_b .= '
';
+ $inner_b .= '
';
$inner_cb = '
';
$inner_cb .= '- cba
';
@@ -121,7 +120,108 @@ function testItemList() {
$expected .= '- f
';
$expected .= '
';
- $this->assertThemeOutput('item_list', $variables, $expected);
+ $this->assertThemeOutput('unordered_list', $variables, $expected);
+ }
+
+ /**
+ * Tests theme_ordered_list().
+ */
+ function testOrderedList() {
+ // Verify that empty variables produce no output.
+ $variables = array();
+ $expected = '';
+ $this->assertThemeOutput('ordered_list', $variables, $expected, 'Empty %callback generates no output.');
+
+ $variables = array();
+ $variables['title'] = 'Some title';
+ $expected = '';
+ $this->assertThemeOutput('ordered_list', $variables, $expected, 'Empty %callback with title generates no output.');
+
+ // Verify nested item lists.
+ $variables = array();
+ $variables['title'] = 'Some title';
+ $variables['attributes'] = array(
+ 'id' => 'parentlist',
+ );
+ $variables['items'] = array(
+ // A plain string value forms an own item.
+ 'a',
+ // Items can be fully-fledged render arrays with their own attributes.
+ array(
+ '#wrapper_attributes' => array(
+ 'id' => 'item-id-b',
+ ),
+ '#markup' => 'b',
+ 'childlist' => array(
+ '#theme' => 'ordered',
+ '#attributes' => array('id' => 'blist'),
+ '#items' => array(
+ 'ba',
+ array(
+ '#markup' => 'bb',
+ '#wrapper_attributes' => array('class' => array('item-class-bb')),
+ ),
+ ),
+ ),
+ ),
+ // However, items can also be child #items.
+ array(
+ '#markup' => 'c',
+ 'childlist' => array(
+ '#attributes' => array('id' => 'clist'),
+ 'ca',
+ array(
+ '#markup' => 'cb',
+ '#wrapper_attributes' => array('class' => array('item-class-cb')),
+ 'children' => array(
+ 'cba',
+ 'cbb',
+ ),
+ ),
+ 'cc',
+ ),
+ ),
+ // Use #markup to be able to specify #wrapper_attributes.
+ array(
+ '#markup' => 'd',
+ '#wrapper_attributes' => array('id' => 'item-id-d'),
+ ),
+ // An empty item with attributes.
+ array(
+ '#wrapper_attributes' => array('id' => 'item-id-e'),
+ ),
+ // Lastly, another plain string item.
+ 'f',
+ );
+
+ $inner_b = '
';
+ $inner_b .= '- ba
';
+ $inner_b .= '- bb
';
+ $inner_b .= '
';
+
+ $inner_cb = '
';
+ $inner_cb .= '- cba
';
+ $inner_cb .= '- cbb
';
+ $inner_cb .= '
';
+
+ $inner_c = '
';
+ $inner_c .= '- ca
';
+ $inner_c .= '- cb' . $inner_cb . '
';
+ $inner_c .= '- cc
';
+ $inner_c .= '
';
+
+ $expected = '
';
+ $expected .= '
Some title
';
+ $expected .= '
';
+ $expected .= '- a
';
+ $expected .= '- b' . $inner_b . '
';
+ $expected .= '- c' . $inner_c . '
';
+ $expected .= '- d
';
+ $expected .= '';
+ $expected .= '- f
';
+ $expected .= '
';
+
+ $this->assertThemeOutput('ordered_list', $variables, $expected);
}
/**
diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc
index 4a4ba0e..5f74981 100644
--- a/core/modules/system/system.admin.inc
+++ b/core/modules/system/system.admin.inc
@@ -1103,7 +1103,7 @@ function system_modules_confirm_form($modules, $storage) {
$items[] = format_plural(count($info['depends']), 'The @module module is missing, so the following module will be disabled: @depends.', 'The @module module is missing, so the following modules will be disabled: @depends.', $t_argument);
}
- $form['text'] = array('#markup' => theme('item_list', array('items' => $items)));
+ $form['text'] = array('#markup' => theme('unordered_list', array('items' => $items)));
// Set some default form values
$form = confirm_form(
@@ -1355,7 +1355,7 @@ function system_modules_uninstall_confirm_form($storage) {
if (isset($uninstall)) {
$form['#confirmed'] = TRUE;
$form['uninstall']['#tree'] = TRUE;
- $form['modules'] = array('#markup' => '
' . t('The following modules will be completely uninstalled from your site, and all data from these modules will be lost!') . '
' . theme('item_list', array('items' => $uninstall)));
+ $form['modules'] = array('#markup' => '
' . t('The following modules will be completely uninstalled from your site, and all data from these modules will be lost!') . '
' . theme('unordered_list', array('items' => $uninstall)));
$form = confirm_form(
$form,
t('Confirm uninstall'),
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 08a9fd9..bec8f77 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -130,7 +130,7 @@ function system_requirements($phase) {
'@system_requirements' => 'http://drupal.org/requirements',
));
- $description .= theme('item_list', array('items' => $missing_extensions));
+ $description .= theme('unordered_list', array('items' => $missing_extensions));
$requirements['php_extensions']['value'] = $t('Disabled');
$requirements['php_extensions']['severity'] = REQUIREMENT_ERROR;
@@ -245,7 +245,7 @@ function system_requirements($phase) {
$description = $conf_errors[0];
}
else {
- $description = theme('item_list', array('items' => $conf_errors));
+ $description = theme('unordered_list', array('items' => $conf_errors));
}
$requirements['settings.php'] = array(
'value' => $t('Not protected'),
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 2c51ae0..b23915c 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -3937,7 +3937,7 @@ function theme_exposed_filters($variables) {
foreach (element_children($form['current']) as $key) {
$items[] = $form['current'][$key];
}
- $output .= theme('item_list', array('items' => $items, 'attributes' => array('class' => array('clearfix', 'current-filters'))));
+ $output .= theme('unordered_list', array('items' => $items, 'attributes' => array('class' => array('clearfix', 'current-filters'))));
}
$output .= drupal_render_children($form);
diff --git a/core/modules/system/system.theme-rtl.css b/core/modules/system/system.theme-rtl.css
index b2ee453..d9b21f6 100644
--- a/core/modules/system/system.theme-rtl.css
+++ b/core/modules/system/system.theme-rtl.css
@@ -17,7 +17,7 @@ caption {
}
/**
- * Markup generated by theme_item_list().
+ * Markup generated by theme_unordered_list().
*/
.item-list ul li {
margin: 0 1.5em 0.25em 0;
diff --git a/core/modules/system/system.theme.css b/core/modules/system/system.theme.css
index 680d15e..450ca51 100644
--- a/core/modules/system/system.theme.css
+++ b/core/modules/system/system.theme.css
@@ -63,7 +63,7 @@ td.active {
}
/**
- * Markup generated by theme_item_list().
+ * Markup generated by theme_unordered_list() and theme_ordered_list().
*/
.item-list .title {
font-weight: bold;
diff --git a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module
index 5bab7a9..eac887a 100644
--- a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module
+++ b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module
@@ -29,7 +29,7 @@ function toolbar_test_toolbar() {
'id' => 'toolbar-tray-testing',
),
'content' => array(
- '#theme' => 'item_list',
+ '#theme' => 'unordered_list',
'#items' => array(
l(t('link 1'), '
'),
l(t('link 2'), ''),
diff --git a/core/modules/toolbar/toolbar.api.php b/core/modules/toolbar/toolbar.api.php
index 9bf59f9..a0796f3 100644
--- a/core/modules/toolbar/toolbar.api.php
+++ b/core/modules/toolbar/toolbar.api.php
@@ -108,7 +108,7 @@ function hook_toolbar() {
'tray' => array(
'#heading' => t('Shopping cart actions'),
'shopping_cart' => array(
- '#theme' => 'item_list',
+ '#theme' => 'unordered_list',
'#items' => array( /* An item list renderable array */ ),
),
),
diff --git a/core/modules/tour/lib/Drupal/tour/TourRenderController.php b/core/modules/tour/lib/Drupal/tour/TourRenderController.php
index 0f61c24..05b887e 100644
--- a/core/modules/tour/lib/Drupal/tour/TourRenderController.php
+++ b/core/modules/tour/lib/Drupal/tour/TourRenderController.php
@@ -47,9 +47,8 @@ public function viewMultiple(array $entities = array(), $view_mode = 'full', $la
$key = key($list_items);
$list_items[$key]['#wrapper_attributes']['data-text'] = t('End tour');
$build[$entity_id] = array(
- '#theme' => 'item_list',
+ '#theme' => 'ordered_list',
'#items' => $list_items,
- '#type' => 'ol',
'#attributes' => array(
'id' => 'tour',
'class' => array(
diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc
index 0047a52..ba720e4 100644
--- a/core/modules/update/update.manager.inc
+++ b/core/modules/update/update.manager.inc
@@ -351,7 +351,7 @@ function update_manager_download_batch_finished($success, $results) {
'title' => t('Downloading updates failed:'),
'items' => $results['errors'],
);
- drupal_set_message(theme('item_list', $error_list), 'error');
+ drupal_set_message(theme('unordered_list', $error_list), 'error');
}
elseif ($success) {
drupal_set_message(t('Updates downloaded successfully.'));
diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc
index 607b523..33f09eb 100644
--- a/core/modules/update/update.report.inc
+++ b/core/modules/update/update.report.inc
@@ -187,7 +187,7 @@ function theme_update_report($variables) {
$row .= t('Includes:');
$includes_items[] = t('Enabled: %includes', array('%includes' => implode(', ', $project['includes'])));
$includes_items[] = t('Disabled: %disabled', array('%disabled' => implode(', ', $project['disabled'])));
- $row .= theme('item_list', array('items' => $includes_items));
+ $row .= theme('unordered_list', array('items' => $includes_items));
}
else {
$row .= t('Includes: %includes', array('%includes' => implode(', ', $project['includes'])));
diff --git a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php
index 716a315..40ae451 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/block/block/UserLoginBlock.php
@@ -59,7 +59,7 @@ public function build() {
return array(
'user_login_form' => $form,
'user_links' => array(
- '#theme' => 'item_list',
+ '#theme' => 'unordered_list',
'#items' => $items,
),
);
diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc
index c3931d8..2315fa6 100644
--- a/core/modules/user/user.admin.inc
+++ b/core/modules/user/user.admin.inc
@@ -222,7 +222,7 @@ function user_admin_account() {
$options[$account->uid] = array(
'username' => theme('username', array('account' => $account)),
'status' => $status[$account->status],
- 'roles' => theme('item_list', array('items' => $users_roles)),
+ 'roles' => theme('unordered_list', array('items' => $users_roles)),
'member_for' => format_interval(REQUEST_TIME - $account->created),
'access' => $account->access ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $account->access))) : t('never'),
);
diff --git a/core/modules/views/lib/Drupal/views/Analyzer.php b/core/modules/views/lib/Drupal/views/Analyzer.php
index a2ff8ed..f1c8b18 100644
--- a/core/modules/views/lib/Drupal/views/Analyzer.php
+++ b/core/modules/views/lib/Drupal/views/Analyzer.php
@@ -79,7 +79,7 @@ public function formatMessages(array $messages) {
$type .= ' messages';
$message = '';
if (count($messages) > 1) {
- $message = theme('item_list', array('items' => $messages));
+ $message = theme('unordered_list', array('items' => $messages));
}
elseif ($messages) {
$message = array_shift($messages);
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
index 8bf057b..b769e13 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
@@ -324,7 +324,7 @@ public function globalTokenForm(&$form, &$form_state) {
'#collapsed' => TRUE,
);
$form['global_tokens']['list'] = array(
- '#theme' => 'item_list',
+ '#theme' => 'unordered_list',
'#items' => $token_items,
'#attributes' => array(
'class' => array('global-tokens'),
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
index fa394ae..d6f89a3 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
@@ -134,7 +134,7 @@ public function tokenForm(&$form, &$form_state) {
$items[] = $key . ' == ' . $value;
}
$form['tokens']['tokens'] = array(
- '#theme' => 'item_list',
+ '#theme' => 'unordered_list',
'#items' => $items,
);
}
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
index e4d11bd..510d7ca 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
@@ -45,7 +45,7 @@ public function buildOptionsForm(&$form, &$form_state) {
'@page_count -- the total page count',
),
);
- $list = theme('item_list', $variables);
+ $list = theme('unordered_list', $variables);
$form['content'] = array(
'#title' => t('Display'),
'#type' => 'textarea',
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 3259815..70d19cf 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
@@ -1686,11 +1686,12 @@ public function buildOptionsForm(&$form, &$form_state) {
foreach ($options[$type] as $key => $value) {
$items[] = $key . ' == ' . $value;
}
- $output .= theme('item_list',
- array(
- 'items' => $items,
- 'type' => $type
- ));
+ if($type == 'ol') {
+ $output .= theme('ordered_list', array($items));
+ }
+ else {
+ $output .= theme('unordered_list', array($items));
+ }
}
}
}
@@ -1839,7 +1840,7 @@ public function buildOptionsForm(&$form, &$form_state) {
);
$form['analysis'] = array(
- '#markup' => '' . theme('item_list', array('items' => $funcs)) . '
',
+ '#markup' => '' . theme('unordered_list', array('items' => $funcs)) . '
',
);
$form['rescan_button'] = array(
@@ -2075,7 +2076,7 @@ protected function formatThemes($themes) {
$fixed[] = $template;
}
- return theme('item_list', array('items' => array_reverse($fixed)));
+ return theme('unordered_list', array('items' => array_reverse($fixed)));
}
/**
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 5f20f4a..1e840e7 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,11 +873,12 @@ public function buildOptionsForm(&$form, &$form_state) {
foreach ($options[$type] as $key => $value) {
$items[] = $key . ' == ' . $value;
}
- $output .= theme('item_list',
- array(
- 'items' => $items,
- 'type' => $type
- ));
+ if($type == 'ol') {
+ $output .= theme('ordered_list', array($items));
+ }
+ else {
+ $output .= theme('unordered_list', array($items));
+ }
}
}
}
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 306fe89..43015e4 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
@@ -81,12 +81,12 @@ function render_items($items) {
return implode($this->sanitizeValue($this->options['separator'], 'xss_admin'), $items);
}
else {
- return theme('item_list',
- array(
- 'items' => $items,
- 'title' => NULL,
- 'type' => $this->options['type']
- ));
+ if($this->options['type'] == 'ol') {
+ return theme('ordered_list', array($items));
+ }
+ else {
+ return theme('unordered_list', array($items));
+ }
}
}
}
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index 44f48f6..5aea4e2 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -1086,11 +1086,10 @@ function theme_views_mini_pager($vars) {
'#wrapper_attributes' => array('class' => array('pager-next')),
) + $li_next;
- return theme('item_list',
+ return theme('unordered_list',
array(
'items' => $items,
'title' => NULL,
- 'type' => 'ul',
'attributes' => array('class' => array('pager')),
)
);
diff --git a/core/update.php b/core/update.php
index d24d6e0..7488bf9 100644
--- a/core/update.php
+++ b/core/update.php
@@ -97,7 +97,7 @@ function update_script_selection_form($form, &$form_state) {
'#value' => $update['start'],
);
$form['start'][$module . '_updates'] = array(
- '#theme' => 'item_list',
+ '#theme' => 'unordered_list',
'#items' => $update['pending'],
'#title' => $module . ' module',
);