Index: install.php =================================================================== RCS file: /cvs/drupal/drupal/install.php,v retrieving revision 1.187 diff -u -p -r1.187 install.php --- install.php 27 Jul 2009 19:42:54 -0000 1.187 +++ install.php 27 Jul 2009 21:39:22 -0000 @@ -1036,7 +1036,7 @@ function install_configure_form(&$form_s '#description' => st('Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.'), '#required' => TRUE, '#weight' => -10, - '#attributes' => array('class' => 'username'), + '#attributes' => array('class' => array('username')), ); $form['admin_account']['account']['mail'] = array('#type' => 'textfield', @@ -1076,13 +1076,13 @@ function install_configure_form(&$form_s '#options' => system_time_zones(), '#description' => st('By default, dates in this site will be displayed in the chosen time zone.'), '#weight' => 5, - '#attributes' => array('class' => 'timezone-detect'), + '#attributes' => array('class' => array('timezone-detect')), ); $form['server_settings']['clean_url'] = array( '#type' => 'hidden', '#default_value' => 0, - '#attributes' => array('class' => 'install'), + '#attributes' => array('class' => array('install')), ); $form['server_settings']['update_status_module'] = array( Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.942 diff -u -p -r1.942 common.inc --- includes/common.inc 27 Jul 2009 19:53:17 -0000 1.942 +++ includes/common.inc 27 Jul 2009 21:39:23 -0000 @@ -2205,12 +2205,7 @@ function l($text, $path, array $options // Append active class. if (($path == $_GET['q'] || ($path == '' && drupal_is_front_page())) && (empty($options['language']) || $options['language']->language == $language->language)) { - if (isset($options['attributes']['class'])) { - $options['attributes']['class'] .= ' active'; - } - else { - $options['attributes']['class'] = 'active'; - } + $options['attributes']['class'][] = 'active'; } // Remove all HTML and PHP tags from a tooltip. For best performance, we act only @@ -3130,7 +3125,7 @@ function drupal_get_library($module, $na * In a situation where a single weight column is being sorted in the table, the * classes could be added like this (in the theme function): * @code - * $form['my_elements'][$delta]['weight']['#attributes']['class'] = "my-elements-weight"; + * $form['my_elements'][$delta]['weight']['#attributes']['class'] = array('my-elements-weight'); * @endcode * * Each row of the table must also have a class of "draggable" in order to enable the @@ -3139,7 +3134,7 @@ function drupal_get_library($module, $na * $row = array(...); * $rows[] = array( * 'data' => $row, - * 'class' => 'draggable', + * 'class' => array('draggable'), * ); * @endcode * @@ -3157,7 +3152,7 @@ function drupal_get_library($module, $na * the block regions on the admin/structure/block page), a separate subgroup class * must also be added to differentiate the groups. * @code - * $form['my_elements'][$region][$delta]['weight']['#attributes']['class'] = "my-elements-weight my-elements-weight-" . $region; + * $form['my_elements'][$region][$delta]['weight']['#attributes']['class'] = array('my-elements-weight my-elements-weight-' . $region); * @endcode * * $group is still 'my-element-weight', and the additional $subgroup variable @@ -4113,7 +4108,7 @@ function drupal_common_theme() { 'arguments' => array('display' => NULL), ), 'links' => array( - 'arguments' => array('links' => NULL, 'attributes' => array('class' => 'links')), + 'arguments' => array('links' => NULL, 'attributes' => array('class' => array('links'))), ), 'image' => array( 'arguments' => array('path' => NULL, 'alt' => '', 'title' => '', 'attributes' => array(), 'getsize' => TRUE), Index: includes/form.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/form.inc,v retrieving revision 1.353 diff -u -p -r1.353 form.inc --- includes/form.inc 27 Jul 2009 18:40:12 -0000 1.353 +++ includes/form.inc 27 Jul 2009 21:39:23 -0000 @@ -1578,12 +1578,12 @@ function theme_fieldset($element) { drupal_add_js('misc/collapse.js'); if (!isset($element['#attributes']['class'])) { - $element['#attributes']['class'] = ''; + $element['#attributes']['class'] = array(); } - $element['#attributes']['class'] .= ' collapsible'; + $element['#attributes']['class'][] = 'collapsible'; if (!empty($element['#collapsed'])) { - $element['#attributes']['class'] .= ' collapsed'; + $element['#attributes']['class'][] = 'collapsed'; } } $element['#attributes']['id'] = $element['#id']; @@ -1630,8 +1630,8 @@ function theme_radio($element) { */ function theme_radios($element) { $class = 'form-radios'; - if (isset($element['#attributes']['class'])) { - $class .= ' ' . $element['#attributes']['class']; + if (!empty($element['#attributes']['class'])) { + $class .= ' ' . implode(' ', $element['#attributes']['class']); } $element['#children'] = '
' . (!empty($element['#children']) ? $element['#children'] : '') . '
'; @@ -1647,14 +1647,14 @@ function form_process_password_confirm($ '#title' => t('Password'), '#value' => empty($element['#value']) ? NULL : $element['#value']['pass1'], '#required' => $element['#required'], - '#attributes' => array('class' => 'password-field'), + '#attributes' => array('class' => array('password-field')), ); $element['pass2'] = array( '#type' => 'password', '#title' => t('Confirm password'), '#value' => empty($element['#value']) ? NULL : $element['#value']['pass2'], '#required' => $element['#required'], - '#attributes' => array('class' => 'password-confirm'), + '#attributes' => array('class' => array('password-confirm')), ); $element['#element_validate'] = array('password_confirm_validate'); $element['#tree'] = TRUE; @@ -2091,8 +2091,8 @@ function theme_checkbox($element) { */ function theme_checkboxes($element) { $class = 'form-checkboxes'; - if (isset($element['#attributes']['class'])) { - $class .= ' ' . $element['#attributes']['class']; + if (!empty($element['#attributes']['class'])) { + $class .= ' ' . implode(' ', $element['#attributes']['class']); } $element['#children'] = '
' . (!empty($element['#children']) ? $element['#children'] : '') . '
'; @@ -2154,9 +2154,9 @@ function form_process_checkboxes($elemen * @code * $options = array(); * $options[0]['title'] = "A red row" - * $options[0]['#attributes'] = array ('class' => 'red-row'); + * $options[0]['#attributes'] = array ('class' => array('red-row')); * $options[1]['title'] = "A blue row" - * $options[1]['#attributes'] = array ('class' => 'blue-row'); + * $options[1]['#attributes'] = array ('class' => array('blue-row')); * * $form['myselector'] = array ( * '#type' => 'tableselect', @@ -2383,7 +2383,7 @@ function form_process_vertical_tabs($ele $element[$name . '__active_tab'] = array( '#type' => 'hidden', '#default_value' => $element['#default_tab'], - '#attributes' => array('class' => 'vertical-tabs-active-tab'), + '#attributes' => array('class' => array('vertical-tabs-active-tab')), ); return $element; @@ -2419,13 +2419,7 @@ function theme_submit($element) { * @ingroup themeable */ function theme_button($element) { - // Make sure not to overwrite classes. - if (isset($element['#attributes']['class'])) { - $element['#attributes']['class'] = 'form-' . $element['#button_type'] . ' ' . $element['#attributes']['class']; - } - else { - $element['#attributes']['class'] = 'form-' . $element['#button_type']; - } + $element['#attributes']['class'][] = 'form-' . $element['#button_type']; return '\n"; } @@ -2436,13 +2430,7 @@ function theme_button($element) { * @ingroup themeable */ function theme_image_button($element) { - // Make sure not to overwrite classes. - if (isset($element['#attributes']['class'])) { - $element['#attributes']['class'] = 'form-' . $element['#button_type'] . ' ' . $element['#attributes']['class']; - } - else { - $element['#attributes']['class'] = 'form-' . $element['#button_type']; - } + $element['#attributes']['class'] = 'form-' . $element['#button_type']; return ' 'weight', '#default_value' => $language->weight, - '#attributes' => array('class' => 'language-order-weight'), + '#attributes' => array('class' => array('language-order-weight')), ); $form['name'][$langcode] = array('#markup' => check_plain($language->name)); $form['native'][$langcode] = array('#markup' => check_plain($language->native)); @@ -91,7 +91,7 @@ function theme_locale_languages_overview drupal_render($form['weight'][$key]), l(t('edit'), 'admin/international/language/edit/' . $key) . (($key != 'en' && $key != $default->language) ? ' ' . l(t('delete'), 'admin/international/language/delete/' . $key) : '') ), - 'class' => 'draggable' + 'class' => array('draggable'), ); } } @@ -2305,8 +2305,8 @@ function _locale_translate_seek() { array('data' => check_plain(truncate_utf8($string['source'], 150, FALSE, TRUE)) . '
' . $string['location'] . ''), $string['context'], array('data' => _locale_translate_language_list($string['languages'], $limit_language), 'align' => 'center'), - array('data' => l(t('edit'), "admin/international/translate/edit/$lid", array('query' => drupal_get_destination())), 'class' => 'nowrap'), - array('data' => l(t('delete'), "admin/international/translate/delete/$lid", array('query' => drupal_get_destination())), 'class' => 'nowrap'), + array('data' => l(t('edit'), "admin/international/translate/edit/$lid", array('query' => drupal_get_destination())), 'class' => array('nowrap')), + array('data' => l(t('delete'), "admin/international/translate/delete/$lid", array('query' => drupal_get_destination())), 'class' => array('nowrap')), ); } Index: includes/pager.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/pager.inc,v retrieving revision 1.67 diff -u -p -r1.67 pager.inc --- includes/pager.inc 12 May 2009 18:26:41 -0000 1.67 +++ includes/pager.inc 27 Jul 2009 21:39:24 -0000 @@ -296,13 +296,13 @@ function theme_pager($tags = array(), $e if ($pager_total[$element] > 1) { if ($li_first) { $items[] = array( - 'class' => 'pager-first', + 'class' => array('pager-first'), 'data' => $li_first, ); } if ($li_previous) { $items[] = array( - 'class' => 'pager-previous', + 'class' => array('pager-previous'), 'data' => $li_previous, ); } @@ -311,7 +311,7 @@ function theme_pager($tags = array(), $e if ($i != $pager_max) { if ($i > 1) { $items[] = array( - 'class' => 'pager-ellipsis', + 'class' => array('pager-ellipsis'), 'data' => '…', ); } @@ -319,26 +319,26 @@ function theme_pager($tags = array(), $e for (; $i <= $pager_last && $i <= $pager_max; $i++) { if ($i < $pager_current) { $items[] = array( - 'class' => 'pager-item', + 'class' => array('pager-item'), 'data' => theme('pager_previous', $i, $element, ($pager_current - $i), $parameters), ); } if ($i == $pager_current) { $items[] = array( - 'class' => 'pager-current', + 'class' => array('pager-current'), 'data' => $i, ); } if ($i > $pager_current) { $items[] = array( - 'class' => 'pager-item', + 'class' => array('pager-item'), 'data' => theme('pager_next', $i, $element, ($i - $pager_current), $parameters), ); } } if ($i < $pager_max) { $items[] = array( - 'class' => 'pager-ellipsis', + 'class' => array('pager-ellipsis'), 'data' => '…', ); } @@ -346,17 +346,17 @@ function theme_pager($tags = array(), $e // End generation. if ($li_next) { $items[] = array( - 'class' => 'pager-next', + 'class' => array('pager-next'), 'data' => $li_next, ); } if ($li_last) { $items[] = array( - 'class' => 'pager-last', + 'class' => array('pager-last'), 'data' => $li_last, ); } - return theme('item_list', $items, NULL, 'ul', array('class' => 'pager')); + return theme('item_list', $items, NULL, 'ul', array('class' => array('pager'))); } } Index: includes/tablesort.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/tablesort.inc,v retrieving revision 1.51 diff -u -p -r1.51 tablesort.inc --- includes/tablesort.inc 22 May 2009 11:33:17 -0000 1.51 +++ includes/tablesort.inc 27 Jul 2009 21:39:24 -0000 @@ -185,12 +185,7 @@ function tablesort_header($cell, $header $title = t('sort by @s', array('@s' => $cell['data'])); if ($cell['data'] == $ts['name']) { $ts['sort'] = (($ts['sort'] == 'asc') ? 'desc' : 'asc'); - if (isset($cell['class'])) { - $cell['class'] .= ' active'; - } - else { - $cell['class'] = 'active'; - } + $cell['class'][] = 'active'; $image = theme('tablesort_indicator', $ts['sort']); } else { @@ -228,15 +223,10 @@ function tablesort_header($cell, $header function tablesort_cell($cell, $header, $ts, $i) { if (isset($header[$i]['data']) && $header[$i]['data'] == $ts['name'] && !empty($header[$i]['field'])) { if (is_array($cell)) { - if (isset($cell['class'])) { - $cell['class'] .= ' active'; - } - else { - $cell['class'] = 'active'; - } + $cell['class'][] = 'active'; } else { - $cell = array('data' => $cell, 'class' => 'active'); + $cell = array('data' => $cell, 'class' => array('active')); } } return $cell; Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.500 diff -u -p -r1.500 theme.inc --- includes/theme.inc 27 Jul 2009 18:38:35 -0000 1.500 +++ includes/theme.inc 27 Jul 2009 21:39:24 -0000 @@ -1267,7 +1267,7 @@ function theme_status_messages($display * @return * A string containing an unordered list of links. */ -function theme_links($links, $attributes = array('class' => 'links')) { +function theme_links($links, $attributes = array('class' => array('links'))) { global $language; $output = ''; @@ -1278,18 +1278,18 @@ function theme_links($links, $attributes $i = 1; foreach ($links as $key => $link) { - $class = $key; + $class = array($key); // Add first, last and active classes to the list of links to help out themers. if ($i == 1) { - $class .= ' first'; + $class[] = 'first'; } if ($i == $num_links) { - $class .= ' last'; + $class[] = 'last'; } if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '' && drupal_is_front_page())) && (empty($link['language']) || $link['language']->language == $language->language)) { - $class .= ' active'; + $class[] = 'active'; } $output .= ' $class)) . '>'; @@ -1397,7 +1397,7 @@ function theme_submenu($links) { * ), * // Row with attributes on the row and some of its cells. * array( - * 'data' => array('Cell 1', array('data' => 'Cell 2', 'colspan' => 2)), 'class' => 'funky' + * 'data' => array('Cell 1', array('data' => 'Cell 2', 'colspan' => 2)), 'class' => array('funky') * ) * ); * @endverbatim @@ -1419,17 +1419,17 @@ function theme_submenu($links) { * // COLGROUP with one COL element. * array( * array( - * 'class' => 'funky', // Attribute for the COL element. + * 'class' => array('funky'), // Attribute for the COL element. * ), * ), * // Colgroup with attributes and inner COL elements. * array( * 'data' => array( * array( - * 'class' => 'funky', // Attribute for the COL element. + * 'class' => array('funky'), // Attribute for the COL element. * ), * ), - * 'class' => 'jazzy', // Attribute for the COLGROUP element. + * 'class' => array('jazzy'), // Attribute for the COLGROUP element. * ), * ); * @endverbatim @@ -1448,7 +1448,7 @@ function theme_table($header, $rows, $at drupal_add_js('misc/tableheader.js'); // Add 'sticky-enabled' class to the table to identify it for JS. // This is needed to target tables constructed by this function. - $attributes['class'] = empty($attributes['class']) ? 'sticky-enabled' : ($attributes['class'] . ' sticky-enabled'); + $attributes['class'][] = 'sticky-enabled'; } $output = '\n"; @@ -1534,12 +1534,7 @@ function theme_table($header, $rows, $at if (count($cells)) { // Add odd/even class $class = $flip[$class]; - if (isset($attributes['class'])) { - $attributes['class'] .= ' ' . $class; - } - else { - $attributes['class'] = $class; - } + $attributes['class'][] = $class; // Build row $output .= ' '; @@ -1564,7 +1559,7 @@ function theme_table($header, $rows, $at function theme_table_select_header_cell() { drupal_add_js('misc/tableselect.js'); - return array('class' => 'select-all'); + return array('class' => array('select-all')); } /** @@ -1656,10 +1651,10 @@ function theme_item_list($items = array( $data .= theme_item_list($children, NULL, $type, $attributes); // Render nested list } if ($i == 0) { - $attributes['class'] = empty($attributes['class']) ? 'first' : ($attributes['class'] . ' first'); + $attributes['class'][] = 'first'; } if ($i == $num_items - 1) { - $attributes['class'] = empty($attributes['class']) ? 'last' : ($attributes['class'] . ' last'); + $attributes['class'][] = 'last'; } $output .= '' . $data . "\n"; } Index: modules/aggregator/aggregator.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v retrieving revision 1.35 diff -u -p -r1.35 aggregator.admin.inc --- modules/aggregator/aggregator.admin.inc 20 Jul 2009 18:51:31 -0000 1.35 +++ modules/aggregator/aggregator.admin.inc 27 Jul 2009 21:39:24 -0000 @@ -30,7 +30,7 @@ function aggregator_view() { $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '@count items'), ($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never')), ($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never')), l(t('edit'), "admin/content/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/content/aggregator/remove/$feed->fid"), l(t('update items'), "admin/content/aggregator/update/$feed->fid")); } if (empty($rows)) { - $rows[] = array(array('data' => t('No feeds available. Add feed.', array('@link' => url('admin/content/aggregator/add/feed'))), 'colspan' => '5', 'class' => 'message')); + $rows[] = array(array('data' => t('No feeds available. Add feed.', array('@link' => url('admin/content/aggregator/add/feed'))), 'colspan' => '5', 'class' => array('message'))); } $output .= theme('table', $header, $rows); @@ -44,7 +44,7 @@ function aggregator_view() { $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '@count items'), l(t('edit'), "admin/content/aggregator/edit/category/$category->cid")); } if (empty($rows)) { - $rows[] = array(array('data' => t('No categories available. Add category.', array('@link' => url('admin/content/aggregator/add/category'))), 'colspan' => '5', 'class' => 'message')); + $rows[] = array(array('data' => t('No categories available. Add category.', array('@link' => url('admin/content/aggregator/add/category'))), 'colspan' => '5', 'class' => array('message'))); } $output .= theme('table', $header, $rows); Index: modules/aggregator/aggregator.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.pages.inc,v retrieving revision 1.29 diff -u -p -r1.29 aggregator.pages.inc --- modules/aggregator/aggregator.pages.inc 15 Jun 2009 09:49:58 -0000 1.29 +++ modules/aggregator/aggregator.pages.inc 27 Jul 2009 21:39:24 -0000 @@ -242,7 +242,7 @@ function theme_aggregator_categorize_ite foreach (element_children($form['items']) as $key) { $rows[] = array( drupal_render($form['items'][$key]), - array('data' => drupal_render($form['categories'][$key]), 'class' => 'categorize-item'), + array('data' => drupal_render($form['categories'][$key]), 'class' => array('categorize-item')), ); } } Index: modules/block/block.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v retrieving revision 1.47 diff -u -p -r1.47 block.admin.inc --- modules/block/block.admin.inc 20 Jul 2009 18:51:32 -0000 1.47 +++ modules/block/block.admin.inc 27 Jul 2009 21:39:24 -0000 @@ -491,12 +491,12 @@ function template_preprocess_block_admin $region = $block['region']['#default_value']; // Set special classes needed for table drag and drop. - $variables['form'][$i]['region']['#attributes']['class'] = 'block-region-select block-region-' . $region; - $variables['form'][$i]['weight']['#attributes']['class'] = 'block-weight block-weight-' . $region; + $variables['form'][$i]['region']['#attributes']['class'] = array('block-region-select', 'block-region-' . $region); + $variables['form'][$i]['weight']['#attributes']['class'] = array('block-weight', 'block-weight-' . $region); $variables['block_listing'][$region][$i] = new stdClass(); - $variables['block_listing'][$region][$i]->row_class = isset($block['#attributes']['class']) ? $block['#attributes']['class'] : ''; - $variables['block_listing'][$region][$i]->block_modified = isset($block['#attributes']['class']) && strpos($block['#attributes']['class'], 'block-modified') !== FALSE; + $variables['block_listing'][$region][$i]->row_class = !empty($block['#attributes']['class']) ? implode(' ', $block['#attributes']['class']) : ''; + $variables['block_listing'][$region][$i]->block_modified = !empty($block['#attributes']['class']) && in_array('block-modified', $block['#attributes']['class']); $variables['block_listing'][$region][$i]->block_title = drupal_render($block['info']); $variables['block_listing'][$region][$i]->region_select = drupal_render($block['region']) . drupal_render($block['theme']); $variables['block_listing'][$region][$i]->weight_select = drupal_render($block['weight']); Index: modules/blog/blog.module =================================================================== RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v retrieving revision 1.328 diff -u -p -r1.328 blog.module --- modules/blog/blog.module 20 Jul 2009 18:51:32 -0000 1.328 +++ modules/blog/blog.module 27 Jul 2009 21:39:24 -0000 @@ -50,7 +50,7 @@ function blog_user_view(&$edit, &$user, '#type' => 'user_profile_item', '#title' => t('Blog'), '#markup' => l(t('View recent blog entries'), "blog/$user->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $user->name))))), - '#attributes' => array('class' => 'blog'), + '#attributes' => array('class' => array('blog')), ); } } @@ -101,7 +101,7 @@ function blog_node_view($node, $build_mo $node->content['links']['blog'] = array( '#theme' => 'links', '#links' => $links, - '#attributes' => array('class' => 'links inline'), + '#attributes' => array('class' => array('links', 'inline')), ); } } Index: modules/book/book.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.admin.inc,v retrieving revision 1.20 diff -u -p -r1.20 book.admin.inc --- modules/book/book.admin.inc 4 Jun 2009 03:33:27 -0000 1.20 +++ modules/book/book.admin.inc 27 Jul 2009 21:39:24 -0000 @@ -236,9 +236,9 @@ function theme_book_admin_table($form) { $href = $form[$key]['href']['#value']; // Add special classes to be used with tabledrag.js. - $form[$key]['plid']['#attributes']['class'] = 'book-plid'; - $form[$key]['mlid']['#attributes']['class'] = 'book-mlid'; - $form[$key]['weight']['#attributes']['class'] = 'book-weight'; + $form[$key]['plid']['#attributes']['class'] = array('book-plid'); + $form[$key]['mlid']['#attributes']['class'] = array('book-mlid'); + $form[$key]['weight']['#attributes']['class'] = array('book-weight'); $data = array( theme('indentation', $form[$key]['depth']['#value'] - 2) . drupal_render($form[$key]['title']), @@ -252,7 +252,7 @@ function theme_book_admin_table($form) { if (isset($form[$key]['#attributes'])) { $row = array_merge($row, $form[$key]['#attributes']); } - $row['class'] = empty($row['class']) ? 'draggable' : $row['class'] . ' draggable'; + $row['class'][] = 'draggable'; $rows[] = $row; } Index: modules/book/book.module =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.module,v retrieving revision 1.500 diff -u -p -r1.500 book.module --- modules/book/book.module 20 Jul 2009 18:51:32 -0000 1.500 +++ modules/book/book.module 27 Jul 2009 21:39:24 -0000 @@ -91,7 +91,7 @@ function book_node_view_link($node, $bui $node->content['links']['book'] = array( '#theme' => 'links', '#links' => $links, - '#attributes' => array('class' => 'links inline'), + '#attributes' => array('class' => array('links', 'inline')), ); } } @@ -296,7 +296,7 @@ function book_block_save($delta = '', $e * @ingroup themeable */ function theme_book_title_link($link) { - $link['options']['attributes']['class'] = 'book-title'; + $link['options']['attributes']['class'] = array('book-title'); return l($link['title'], $link['href'], $link['options']); } @@ -416,7 +416,7 @@ function _book_parent_select($book_link) '#default_value' => $book_link['plid'], '#description' => t('The parent page in the book. The maximum depth for a book and all child pages is !maxdepth. Some pages in the selected book may not be available as parents if selecting them would exceed this limit.', array('!maxdepth' => MENU_MAX_DEPTH)), '#options' => book_toc($book_link['bid'], $book_link['parent_depth_limit'], array($book_link['mlid'])), - '#attributes' => array('class' => 'book-title-select'), + '#attributes' => array('class' => array('book-title-select')), ); } @@ -439,7 +439,7 @@ function _book_add_form_elements(&$form, '#group' => 'additional_settings', '#attached_js' => array(drupal_get_path('module', 'book') . '/book.js'), '#tree' => TRUE, - '#attributes' => array('class' => 'book-outline-form'), + '#attributes' => array('class' => array('book-outline-form')), ); foreach (array('menu_name', 'mlid', 'nid', 'router_path', 'has_children', 'options', 'module', 'original_bid', 'parent_depth_limit') as $key) { $form['book'][$key] = array( @@ -489,7 +489,7 @@ function _book_add_form_elements(&$form, '#access' => (bool)$options, '#description' => t('Your page will be a part of the selected book.'), '#weight' => -5, - '#attributes' => array('class' => 'book-title-select'), + '#attributes' => array('class' => array('book-title-select')), '#ahah' => array( 'path' => 'book/js/form', 'wrapper' => 'edit-book-plid-wrapper', Index: modules/book/book.test =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.test,v retrieving revision 1.13 diff -u -p -r1.13 book.test --- modules/book/book.test 20 Jul 2009 18:51:32 -0000 1.13 +++ modules/book/book.test 27 Jul 2009 21:39:24 -0000 @@ -110,15 +110,15 @@ class BookTestCase extends DrupalWebTest // Check previous, up, and next links. if ($previous) { - $this->assertRaw(l('‹ ' . $previous->title, 'node/' . $previous->nid, array('attributes' => array('class' => 'page-previous', 'title' => t('Go to previous page')))), t('Prevoius page link found.')); + $this->assertRaw(l('‹ ' . $previous->title, 'node/' . $previous->nid, array('attributes' => array('class' => array('page-previous'), 'title' => t('Go to previous page')))), t('Prevoius page link found.')); } if ($up) { - $this->assertRaw(l('up', 'node/' . $up->nid, array('attributes' => array('class' => 'page-up', 'title' => t('Go to parent page')))), t('Up page link found.')); + $this->assertRaw(l('up', 'node/' . $up->nid, array('attributes' => array('class' => array('page-up'), 'title' => t('Go to parent page')))), t('Up page link found.')); } if ($next) { - $this->assertRaw(l($next->title . ' ›', 'node/' . $next->nid, array('attributes' => array('class' => 'page-next', 'title' => t('Go to next page')))), t('Next page link found.')); + $this->assertRaw(l($next->title . ' ›', 'node/' . $next->nid, array('attributes' => array('class' => array('page-next'), 'title' => t('Go to next page')))), t('Next page link found.')); } // Compute the expected breadcrumb. Index: modules/color/color.module =================================================================== RCS file: /cvs/drupal/drupal/modules/color/color.module,v retrieving revision 1.62 diff -u -p -r1.62 color.module --- modules/color/color.module 20 Jul 2009 18:51:32 -0000 1.62 +++ modules/color/color.module 27 Jul 2009 21:39:25 -0000 @@ -74,7 +74,7 @@ function _color_theme_select_form_alter( foreach (element_children($form) as $theme) { if ($screenshot = variable_get('color_' . $theme . '_screenshot')) { if (isset($form[$theme]['screenshot'])) { - $form[$theme]['screenshot']['#markup'] = theme('image', $screenshot, '', '', array('class' => 'screenshot'), FALSE); + $form[$theme]['screenshot']['#markup'] = theme('image', $screenshot, '', '', array('class' => array('screenshot')), FALSE); } } } Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.742 diff -u -p -r1.742 comment.module --- modules/comment/comment.module 21 Jul 2009 21:48:24 -0000 1.742 +++ modules/comment/comment.module 27 Jul 2009 21:39:25 -0000 @@ -529,7 +529,7 @@ function comment_node_view($node, $build $node->content['links']['comment'] = array( '#theme' => 'links', '#links' => $links, - '#attributes' => array('class' => 'links inline'), + '#attributes' => array('class' => array('links', 'inline')), ); // Append the list of comments to $node->content for node detail pages. Index: modules/dblog/dblog.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v retrieving revision 1.22 diff -u -p -r1.22 dblog.admin.inc --- modules/dblog/dblog.admin.inc 6 Jun 2009 10:27:42 -0000 1.22 +++ modules/dblog/dblog.admin.inc 27 Jul 2009 21:39:25 -0000 @@ -84,7 +84,7 @@ function dblog_overview() { $dblog->link, ), // Attributes for tr - 'class' => "dblog-" . preg_replace('/[^a-z]/i', '-', $dblog->type) . ' ' . $classes[$dblog->severity] + 'class' => array('dblog-' . preg_replace('/[^a-z]/i', '-', $dblog->type), $classes[$dblog->severity]), ); } @@ -185,7 +185,7 @@ function dblog_event($id) { $dblog->link, ), ); - $attributes = array('class' => 'dblog-event'); + $attributes = array('class' => array('dblog-event')); $output = theme('table', array(), $rows, $attributes); } return $output; Index: modules/field/field.form.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/field/field.form.inc,v retrieving revision 1.12 diff -u -p -r1.12 field.form.inc --- modules/field/field.form.inc 27 Jul 2009 20:19:20 -0000 1.12 +++ modules/field/field.form.inc 27 Jul 2009 21:39:25 -0000 @@ -201,7 +201,7 @@ function field_multiple_value_form($fiel // the relevant field using these entries. '#field_name' => $field_name, '#bundle' => $instance['bundle'], - '#attributes' => array('class' => 'field-add-more-submit'), + '#attributes' => array('class' => array('field-add-more-submit')), ); } } @@ -226,7 +226,7 @@ function theme_field_multiple_value_form array( 'data' => '", 'colspan' => 2, - 'class' => 'field-label', + 'class' => array('field-label'), ), t('Order'), ); @@ -247,21 +247,21 @@ function theme_field_multiple_value_form // Add the items as table rows. foreach ($items as $key => $item) { - $item['_weight']['#attributes']['class'] = $order_class; + $item['_weight']['#attributes']['class'] = array($order_class); $delta_element = drupal_render($item['_weight']); $cells = array( - array('data' => '', 'class' => 'field-multiple-drag'), + array('data' => '', 'class' => array('field-multiple-drag')), drupal_render($item), - array('data' => $delta_element, 'class' => 'delta-order'), + array('data' => $delta_element, 'class' => array('delta-order')), ); $rows[] = array( 'data' => $cells, - 'class' => 'draggable', + 'class' => array('draggable'), ); } $output = '
'; - $output .= theme('table', $header, $rows, array('id' => $table_id, 'class' => 'field-multiple-table')); + $output .= theme('table', $header, $rows, array('id' => $table_id, 'class' => array('field-multiple-table'))); $output .= $element['#description'] ? '
' . $element['#description'] . '
' : ''; $output .= '
' . drupal_render($add_more_button) . '
'; $output .= '
'; Index: modules/field/modules/number/number.module =================================================================== RCS file: /cvs/drupal/drupal/modules/field/modules/number/number.module,v retrieving revision 1.10 diff -u -p -r1.10 number.module --- modules/field/modules/number/number.module 28 May 2009 16:44:06 -0000 1.10 +++ modules/field/modules/number/number.module 27 Jul 2009 21:39:25 -0000 @@ -314,7 +314,7 @@ function number_elements_process($elemen // for some configurations where all characters won't fit in input field. '#size' => $field['type'] == 'number_decimal' ? $field['settings']['precision'] + 2 : 12, '#maxlength' => $field['type'] == 'number_decimal' ? $field['settings']['precision'] : 10, - '#attributes' => array('class' => 'number'), + '#attributes' => array('class' => array('number')), // The following values were set by the Field module and need // to be passed down to the nested element. '#title' => $element['#title'], Index: modules/field/modules/text/text.module =================================================================== RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.module,v retrieving revision 1.15 diff -u -p -r1.15 text.module --- modules/field/modules/text/text.module 3 Jul 2009 18:19:29 -0000 1.15 +++ modules/field/modules/text/text.module 27 Jul 2009 21:39:25 -0000 @@ -613,7 +613,7 @@ function text_textfield_elements_process '#default_value' => isset($element['#value'][$field_key]) ? $element['#value'][$field_key] : NULL, '#autocomplete_path' => $element['#autocomplete_path'], '#size' => $instance['widget']['settings']['size'], - '#attributes' => array('class' => 'text'), + '#attributes' => array('class' => array('text')), '#title' => $element['#title'], '#description' => $element['#description'], '#required' => $element['#required'], @@ -758,7 +758,7 @@ function theme_text_textarea_with_summar $fieldset = array( '#title' => $element['#title'], '#value' => $element['#children'], - '#attributes' => array('class' => 'text-textarea'), + '#attributes' => array('class' => array('text-textarea')), '#id' => str_replace('_', '-', $element['#field_name']) . '-summary-wrapper', ); return theme('fieldset', $fieldset); Index: modules/filter/filter.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.inc,v retrieving revision 1.30 diff -u -p -r1.30 filter.admin.inc --- modules/filter/filter.admin.inc 12 Jun 2009 08:39:37 -0000 1.30 +++ modules/filter/filter.admin.inc 27 Jul 2009 21:39:25 -0000 @@ -68,7 +68,7 @@ function theme_filter_admin_overview($fo $rows = array(); foreach ($form as $id => $element) { if (isset($element['roles']) && is_array($element['roles'])) { - $element['weight']['#attributes']['class'] = 'text-format-order-weight'; + $element['weight']['#attributes']['class'] = array('text-format-order-weight'); $rows[] = array( 'data' => array( check_plain($element['name']['#markup']), @@ -78,7 +78,7 @@ function theme_filter_admin_overview($fo drupal_render($element['configure']), drupal_render($element['delete']), ), - 'class' => 'draggable', + 'class' => array('draggable'), ); unset($form[$id]); } @@ -414,10 +414,10 @@ function theme_filter_admin_order($form) foreach (element_children($form['names']) as $id) { // Don't take form control structures. if (is_array($form['names'][$id])) { - $form['weights'][$id]['#attributes']['class'] = 'filter-order-weight'; + $form['weights'][$id]['#attributes']['class'] = array('filter-order-weight'); $rows[] = array( 'data' => array(drupal_render($form['names'][$id]), drupal_render($form['weights'][$id])), - 'class' => 'draggable', + 'class' => array('draggable'), ); } } Index: modules/filter/filter.module =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v retrieving revision 1.264 diff -u -p -r1.264 filter.module --- modules/filter/filter.module 27 Jul 2009 20:15:35 -0000 1.264 +++ modules/filter/filter.module 27 Jul 2009 21:39:26 -0000 @@ -227,15 +227,15 @@ function filter_filter_tips($delta, $for if (array_key_exists($tag, $tips)) { if ($tips[$tag]) { $rows[] = array( - array('data' => $tips[$tag][0], 'class' => 'description'), - array('data' => '' . check_plain($tips[$tag][1]) . '', 'class' => 'type'), - array('data' => $tips[$tag][1], 'class' => 'get') + array('data' => $tips[$tag][0], 'class' => array('description')), + array('data' => '' . check_plain($tips[$tag][1]) . '', 'class' => array('type')), + array('data' => $tips[$tag][1], 'class' => array('get')) ); } } else { $rows[] = array( - array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => 'description', 'colspan' => 3), + array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => array('description'), 'colspan' => 3), ); } } @@ -254,9 +254,9 @@ function filter_filter_tips($delta, $for unset($rows); foreach ($entities as $entity) { $rows[] = array( - array('data' => $entity[0], 'class' => 'description'), - array('data' => '' . check_plain($entity[1]) . '', 'class' => 'type'), - array('data' => $entity[1], 'class' => 'get') + array('data' => $entity[0], 'class' => array('description')), + array('data' => '' . check_plain($entity[1]) . '', 'class' => array('type')), + array('data' => $entity[1], 'class' => array('get')) ); } $output .= theme('table', $header, $rows); @@ -492,7 +492,7 @@ function filter_form($value = FILTER_FOR $form = array( '#type' => 'fieldset', '#weight' => $weight, - '#attributes' => array('class' => 'filter-wrapper'), + '#attributes' => array('class' => array('filter-wrapper')), ); $form['format_guidelines'] = array( '#prefix' => '
', @@ -513,7 +513,7 @@ function filter_form($value = FILTER_FOR '#parents' => $parents, '#access' => count($formats) > 1, '#id' => $element_id, - '#attributes' => array('class' => 'filter-list'), + '#attributes' => array('class' => array('filter-list')), ); $form['format_help'] = array( '#prefix' => '
', Index: modules/image/image.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/image/image.admin.inc,v retrieving revision 1.1 diff -u -p -r1.1 image.admin.inc --- modules/image/image.admin.inc 21 Jul 2009 07:09:46 -0000 1.1 +++ modules/image/image.admin.inc 27 Jul 2009 21:39:26 -0000 @@ -578,7 +578,7 @@ function theme_image_style_list($styles) $row[] = l($style['name'], 'admin/settings/image-styles/edit/' . $style['name']); $link_attributes = array( 'attributes' => array( - 'class' => 'image-style-link', + 'class' => array('image-style-link'), ), ); $row[] = l(t('edit'), 'admin/settings/image-styles/edit/' . $style['name'], $link_attributes); @@ -608,7 +608,7 @@ function theme_image_style_effects($form foreach (element_children($form) as $key) { if (is_numeric($key)) { - $form[$key]['weight']['#attributes']['class'] = 'image-effect-order-weight'; + $form[$key]['weight']['#attributes']['class'] = array('image-effect-order-weight'); $summary = drupal_render($form[$key]['summary']); $row = array(); $row[] = drupal_render($form[$key]['label']) . (empty($summary) ? '' : ' ' . $summary); @@ -618,7 +618,7 @@ function theme_image_style_effects($form } else { // Add the row for adding a new image effect. - $form['new']['weight']['#attributes']['class'] = 'image-effect-order-weight'; + $form['new']['weight']['#attributes']['class'] = array('image-effect-order-weight'); $row = array(); $row[] = '
' . drupal_render($form['new']['new']) . drupal_render($form['new']['add']) . '
'; $row[] = drupal_render($form['new']['weight']); @@ -627,7 +627,7 @@ function theme_image_style_effects($form $rows[] = array( 'data' => $row, - 'class' => 'draggable', + 'class' => array('draggable'), ); } @@ -742,7 +742,7 @@ function theme_image_anchor($element) { } } - return theme('table', array(), $rows, array('class' => 'image-anchor')); + return theme('table', array(), $rows, array('class' => array('image-anchor'))); } /** Index: modules/locale/locale.api.php =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.api.php,v retrieving revision 1.3 diff -u -p -r1.3 locale.api.php --- modules/locale/locale.api.php 11 Jul 2009 13:56:21 -0000 1.3 +++ modules/locale/locale.api.php 27 Jul 2009 21:39:26 -0000 @@ -40,7 +40,7 @@ function hook_translation_link_alter(arr if (isset($links[$language])) { foreach ($links[$language] as $link) { - $link['attributes']['class'] .= ' active-language'; + $link['attributes']['class'][] = 'active-language'; } } } Index: modules/locale/locale.module =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v retrieving revision 1.244 diff -u -p -r1.244 locale.module --- modules/locale/locale.module 20 Jul 2009 18:51:33 -0000 1.244 +++ modules/locale/locale.module 27 Jul 2009 21:39:26 -0000 @@ -613,7 +613,7 @@ function locale_block_view($delta = '') 'href' => $path, 'title' => $language->native, 'language' => $language, - 'attributes' => array('class' => 'language-link'), + 'attributes' => array('class' => array('language-link')), ); } Index: modules/menu/menu.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v retrieving revision 1.53 diff -u -p -r1.53 menu.admin.inc --- modules/menu/menu.admin.inc 20 Jul 2009 18:51:33 -0000 1.53 +++ modules/menu/menu.admin.inc 27 Jul 2009 21:39:26 -0000 @@ -82,7 +82,7 @@ function _menu_overview_tree_form($tree) if ($item && $item['hidden'] >= 0) { $mlid = 'mlid:' . $item['mlid']; $form[$mlid]['#item'] = $item; - $form[$mlid]['#attributes'] = $item['hidden'] ? array('class' => 'menu-disabled') : array('class' => 'menu-enabled'); + $form[$mlid]['#attributes'] = $item['hidden'] ? array('class' => array('menu-disabled')) : array('class' => array('menu-enabled')); $form[$mlid]['title']['#markup'] = l($item['title'], $item['href'], $item['localized_options']) . ($item['hidden'] ? ' (' . t('disabled') . ')' : ''); $form[$mlid]['hidden'] = array( '#type' => 'checkbox', @@ -188,8 +188,8 @@ function theme_menu_overview_form($form) $header = array( t('Menu link'), - array('data' => t('Enabled'), 'class' => 'checkbox'), - array('data' => t('Show as expanded'), 'class' => 'checkbox'), + array('data' => t('Enabled'), 'class' => array('checkbox')), + array('data' => t('Show as expanded'), 'class' => array('checkbox')), t('Weight'), array('data' => t('Operations'), 'colspan' => '3'), ); @@ -208,22 +208,22 @@ function theme_menu_overview_form($form) } // Add special classes to be used for tabledrag.js. - $element['plid']['#attributes']['class'] = 'menu-plid'; - $element['mlid']['#attributes']['class'] = 'menu-mlid'; - $element['weight']['#attributes']['class'] = 'menu-weight'; + $element['plid']['#attributes']['class'] = array('menu-plid'); + $element['mlid']['#attributes']['class'] = array('menu-mlid'); + $element['weight']['#attributes']['class'] = array('menu-weight'); // Change the parent field to a hidden. This allows any value but hides the field. $element['plid']['#type'] = 'hidden'; $row = array(); $row[] = theme('indentation', $element['#item']['depth'] - 1) . drupal_render($element['title']); - $row[] = array('data' => drupal_render($element['hidden']), 'class' => 'checkbox'); - $row[] = array('data' => drupal_render($element['expanded']), 'class' => 'checkbox'); + $row[] = array('data' => drupal_render($element['hidden']), 'class' => array('checkbox')); + $row[] = array('data' => drupal_render($element['expanded']), 'class' => array('checkbox')); $row[] = drupal_render($element['weight']) . drupal_render($element['plid']) . drupal_render($element['mlid']); $row = array_merge($row, $operations); $row = array_merge(array('data' => $row), $element['#attributes']); - $row['class'] = !empty($row['class']) ? $row['class'] . ' draggable' : 'draggable'; + $row['class'][] = 'draggable'; $rows[] = $row; } } @@ -247,7 +247,7 @@ function menu_edit_item(&$form_state, $t '#collapsible' => FALSE, '#tree' => TRUE, '#weight' => -2, - '#attributes' => array('class' => 'menu-item-form'), + '#attributes' => array('class' => array('menu-item-form')), '#item' => $item, ); if ($type == 'add' || empty($item)) { @@ -329,7 +329,7 @@ function menu_edit_item(&$form_state, $t '#default_value' => $default, '#options' => $options, '#description' => t('The maximum depth for a link and all its children is fixed at !maxdepth. Some menu links may not be available as parents if selecting them would exceed this limit.', array('!maxdepth' => MENU_MAX_DEPTH)), - '#attributes' => array('class' => 'menu-title-select'), + '#attributes' => array('class' => array('menu-title-select')), ); $form['menu']['weight'] = array( '#type' => 'weight', Index: modules/menu/menu.module =================================================================== RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v retrieving revision 1.195 diff -u -p -r1.195 menu.module --- modules/menu/menu.module 20 Jul 2009 18:51:33 -0000 1.195 +++ modules/menu/menu.module 27 Jul 2009 21:39:26 -0000 @@ -405,7 +405,7 @@ function menu_form_alter(&$form, $form_s '#attached_js' => array(drupal_get_path('module', 'menu') . '/menu.js'), '#tree' => TRUE, '#weight' => -2, - '#attributes' => array('class' => 'menu-item-form'), + '#attributes' => array('class' => array('menu-item-form')), ); $item = $form['#node']->menu; @@ -443,7 +443,7 @@ function menu_form_alter(&$form, $form_s '#default_value' => $default, '#options' => $options, '#description' => t('The maximum depth for an item and all its children is fixed at !maxdepth. Some menu items may not be available as parents if selecting them would exceed this limit.', array('!maxdepth' => MENU_MAX_DEPTH)), - '#attributes' => array('class' => 'menu-title-select'), + '#attributes' => array('class' => array('menu-title-select')), ); $form['#submit'][] = 'menu_node_form_submit'; Index: modules/node/content_types.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v retrieving revision 1.83 diff -u -p -r1.83 content_types.inc --- modules/node/content_types.inc 27 Jul 2009 19:26:31 -0000 1.83 +++ modules/node/content_types.inc 27 Jul 2009 21:39:26 -0000 @@ -35,7 +35,7 @@ function node_overview_types() { } if (empty($rows)) { - $rows[] = array(array('data' => t('No content types available. Add content type.', array('@link' => url('admin/structure/types/add'))), 'colspan' => '5', 'class' => 'message')); + $rows[] = array(array('data' => t('No content types available. Add content type.', array('@link' => url('admin/structure/types/add'))), 'colspan' => '5', 'class' => array('message'))); } return theme('table', $header, $rows); Index: modules/node/node.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v retrieving revision 1.59 diff -u -p -r1.59 node.admin.inc --- modules/node/node.admin.inc 21 Jul 2009 01:36:51 -0000 1.59 +++ modules/node/node.admin.inc 27 Jul 2009 21:39:26 -0000 @@ -376,7 +376,7 @@ function node_admin_content($form_state) if (_node_add_access()) { $form['add_content'] = array( '#type' => 'markup', - '#markup' => l(t('Add new content'), 'node/add', array('attributes' => array('class' => 'node-admin-add-content'))), + '#markup' => l(t('Add new content'), 'node/add', array('attributes' => array('class' => array('node-admin-add-content')))), ); } $form[] = node_filter_form(); Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.1086 diff -u -p -r1.1086 node.module --- modules/node/node.module 27 Jul 2009 19:26:31 -0000 1.1086 +++ modules/node/node.module 27 Jul 2009 21:39:27 -0000 @@ -1154,7 +1154,7 @@ function node_build_content($node, $buil $node->content['links']['node'] = array( '#theme' => 'links', '#links' => $links, - '#attributes' => array('class' => 'links inline'), + '#attributes' => array('class' => array('links', 'inline')), ); // Allow modules to make their own additions to the node. @@ -2079,7 +2079,7 @@ function node_form_search_form_alter(&$f '#title' => t('Advanced search'), '#collapsible' => TRUE, '#collapsed' => TRUE, - '#attributes' => array('class' => 'search-advanced'), + '#attributes' => array('class' => array('search-advanced')), ); $form['advanced']['keywords'] = array( '#prefix' => '
', Index: modules/node/node.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v retrieving revision 1.71 diff -u -p -r1.71 node.pages.inc --- modules/node/node.pages.inc 20 Jul 2009 22:18:53 -0000 1.71 +++ modules/node/node.pages.inc 27 Jul 2009 21:39:27 -0000 @@ -497,8 +497,8 @@ function node_revision_overview($node) { if ($revision->current_vid > 0) { $row[] = array('data' => t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid"), '!username' => theme('username', $revision))) . (($revision->log != '') ? '

' . filter_xss($revision->log) . '

' : ''), - 'class' => 'revision-current'); - $operations[] = array('data' => theme('placeholder', t('current revision')), 'class' => 'revision-current', 'colspan' => 2); + 'class' => array('revision-current')); + $operations[] = array('data' => theme('placeholder', t('current revision')), 'class' => array('revision-current'), 'colspan' => 2); } else { $row[] = t('!date by !username', array('!date' => l(format_date($revision->timestamp, 'small'), "node/$node->nid/revisions/$revision->vid/view"), '!username' => theme('username', $revision))) Index: modules/openid/openid.module =================================================================== RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v retrieving revision 1.51 diff -u -p -r1.51 openid.module --- modules/openid/openid.module 30 Jun 2009 11:32:08 -0000 1.51 +++ modules/openid/openid.module 27 Jul 2009 21:39:27 -0000 @@ -96,11 +96,11 @@ function _openid_user_login_form_alter(& $items = array(); $items[] = array( 'data' => l(t('Log in using OpenID'), '#'), - 'class' => 'openid-link', + 'class' => array('openid-link'), ); $items[] = array( 'data' => l(t('Cancel OpenID login'), '#'), - 'class' => 'user-link', + 'class' => array('user-link'), ); $form['openid_links'] = array( Index: modules/path/path.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v retrieving revision 1.26 diff -u -p -r1.26 path.admin.inc --- modules/path/path.admin.inc 8 Jul 2009 07:26:31 -0000 1.26 +++ modules/path/path.admin.inc 27 Jul 2009 21:39:27 -0000 @@ -42,9 +42,6 @@ function path_admin_overview($keys = NUL $destination = drupal_get_destination(); foreach ($result as $data) { $row = array( - // If the system path maps to a different URL alias, highlight this table - // row to let the user know of old aliases. - 'class' => ($data->dst != drupal_get_path_alias($data->src, $data->language) ? 'warning' : NULL), 'data' => array( l($data->dst, $data->src), l($data->src, $data->src, array('alias' => TRUE)), @@ -52,6 +49,11 @@ function path_admin_overview($keys = NUL l(t('delete'), "admin/settings/path/delete/$data->pid", array('query' => $destination)), ), ); + // If the system path maps to a different URL alias, highlight this table + // row to let the user know of old aliases. + if ($data->dst != drupal_get_path_alias($data->src, $data->language)) { + $row['class'] = array('warning'); + } if ($multilanguage) { array_splice($row['data'], 2, 0, module_invoke('locale', 'language_name', $data->language)); } @@ -204,7 +206,7 @@ function path_admin_delete_confirm_submi * @see path_admin_filter_form_submit() */ function path_admin_filter_form(&$form_state, $keys = '') { - $form['#attributes'] = array('class' => 'search-form'); + $form['#attributes'] = array('class' => array('search-form')); $form['basic'] = array('#type' => 'fieldset', '#title' => t('Filter aliases') ); Index: modules/poll/poll.module =================================================================== RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v retrieving revision 1.301 diff -u -p -r1.301 poll.module --- modules/poll/poll.module 5 Jul 2009 18:00:09 -0000 1.301 +++ modules/poll/poll.module 27 Jul 2009 21:39:27 -0000 @@ -755,21 +755,23 @@ function theme_poll_choices($form) { foreach (element_children($form) as $key) { $delta++; // Set special classes for drag and drop updating. - $form[$key]['weight']['#attributes']['class'] = 'poll-weight'; + $form[$key]['weight']['#attributes']['class'] = array('poll-weight'); // Build the table row. $row = array( 'data' => array( - array('class' => 'choice-flag'), + array('class' => array('choice-flag')), drupal_render($form[$key]['chtext']), drupal_render($form[$key]['chvotes']), drupal_render($form[$key]['weight']), ), - 'class' => 'draggable', + 'class' => array('draggable'), ); // Add any additional classes set on the row. - $row['class'] .= isset($form[$key]['#attributes']['class']) ? ' ' . $form[$key]['#attributes']['class'] : ''; + if (!empty($form[$key]['#attributes']['class'])) { + $row['class'] = array_merge($row['class'], $form[$key]['#attributes']['class']); + } $rows[] = $row; } Index: modules/profile/profile.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v retrieving revision 1.25 diff -u -p -r1.25 profile.admin.inc --- modules/profile/profile.admin.inc 26 May 2009 10:41:06 -0000 1.25 +++ modules/profile/profile.admin.inc 27 Jul 2009 21:39:27 -0000 @@ -116,9 +116,9 @@ function theme_profile_admin_overview($f // Category classes are given numeric IDs because there's no guarantee // class names won't contain invalid characters. $categories[$category] = $category_number; - $category_field['#attributes']['class'] = 'profile-category profile-category-' . $category_number; - $rows[] = array(array('data' => $category, 'colspan' => 7, 'class' => 'category')); - $rows[] = array('data' => array(array('data' => '' . t('No fields in this category. If this category remains empty when saved, it will be removed.') . '', 'colspan' => 7)), 'class' => 'category-' . $category_number . '-message category-message category-populated'); + $category_field['#attributes']['class'] = array('profile-category', 'profile-category-' . $category_number); + $rows[] = array(array('data' => $category, 'colspan' => 7, 'class' => array('category'))); + $rows[] = array('data' => array(array('data' => '' . t('No fields in this category. If this category remains empty when saved, it will be removed.') . '', 'colspan' => 7)), 'class' => array('category-' . $category_number . '-message', 'category-message', 'category-populated')); // Make it draggable only if there is more than one field if (isset($form['submit'])) { @@ -129,8 +129,8 @@ function theme_profile_admin_overview($f } // Add special drag and drop classes that group fields together. - $field['weight']['#attributes']['class'] = 'profile-weight profile-weight-' . $categories[$category]; - $field['category']['#attributes']['class'] = 'profile-category profile-category-' . $categories[$category]; + $field['weight']['#attributes']['class'] = array('profile-weight', 'profile-weight-' . $categories[$category]); + $field['category']['#attributes']['class'] = array('profile-category', 'profile-category-' . $categories[$category]); // Add the row $row = array(); @@ -143,7 +143,7 @@ function theme_profile_admin_overview($f } $row[] = drupal_render($field['edit']); $row[] = drupal_render($field['delete']); - $rows[] = array('data' => $row, 'class' => 'draggable'); + $rows[] = array('data' => $row, 'class' => array('draggable')); } } if (empty($rows)) { Index: modules/profile/profile.module =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v retrieving revision 1.261 diff -u -p -r1.261 profile.module --- modules/profile/profile.module 3 Jun 2009 07:28:28 -0000 1.261 +++ modules/profile/profile.module 15 Jul 2009 22:38:29 -0000 @@ -365,7 +365,7 @@ function profile_view_profile(&$user) { '#title' => $title, '#markup' => $value, '#weight' => $field->weight, - '#attributes' => array('class' => 'profile-' . $field->name), + '#attributes' => array('class' => array('profile-' . $field->name)), ); } } Index: modules/statistics/statistics.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v retrieving revision 1.25 diff -u -p -r1.25 statistics.admin.inc --- modules/statistics/statistics.admin.inc 24 May 2009 17:39:34 -0000 1.25 +++ modules/statistics/statistics.admin.inc 15 Jul 2009 22:38:29 -0000 @@ -29,7 +29,7 @@ function statistics_recent_hits() { $rows = array(); foreach ($result as $log) { $rows[] = array( - array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'), + array('data' => format_date($log->timestamp, 'small'), 'class' => array('nowrap')), _statistics_format_item($log->title, $log->path), theme('username', $log), l(t('details'), "admin/reports/access/$log->aid")); Index: modules/statistics/statistics.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v retrieving revision 1.13 diff -u -p -r1.13 statistics.pages.inc --- modules/statistics/statistics.pages.inc 22 May 2009 11:33:18 -0000 1.13 +++ modules/statistics/statistics.pages.inc 15 Jul 2009 22:38:29 -0000 @@ -31,7 +31,7 @@ function statistics_node_tracker() { $rows = array(); foreach ($result as $log) { $rows[] = array( - array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'), + array('data' => format_date($log->timestamp, 'small'), 'class' => array('nowrap')), _statistics_link($log->url), theme('username', $log), l(t('details'), "admin/reports/access/$log->aid"), @@ -70,7 +70,7 @@ function statistics_user_tracker() { $rows = array(); foreach ($result as $log) { $rows[] = array( - array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'), + array('data' => format_date($log->timestamp, 'small'), 'class' => array('nowrap')), _statistics_format_item($log->title, $log->path), l(t('details'), "admin/reports/access/$log->aid")); } Index: modules/update/update.api.php =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.api.php,v retrieving revision 1.3 diff -u -p -r1.3 update.api.php --- modules/update/update.api.php 5 Jun 2009 01:04:11 -0000 1.3 +++ modules/update/update.api.php 15 Jul 2009 22:38:29 -0000 @@ -95,7 +95,7 @@ function hook_update_status_alter(&$proj $projects[$project]['reason'] = t('Ignored from settings'); if (!empty($settings[$project]['notes'])) { $projects[$project]['extra'][] = array( - 'class' => 'admin-note', + 'class' => array('admin-note'), 'label' => t('Administrator note'), 'data' => $settings[$project]['notes'], ); Index: modules/update/update.compare.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.compare.inc,v retrieving revision 1.23 diff -u -p -r1.23 update.compare.inc --- modules/update/update.compare.inc 13 Jun 2009 11:27:35 -0000 1.23 +++ modules/update/update.compare.inc 15 Jul 2009 22:38:29 -0000 @@ -275,7 +275,7 @@ function update_calculate_project_data($ $projects[$project]['extra'] = array(); } $projects[$project]['extra'][] = array( - 'class' => 'project-not-secure', + 'class' => array('project-not-secure'), 'label' => t('Project not secure'), 'data' => t('This project has been labeled insecure by the Drupal security team, and is no longer available for download. Immediately disabling everything included by this project is strongly recommended!'), ); @@ -287,7 +287,7 @@ function update_calculate_project_data($ $projects[$project]['extra'] = array(); } $projects[$project]['extra'][] = array( - 'class' => 'project-revoked', + 'class' => array('project-revoked'), 'label' => t('Project revoked'), 'data' => t('This project has been revoked, and is no longer available for download. Disabling everything included by this project is strongly recommended!'), ); @@ -298,7 +298,7 @@ function update_calculate_project_data($ $projects[$project]['extra'] = array(); } $projects[$project]['extra'][] = array( - 'class' => 'project-not-supported', + 'class' => array('project-not-supported'), 'label' => t('Project not supported'), 'data' => t('This project is no longer supported, and is no longer available for download. Disabling everything included by this project is strongly recommended!'), ); @@ -387,7 +387,7 @@ function update_calculate_project_data($ $projects[$project]['extra'] = array(); } $projects[$project]['extra'][] = array( - 'class' => 'release-revoked', + 'class' => array('release-revoked'), 'label' => t('Release revoked'), 'data' => t('Your currently installed release has been revoked, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!'), ); @@ -399,7 +399,7 @@ function update_calculate_project_data($ $projects[$project]['extra'] = array(); } $projects[$project]['extra'][] = array( - 'class' => 'release-not-supported', + 'class' => array('release-not-supported'), 'label' => t('Release not supported'), 'data' => t('Your currently installed release is now unsupported, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!'), ); Index: modules/update/update.module =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.module,v retrieving revision 1.37 diff -u -p -r1.37 update.module --- modules/update/update.module 8 Jun 2009 05:00:11 -0000 1.37 +++ modules/update/update.module 15 Jul 2009 22:38:29 -0000 @@ -162,7 +162,7 @@ function update_theme() { 'arguments' => array('data' => NULL), ), 'update_version' => array( - 'arguments' => array('version' => NULL, 'tag' => NULL, 'class' => NULL), + 'arguments' => array('version' => NULL, 'tag' => NULL, 'class' => array()), ), ); } Index: modules/update/update.report.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/update/update.report.inc,v retrieving revision 1.18 diff -u -p -r1.18 update.report.inc --- modules/update/update.report.inc 6 Jun 2009 06:26:13 -0000 1.18 +++ modules/update/update.report.inc 15 Jul 2009 22:38:29 -0000 @@ -121,8 +121,8 @@ function theme_update_report($data) { $security_class = ' version-recommended version-recommended-strong'; } else { - $security_class = ''; - $version_class = 'version-recommended'; + $security_class = array(); + $version_class[] = 'version-recommended'; // Apply an extra class if we're displaying both a recommended // version and anything else for an extra visual hint. if ($project['recommended'] !== $project['latest_version'] @@ -134,7 +134,7 @@ function theme_update_report($data) { || (isset($project['security updates'][0]) && $project['recommended'] !== $project['security updates'][0]) ) { - $version_class .= ' version-recommended-strong'; + $version_class[] = 'version-recommended-strong'; } $row .= theme('update_version', $project['releases'][$project['recommended']], t('Recommended version:'), $version_class); } @@ -148,19 +148,19 @@ function theme_update_report($data) { } if ($project['recommended'] !== $project['latest_version']) { - $row .= theme('update_version', $project['releases'][$project['latest_version']], t('Latest version:'), 'version-latest'); + $row .= theme('update_version', $project['releases'][$project['latest_version']], t('Latest version:'), array('version-latest')); } if ($project['install_type'] == 'dev' && $project['status'] != UPDATE_CURRENT && isset($project['dev_version']) && $project['recommended'] !== $project['dev_version']) { - $row .= theme('update_version', $project['releases'][$project['dev_version']], t('Development version:'), 'version-latest'); + $row .= theme('update_version', $project['releases'][$project['dev_version']], t('Development version:'), array('version-latest')); } } if (isset($project['also'])) { foreach ($project['also'] as $also) { - $row .= theme('update_version', $project['releases'][$also], t('Also available:'), 'version-also-available'); + $row .= theme('update_version', $project['releases'][$also], t('Also available:'), array('version-also-available')); } } @@ -189,7 +189,7 @@ function theme_update_report($data) { $rows[$project['project_type']] = array(); } $rows[$project['project_type']][] = array( - 'class' => $class, + 'class' => array($class), 'data' => array($row), ); } @@ -204,7 +204,7 @@ function theme_update_report($data) { foreach ($project_types as $type_name => $type_label) { if (!empty($rows[$type_name])) { $output .= "\n

" . $type_label . "

\n"; - $output .= theme('table', $header, $rows[$type_name], array('class' => 'update')); + $output .= theme('table', $header, $rows[$type_name], array('class' => array('update'))); } } drupal_add_css(drupal_get_path('module', 'update') . '/update.css');