summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-22 14:34:23 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-22 14:34:23 +0000
commit36ec18969549ff173b45ae35577e035c2c19f641 (patch)
tree8a73f48534a188f946e6edf5ecad90f837ce3d84 /modules
parent73a72337bb4c296211c5cb728b027ad0fefa85ed (diff)
downloadbrdo-36ec18969549ff173b45ae35577e035c2c19f641.tar.gz
brdo-36ec18969549ff173b45ae35577e035c2c19f641.tar.bz2
#326539 by JohnAlbin, sun, cha0s, ultimateboy, Rob Loach, Damien Tournoud: Convert 'class' attribute to use an array, not a string.
Diffstat (limited to 'modules')
-rw-r--r--modules/aggregator/aggregator.admin.inc4
-rw-r--r--modules/aggregator/aggregator.pages.inc2
-rw-r--r--modules/block/block.admin.inc8
-rw-r--r--modules/blog/blog.module4
-rw-r--r--modules/book/book.admin.inc8
-rw-r--r--modules/book/book.module10
-rw-r--r--modules/book/book.test6
-rw-r--r--modules/color/color.module2
-rw-r--r--modules/comment/comment.module4
-rw-r--r--modules/dblog/dblog.admin.inc4
-rw-r--r--modules/field/field.form.inc14
-rw-r--r--modules/field/modules/number/number.module4
-rw-r--r--modules/field/modules/text/text.module4
-rw-r--r--modules/field_ui/field_ui.admin.inc16
-rw-r--r--modules/filter/filter.admin.inc8
-rw-r--r--modules/filter/filter.module18
-rw-r--r--modules/image/image.admin.inc10
-rw-r--r--modules/locale/locale.api.php2
-rw-r--r--modules/locale/locale.module2
-rw-r--r--modules/menu/menu.admin.inc22
-rw-r--r--modules/menu/menu.module4
-rw-r--r--modules/node/content_types.inc2
-rw-r--r--modules/node/node.admin.inc4
-rw-r--r--modules/node/node.module4
-rw-r--r--modules/node/node.pages.inc4
-rw-r--r--modules/openid/openid.module4
-rw-r--r--modules/path/path.admin.inc10
-rw-r--r--modules/poll/poll.module10
-rw-r--r--modules/profile/profile.admin.inc12
-rw-r--r--modules/profile/profile.module2
-rw-r--r--modules/search/search.module2
-rw-r--r--modules/simpletest/simpletest.pages.inc14
-rw-r--r--modules/statistics/statistics.admin.inc2
-rw-r--r--modules/statistics/statistics.module2
-rw-r--r--modules/statistics/statistics.pages.inc4
-rw-r--r--modules/system/page.tpl.php4
-rw-r--r--modules/system/system.admin.inc28
-rw-r--r--modules/system/system.module6
-rw-r--r--modules/taxonomy/taxonomy.admin.inc23
-rw-r--r--modules/taxonomy/taxonomy.module4
-rw-r--r--modules/toolbar/toolbar.module2
-rw-r--r--modules/tracker/tracker.pages.inc2
-rw-r--r--modules/translation/translation.module4
-rw-r--r--modules/update/update.api.php2
-rw-r--r--modules/update/update.compare.inc10
-rw-r--r--modules/update/update.module2
-rw-r--r--modules/update/update.report.inc18
-rw-r--r--modules/upload/upload.module8
-rw-r--r--modules/user/user.admin.inc8
-rw-r--r--modules/user/user.api.php2
-rw-r--r--modules/user/user.module4
51 files changed, 181 insertions, 178 deletions
diff --git a/modules/aggregator/aggregator.admin.inc b/modules/aggregator/aggregator.admin.inc
index 2c971fd14..b6361aba6 100644
--- a/modules/aggregator/aggregator.admin.inc
+++ b/modules/aggregator/aggregator.admin.inc
@@ -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/settings/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/settings/aggregator/remove/$feed->fid"), l(t('update items'), "admin/settings/aggregator/update/$feed->fid"));
}
if (empty($rows)) {
- $rows[] = array(array('data' => t('No feeds available. <a href="@link">Add feed</a>.', array('@link' => url('admin/settings/aggregator/add/feed'))), 'colspan' => '5', 'class' => 'message'));
+ $rows[] = array(array('data' => t('No feeds available. <a href="@link">Add feed</a>.', 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/settings/aggregator/edit/category/$category->cid"));
}
if (empty($rows)) {
- $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/settings/aggregator/add/category'))), 'colspan' => '5', 'class' => 'message'));
+ $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/content/aggregator/add/category'))), 'colspan' => '5', 'class' => array('message')));
}
$output .= theme('table', $header, $rows);
diff --git a/modules/aggregator/aggregator.pages.inc b/modules/aggregator/aggregator.pages.inc
index 29996e5b9..463872c10 100644
--- a/modules/aggregator/aggregator.pages.inc
+++ b/modules/aggregator/aggregator.pages.inc
@@ -242,7 +242,7 @@ function theme_aggregator_categorize_items($form) {
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')),
);
}
}
diff --git a/modules/block/block.admin.inc b/modules/block/block.admin.inc
index 436ca29b3..ddf9a8d4b 100644
--- a/modules/block/block.admin.inc
+++ b/modules/block/block.admin.inc
@@ -515,12 +515,12 @@ function template_preprocess_block_admin_display_form(&$variables) {
$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']);
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 9ca7ff9af..1c43261a1 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -28,7 +28,7 @@ function blog_user_view($account) {
'#type' => 'user_profile_item',
'#title' => t('Blog'),
'#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $account->name))))),
- '#attributes' => array('class' => 'blog'),
+ '#attributes' => array('class' => array('blog')),
);
}
}
@@ -79,7 +79,7 @@ function blog_node_view($node, $build_mode = 'full') {
$node->content['links']['blog'] = array(
'#theme' => 'links',
'#links' => $links,
- '#attributes' => array('class' => 'links inline'),
+ '#attributes' => array('class' => array('links', 'inline')),
);
}
}
diff --git a/modules/book/book.admin.inc b/modules/book/book.admin.inc
index 1205a1a3b..8af9b195c 100644
--- a/modules/book/book.admin.inc
+++ b/modules/book/book.admin.inc
@@ -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;
}
diff --git a/modules/book/book.module b/modules/book/book.module
index 3b5e88868..4e5ac9597 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -91,7 +91,7 @@ function book_node_view_link($node, $build_mode) {
$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 = '', $edit = array()) {
* @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, $node) {
'#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, $node) {
'#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')),
'#ajax' => array(
'path' => 'book/js/form',
'wrapper' => 'edit-book-plid-wrapper',
diff --git a/modules/book/book.test b/modules/book/book.test
index b577cf05d..bfb093f02 100644
--- a/modules/book/book.test
+++ b/modules/book/book.test
@@ -110,15 +110,15 @@ class BookTestCase extends DrupalWebTestCase {
// 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.
diff --git a/modules/color/color.module b/modules/color/color.module
index 691025289..d3ddeadc1 100644
--- a/modules/color/color.module
+++ b/modules/color/color.module
@@ -60,7 +60,7 @@ function _color_theme_select_form_alter(&$form, &$form_state) {
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);
}
}
}
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index b06b186a4..41c621945 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -552,7 +552,7 @@ function comment_node_view($node, $build_mode) {
$node->content['links']['comment'] = array(
'#theme' => 'links',
'#links' => $links,
- '#attributes' => array('class' => 'links inline'),
+ '#attributes' => array('class' => array('links', 'inline')),
);
// Only append comments when we are building a node on its own node detail
@@ -825,7 +825,7 @@ function comment_build_content($comment, $build_mode = 'full') {
$comment->content['links']['comment'] = array(
'#theme' => 'links',
'#links' => comment_links($comment),
- '#attributes' => array('class' => 'links inline'),
+ '#attributes' => array('class' => array('links', 'inline')),
);
}
diff --git a/modules/dblog/dblog.admin.inc b/modules/dblog/dblog.admin.inc
index 43bb48d34..9623cc1e8 100644
--- a/modules/dblog/dblog.admin.inc
+++ b/modules/dblog/dblog.admin.inc
@@ -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]),
);
}
@@ -196,7 +196,7 @@ function dblog_event($id) {
$build['dblog_table'] = array(
'#theme' => 'table',
'#rows' => $rows,
- '#attributes' => array('class' => 'dblog-event'),
+ '#attributes' => array('class' => array('dblog-event')),
);
return $build;
}
diff --git a/modules/field/field.form.inc b/modules/field/field.form.inc
index 17d79a7a7..088642daf 100644
--- a/modules/field/field.form.inc
+++ b/modules/field/field.form.inc
@@ -209,7 +209,7 @@ function field_multiple_value_form($field, $instance, $langcode, $items, &$form,
// 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')),
'#language' => $langcode,
);
}
@@ -236,7 +236,7 @@ function theme_field_multiple_value_form($element) {
array(
'data' => '<label>' . t('!title: !required', array('!title' => $element['#title'], '!required' => $required)) . "</label>",
'colspan' => 2,
- 'class' => 'field-label',
+ 'class' => array('field-label'),
),
t('Order'),
);
@@ -257,21 +257,21 @@ function theme_field_multiple_value_form($element) {
// 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 = '<div class="form-item">';
- $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'] ? '<div class="description">' . $element['#description'] . '</div>' : '';
$output .= '<div class="clearfix">' . drupal_render($add_more_button) . '</div>';
$output .= '</div>';
diff --git a/modules/field/modules/number/number.module b/modules/field/modules/number/number.module
index b956a9e77..58eb3802e 100644
--- a/modules/field/modules/number/number.module
+++ b/modules/field/modules/number/number.module
@@ -377,7 +377,7 @@ function number_elements_process($element, $form_state, $form) {
// 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'],
@@ -497,4 +497,4 @@ function number_decimal_validate($element, &$form_state) {
*/
function theme_number($element) {
return $element['#children'];
-} \ No newline at end of file
+}
diff --git a/modules/field/modules/text/text.module b/modules/field/modules/text/text.module
index b1d287e32..bfb398f4c 100644
--- a/modules/field/modules/text/text.module
+++ b/modules/field/modules/text/text.module
@@ -658,7 +658,7 @@ function text_textfield_elements_process($element, $form_state, $form) {
'#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'],
@@ -803,7 +803,7 @@ function theme_text_textarea_with_summary($element) {
$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);
diff --git a/modules/field_ui/field_ui.admin.inc b/modules/field_ui/field_ui.admin.inc
index 45d36e857..eec5cb525 100644
--- a/modules/field_ui/field_ui.admin.inc
+++ b/modules/field_ui/field_ui.admin.inc
@@ -22,7 +22,7 @@ function field_ui_fields_list() {
$rows[$field_name]['data'][0] = $field['locked'] ? t('@field_name (Locked)', array('@field_name' => $field_name)) : $field_name;
$rows[$field_name]['data'][1] = t($field_types[$field['type']]['label']);
$rows[$field_name]['data'][2][] = l($bundles[$bundle]['label'], $admin_path . '/fields');
- $rows[$field_name]['class'] = $field['locked'] ? 'menu-disabled' : '';
+ $rows[$field_name]['class'] = $field['locked'] ? array('menu-disabled') : array('');
}
}
foreach ($rows as $field_name => $cell) {
@@ -298,19 +298,19 @@ function template_preprocess_field_ui_field_overview_form(&$vars) {
$row = new stdClass();
// Add target classes for the tabledrag behavior.
- $element['weight']['#attributes']['class'] = 'field-weight';
- $element['hidden_name']['#attributes']['class'] = 'field-name';
+ $element['weight']['#attributes']['class'][] = 'field-weight';
+ $element['hidden_name']['#attributes']['class'][] = 'field-name';
// Add target classes for the update selects behavior.
switch ($element['#row_type']) {
case 'add_new_field':
- $element['type']['#attributes']['class'] = 'field-type-select';
- $element['widget_type']['#attributes']['class'] = 'widget-type-select';
+ $element['type']['#attributes']['class'][] = 'field-type-select';
+ $element['widget_type']['#attributes']['class'][] = 'widget-type-select';
break;
case 'add_existing_field':
- $element['field_name']['#attributes']['class'] = 'field-select';
- $element['widget_type']['#attributes']['class'] = 'widget-type-select';
- $element['label']['#attributes']['class'] = 'label-textfield';
+ $element['field_name']['#attributes']['class'][] = 'field-select';
+ $element['widget_type']['#attributes']['class'][] = 'widget-type-select';
+ $element['label']['#attributes']['class'][] = 'label-textfield';
break;
}
foreach (element_children($element) as $child) {
diff --git a/modules/filter/filter.admin.inc b/modules/filter/filter.admin.inc
index 096520e70..f827218a1 100644
--- a/modules/filter/filter.admin.inc
+++ b/modules/filter/filter.admin.inc
@@ -69,7 +69,7 @@ function theme_filter_admin_overview($form) {
foreach (element_children($form) as $id) {
$element = $form[$id];
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']),
@@ -79,7 +79,7 @@ function theme_filter_admin_overview($form) {
drupal_render($element['configure']),
drupal_render($element['delete']),
),
- 'class' => 'draggable',
+ 'class' => array('draggable'),
);
unset($form[$id]);
}
@@ -419,10 +419,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'),
);
}
}
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index ddefa3cb5..f347fcc32 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -224,15 +224,15 @@ function _filter_html_tips($format, $long = FALSE) {
if (array_key_exists($tag, $tips)) {
if ($tips[$tag]) {
$rows[] = array(
- array('data' => $tips[$tag][0], 'class' => 'description'),
- array('data' => '<code>' . check_plain($tips[$tag][1]) . '</code>', 'class' => 'type'),
- array('data' => $tips[$tag][1], 'class' => 'get')
+ array('data' => $tips[$tag][0], 'class' => array('description')),
+ array('data' => '<code>' . check_plain($tips[$tag][1]) . '</code>', '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),
);
}
}
@@ -251,9 +251,9 @@ function _filter_html_tips($format, $long = FALSE) {
unset($rows);
foreach ($entities as $entity) {
$rows[] = array(
- array('data' => $entity[0], 'class' => 'description'),
- array('data' => '<code>' . check_plain($entity[1]) . '</code>', 'class' => 'type'),
- array('data' => $entity[1], 'class' => 'get')
+ array('data' => $entity[0], 'class' => array('description')),
+ array('data' => '<code>' . check_plain($entity[1]) . '</code>', 'class' => array('type')),
+ array('data' => $entity[1], 'class' => array('get'))
);
}
$output .= theme('table', $header, $rows);
@@ -495,7 +495,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = NULL, $parents =
$form = array(
'#type' => 'fieldset',
'#weight' => $weight,
- '#attributes' => array('class' => 'filter-wrapper'),
+ '#attributes' => array('class' => array('filter-wrapper')),
);
$form['format_guidelines'] = array(
'#prefix' => '<div id="' . $element_id . '-guidelines" class="filter-guidelines">',
@@ -516,7 +516,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = NULL, $parents =
'#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' => '<div id="' . $element_id . '-help" class="filter-help">',
diff --git a/modules/image/image.admin.inc b/modules/image/image.admin.inc
index 79279fcb2..996c14270 100644
--- a/modules/image/image.admin.inc
+++ b/modules/image/image.admin.inc
@@ -580,7 +580,7 @@ function theme_image_style_list($styles) {
$row[] = l($style['name'], 'admin/config/media/image-styles/edit/' . $style['name']);
$link_attributes = array(
'attributes' => array(
- 'class' => 'image-style-link',
+ 'class' => array('image-style-link'),
),
);
$row[] = l(t('edit'), 'admin/config/media/image-styles/edit/' . $style['name'], $link_attributes);
@@ -610,7 +610,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);
@@ -620,7 +620,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[] = '<div class="image-style-new">' . drupal_render($form['new']['new']) . drupal_render($form['new']['add']) . '</div>';
$row[] = drupal_render($form['new']['weight']);
@@ -629,7 +629,7 @@ function theme_image_style_effects($form) {
$rows[] = array(
'data' => $row,
- 'class' => 'draggable',
+ 'class' => array('draggable'),
);
}
@@ -743,7 +743,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')));
}
/**
diff --git a/modules/locale/locale.api.php b/modules/locale/locale.api.php
index 16f4d008c..5d0852b51 100644
--- a/modules/locale/locale.api.php
+++ b/modules/locale/locale.api.php
@@ -40,7 +40,7 @@ function hook_translation_link_alter(array &$links, $path) {
if (isset($links[$language])) {
foreach ($links[$language] as $link) {
- $link['attributes']['class'] .= ' active-language';
+ $link['attributes']['class'][] = 'active-language';
}
}
}
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index dc99bac25..77c85ea8f 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -632,7 +632,7 @@ function locale_block_view($delta = '') {
'href' => $path,
'title' => $language->native,
'language' => $language,
- 'attributes' => array('class' => 'language-link'),
+ 'attributes' => array('class' => array('language-link')),
);
}
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc
index 153e7cf66..0fb43aa67 100644
--- a/modules/menu/menu.admin.inc
+++ b/modules/menu/menu.admin.inc
@@ -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, $type, $item, $menu) {
'#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, $type, $item, $menu) {
'#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',
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index f8916ec90..3bab4280c 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -405,7 +405,7 @@ function menu_form_alter(&$form, $form_state, $form_id) {
'#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_state, $form_id) {
'#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';
diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc
index bd68d05e3..005603c06 100644
--- a/modules/node/content_types.inc
+++ b/modules/node/content_types.inc
@@ -35,7 +35,7 @@ function node_overview_types() {
}
if (empty($rows)) {
- $rows[] = array(array('data' => t('No content types available. <a href="@link">Add content type</a>.', array('@link' => url('admin/structure/types/add'))), 'colspan' => '5', 'class' => 'message'));
+ $rows[] = array(array('data' => t('No content types available. <a href="@link">Add content type</a>.', array('@link' => url('admin/structure/types/add'))), 'colspan' => '5', 'class' => array('message')));
}
$build['node_table'] = array(
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc
index 889a405ed..274a7d3a7 100644
--- a/modules/node/node.admin.inc
+++ b/modules/node/node.admin.inc
@@ -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();
@@ -599,4 +599,4 @@ function node_multiple_delete_confirm_submit($form, &$form_state) {
function node_modules_installed($modules) {
// Clear node type cache for node permissions.
node_type_clear();
-} \ No newline at end of file
+}
diff --git a/modules/node/node.module b/modules/node/node.module
index 64a324bac..5d5c0c12c 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1203,7 +1203,7 @@ function node_build_content($node, $build_mode = 'full') {
$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.
@@ -2116,7 +2116,7 @@ function node_form_search_form_alter(&$form, $form_state) {
'#title' => t('Advanced search'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
- '#attributes' => array('class' => 'search-advanced'),
+ '#attributes' => array('class' => array('search-advanced')),
);
$form['advanced']['keywords'] = array(
'#prefix' => '<div class="criterion">',
diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc
index df66459e6..46a07c1cd 100644
--- a/modules/node/node.pages.inc
+++ b/modules/node/node.pages.inc
@@ -502,8 +502,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 != '') ? '<p class="revision-log">' . filter_xss($revision->log) . '</p>' : ''),
- '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)))
diff --git a/modules/openid/openid.module b/modules/openid/openid.module
index 787e23bca..842606d7d 100644
--- a/modules/openid/openid.module
+++ b/modules/openid/openid.module
@@ -96,11 +96,11 @@ function _openid_user_login_form_alter(&$form, &$form_state) {
$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(
diff --git a/modules/path/path.admin.inc b/modules/path/path.admin.inc
index 2809b7090..4f65379a6 100644
--- a/modules/path/path.admin.inc
+++ b/modules/path/path.admin.inc
@@ -42,9 +42,6 @@ function path_admin_overview($keys = NULL) {
$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 = NULL) {
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));
}
@@ -208,7 +210,7 @@ function path_admin_delete_confirm_submit($form, &$form_state) {
* @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')
);
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index f8d3b37c0..84a84b0e0 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -758,21 +758,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;
}
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc
index 95b2c5a0a..f1bf2855c 100644
--- a/modules/profile/profile.admin.inc
+++ b/modules/profile/profile.admin.inc
@@ -116,9 +116,9 @@ function theme_profile_admin_overview($form) {
// 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' => '<em>' . t('No fields in this category. If this category remains empty when saved, it will be removed.') . '</em>', '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' => '<em>' . t('No fields in this category. If this category remains empty when saved, it will be removed.') . '</em>', '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($form) {
}
// 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($form) {
}
$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)) {
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 7fbd0952a..ea99c4dc2 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -351,7 +351,7 @@ function profile_user_view($account) {
'#title' => $title,
'#markup' => $value,
'#weight' => $field->weight,
- '#attributes' => array('class' => 'profile-' . $field->name),
+ '#attributes' => array('class' => array('profile-' . $field->name)),
);
}
}
diff --git a/modules/search/search.module b/modules/search/search.module
index 479010d97..e8d63ea96 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -1070,7 +1070,7 @@ function search_form(&$form_state, $action = '', $keys = '', $type = NULL, $prom
$form = array(
'#action' => $action,
- '#attributes' => array('class' => 'search-form'),
+ '#attributes' => array('class' => array('search-form')),
);
$form['module'] = array('#type' => 'value', '#value' => $type);
$form['basic'] = array('#type' => 'item', '#title' => $prompt, '#id' => 'edit-keys');
diff --git a/modules/simpletest/simpletest.pages.inc b/modules/simpletest/simpletest.pages.inc
index 04ab6fe22..4816cf74e 100644
--- a/modules/simpletest/simpletest.pages.inc
+++ b/modules/simpletest/simpletest.pages.inc
@@ -72,8 +72,8 @@ function theme_simpletest_test_table($table) {
// Create header for test selection table.
$header = array(
theme('table_select_header_cell'),
- array('data' => t('Test'), 'class' => 'simpletest_test'),
- array('data' => t('Description'), 'class' => 'simpletest_description'),
+ array('data' => t('Test'), 'class' => array('simpletest_test')),
+ array('data' => t('Description'), 'class' => array('simpletest_description')),
);
// Define the images used to expand/collapse the test groups.
@@ -100,7 +100,7 @@ function theme_simpletest_test_table($table) {
$image_index = $collapsed ? 0 : 1;
// Place-holder for checkboxes to select group of tests.
- $row[] = array('id' => $test_class, 'class' => 'simpletest-select-all');
+ $row[] = array('id' => $test_class, 'class' => array('simpletest-select-all'));
// Expand/collapse image and group title.
$row[] = array(
@@ -111,7 +111,7 @@ function theme_simpletest_test_table($table) {
$row[] = '&nbsp;';
- $rows[] = array('data' => $row, 'class' => 'simpletest-group');
+ $rows[] = array('data' => $row, 'class' => array('simpletest-group'));
// Add individual tests to group.
$current_js = array(
@@ -145,7 +145,7 @@ function theme_simpletest_test_table($table) {
$row[] = theme('indentation', 1) . '<label for="edit-' . $test_name . '">' . $title . '</label>';
$row[] = '<div class="description">' . $description . '</div>';
- $rows[] = array('data' => $row, 'class' => $test_class . '-test' . ($collapsed ? ' js-hide' : ''));
+ $rows[] = array('data' => $row, 'class' => array($test_class . '-test', ($collapsed ? 'js-hide' : '')));
}
$js['simpletest-test-group-' . $test_class] = $current_js;
unset($table[$key]);
@@ -259,7 +259,7 @@ function simpletest_result_form(&$form_state, $test_id) {
if ($assertion->message_group == 'Debug') {
$class = 'simpletest-debug';
}
- $rows[] = array('data' => $row, 'class' => $class);
+ $rows[] = array('data' => $row, 'class' => array($class));
$group_summary['#' . $assertion->status]++;
$form['result']['summary']['#' . $assertion->status]++;
@@ -286,7 +286,7 @@ function simpletest_result_form(&$form_state, $test_id) {
$form['action'] = array(
'#type' => 'fieldset',
'#title' => t('Actions'),
- '#attributes' => array('class' => 'container-inline'),
+ '#attributes' => array('class' => array('container-inline')),
'#weight' => -11,
);
diff --git a/modules/statistics/statistics.admin.inc b/modules/statistics/statistics.admin.inc
index 80ef997cf..bbf60ccda 100644
--- a/modules/statistics/statistics.admin.inc
+++ b/modules/statistics/statistics.admin.inc
@@ -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"));
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index 0463c0158..9194fcd49 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -116,7 +116,7 @@ function statistics_node_view($node, $build_mode) {
$node->content['links']['statistics'] = array(
'#theme' => 'links',
'#links' => $links,
- '#attributes' => array('class' => 'links inline'),
+ '#attributes' => array('class' => array('links', 'inline')),
);
}
}
diff --git a/modules/statistics/statistics.pages.inc b/modules/statistics/statistics.pages.inc
index d51da7456..1dcd3e0fa 100644
--- a/modules/statistics/statistics.pages.inc
+++ b/modules/statistics/statistics.pages.inc
@@ -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"),
@@ -74,7 +74,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"));
}
diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php
index ef8cfdf4a..39127200e 100644
--- a/modules/system/page.tpl.php
+++ b/modules/system/page.tpl.php
@@ -154,7 +154,7 @@
<?php if ($main_menu): ?>
<div id="navigation"><div class="section">
- <?php print theme('links', $main_menu, array('text' => t('Main menu'), 'level' => 'h2'), array('id' => 'main-menu', 'class' => 'links clearfix')); ?>
+ <?php print theme('links', $main_menu, array('text' => t('Main menu'), 'level' => 'h2'), array('id' => 'main-menu', 'class' => array('links clearfix'))); ?>
</div></div> <!-- /.section, /#navigation -->
<?php endif; ?>
@@ -192,7 +192,7 @@
</div></div> <!-- /#main, /#main-wrapper -->
<div id="footer"><div class="section">
- <?php print theme('links', $secondary_menu, array('text' => t('Secondary menu'), 'level' => 'h2'), array('id' => 'secondary-menu', 'class' => 'links clearfix')); ?>
+ <?php print theme('links', $secondary_menu, array('text' => t('Secondary menu'), 'level' => 'h2'), array('id' => 'secondary-menu', 'class' => array('links', 'clearfix'))); ?>
<?php if ($footer): ?><div id="footer-region" class="region"><?php print $footer; ?></div><?php endif; ?>
</div></div> <!-- /.section, /#footer -->
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 8b9a5dd7a..88c8f2f70 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -223,7 +223,7 @@ function system_themes_form() {
break;
}
}
- $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $theme->info['name'])), '', array('class' => 'screenshot'), FALSE) : t('no screenshot');
+ $screenshot = $screenshot ? theme('image', $screenshot, t('Screenshot for %theme theme', array('%theme' => $theme->info['name'])), '', array('class' => array('screenshot')), FALSE) : t('no screenshot');
$form[$theme->name]['screenshot'] = array('#markup' => $screenshot);
$form[$theme->name]['info'] = array(
@@ -479,7 +479,7 @@ function system_theme_settings(&$form_state, $key = '') {
'#type' => 'fieldset',
'#title' => t('Logo image settings'),
'#description' => t('If toggled on, the following logo will be displayed.'),
- '#attributes' => array('class' => 'theme-settings-bottom'),
+ '#attributes' => array('class' => array('theme-settings-bottom')),
);
$form['logo']['default_logo'] = array(
'#type' => 'checkbox',
@@ -720,7 +720,7 @@ function system_modules($form_state = array()) {
'#collapsible' => TRUE,
'#theme' => 'system_modules_fieldset',
'#header' => array(
- array('data' => t('Enabled'), 'class' => 'checkbox'),
+ array('data' => t('Enabled'), 'class' => array('checkbox')),
t('Name'),
t('Version'),
t('Description'),
@@ -1625,7 +1625,7 @@ function system_regional_settings() {
'#title' => t('Default country'),
'#default_value' => variable_get('site_default_country', ''),
'#options' => $countries,
- '#attributes' => array('class' => 'country-detect'),
+ '#attributes' => array('class' => array('country-detect')),
);
$form['locale']['date_first_day'] = array(
@@ -1690,7 +1690,7 @@ function system_regional_settings() {
'#suffix' => '</div>',
'#type' => 'select',
'#title' => t('Short date format'),
- '#attributes' => array('class' => 'date-format'),
+ '#attributes' => array('class' => array('date-format')),
'#default_value' => (isset($date_short_choices[$date_format_short]) ? $date_format_short : 'custom'),
'#options' => $date_short_choices,
);
@@ -1701,7 +1701,7 @@ function system_regional_settings() {
'#suffix' => '</div></div>',
'#type' => 'textfield',
'#title' => t('Custom short date format'),
- '#attributes' => array('class' => 'custom-format'),
+ '#attributes' => array('class' => array('custom-format')),
'#default_value' => $default_short_custom,
'#description' => t('A user-defined short date format. See the <a href="@url">PHP manual</a> for available options. This format is currently set to display as <span>%date</span>.', array('@url' => 'http://php.net/manual/function.date.php', '%date' => format_date(REQUEST_TIME, 'custom', $default_short_custom))),
);
@@ -1712,7 +1712,7 @@ function system_regional_settings() {
'#suffix' => '</div>',
'#type' => 'select',
'#title' => t('Medium date format'),
- '#attributes' => array('class' => 'date-format'),
+ '#attributes' => array('class' => array('date-format')),
'#default_value' => (isset($date_medium_choices[$date_format_medium]) ? $date_format_medium : 'custom'),
'#options' => $date_medium_choices,
);
@@ -1723,7 +1723,7 @@ function system_regional_settings() {
'#suffix' => '</div></div>',
'#type' => 'textfield',
'#title' => t('Custom medium date format'),
- '#attributes' => array('class' => 'custom-format'),
+ '#attributes' => array('class' => array('custom-format')),
'#default_value' => $default_medium_custom,
'#description' => t('A user-defined medium date format. See the <a href="@url">PHP manual</a> for available options. This format is currently set to display as <span>%date</span>.', array('@url' => 'http://php.net/manual/function.date.php', '%date' => format_date(REQUEST_TIME, 'custom', $default_medium_custom))),
);
@@ -1734,7 +1734,7 @@ function system_regional_settings() {
'#suffix' => '</div>',
'#type' => 'select',
'#title' => t('Long date format'),
- '#attributes' => array('class' => 'date-format'),
+ '#attributes' => array('class' => array('date-format')),
'#default_value' => (isset($date_long_choices[$date_format_long]) ? $date_format_long : 'custom'),
'#options' => $date_long_choices,
);
@@ -1745,7 +1745,7 @@ function system_regional_settings() {
'#suffix' => '</div></div>',
'#type' => 'textfield',
'#title' => t('Custom long date format'),
- '#attributes' => array('class' => 'custom-format'),
+ '#attributes' => array('class' => array('custom-format')),
'#default_value' => $default_long_custom,
'#description' => t('A user-defined long date format. See the <a href="@url">PHP manual</a> for available options. This format is currently set to display as <span>%date</span>.', array('@url' => 'http://php.net/manual/function.date.php', '%date' => format_date(REQUEST_TIME, 'custom', $default_long_custom))),
);
@@ -2140,7 +2140,7 @@ function theme_system_modules_fieldset($form) {
$module = $form[$key];
$row = array();
unset($module['enable']['#title']);
- $row[] = array('class' => 'checkbox', 'data' => drupal_render($module['enable']));
+ $row[] = array('class' => array('checkbox'), 'data' => drupal_render($module['enable']));
$label = '<label';
if (isset($module['enable']['#id'])) {
$label .= ' for="' . $module['enable']['#id'] . '"';
@@ -2161,7 +2161,7 @@ function theme_system_modules_fieldset($form) {
if ($module['#required_by']) {
$description .= '<div class="admin-requirements">' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '</div>';
}
- $row[] = array('data' => $description, 'class' => 'description');
+ $row[] = array('data' => $description, 'class' => array('description'));
$rows[] = $row;
}
@@ -2208,13 +2208,13 @@ function theme_system_modules_uninstall($form) {
$rows[] = array(
array('data' => drupal_render($form['uninstall'][$module]), 'align' => 'center'),
'<strong><label for="' . $form['uninstall'][$module]['#id'] . '">' . drupal_render($form['modules'][$module]['name']) . '</label></strong>',
- array('data' => drupal_render($form['modules'][$module]['description']), 'class' => 'description'),
+ array('data' => drupal_render($form['modules'][$module]['description']), 'class' => array('description')),
);
}
// Only display table if there are modules that can be uninstalled.
if (empty($rows)) {
- $rows[] = array(array('data' => t('No modules are available to uninstall.'), 'colspan' => '3', 'align' => 'center', 'class' => 'message'));
+ $rows[] = array(array('data' => t('No modules are available to uninstall.'), 'colspan' => '3', 'align' => 'center', 'class' => array('message')));
}
$output = theme('table', $header, $rows);
diff --git a/modules/system/system.module b/modules/system/system.module
index bd98c8606..5088b4cf8 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1468,7 +1468,7 @@ function system_user_timezone(&$edit, &$form) {
);
if (!$edit['timezone'] && $edit['uid'] == $user->uid) {
$form['timezone']['#description'] = t('Your time zone setting will be automatically detected if possible. Please confirm the selection and click save.');
- $form['timezone']['timezone']['#attributes'] = array('class' => 'timezone-detect');
+ $form['timezone']['timezone']['#attributes'] = array('class' => array('timezone-detect'));
drupal_add_js('misc/timezone.js');
}
}
@@ -1524,7 +1524,7 @@ function system_block_configure($delta = '') {
$form['wrapper']['preview'] = array(
'#type' => 'item',
'#title' => 'Preview',
- '#markup' => theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'), array('class' => 'powered-by-preview'), FALSE),
+ '#markup' => theme('image', $image_path, t('Powered by Drupal, an open source content management system'), t('Powered by Drupal, an open source content management system'), array('class' => array('powered-by-preview')), FALSE),
);
return $form;
}
@@ -2195,7 +2195,7 @@ function confirm_form($form, $question, $path, $description = NULL, $yes = NULL,
// Confirm form fails duplication check, as the form values rarely change -- so skip it.
$form['#skip_duplicate_check'] = TRUE;
- $form['#attributes'] = array('class' => 'confirmation');
+ $form['#attributes'] = array('class' => array('confirmation'));
$form['description'] = array('#markup' => $description);
$form[$name] = array('#type' => 'hidden', '#value' => 1);
diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc
index a3cf56644..dacdb4c06 100644
--- a/modules/taxonomy/taxonomy.admin.inc
+++ b/modules/taxonomy/taxonomy.admin.inc
@@ -73,13 +73,13 @@ function theme_taxonomy_overview_vocabularies($form) {
$row[] = drupal_render($vocabulary['name']);
$row[] = drupal_render($vocabulary['types']);
if (isset($vocabulary['weight'])) {
- $vocabulary['weight']['#attributes']['class'] = 'vocabulary-weight';
+ $vocabulary['weight']['#attributes']['class'] = array('vocabulary-weight');
$row[] = drupal_render($vocabulary['weight']);
}
$row[] = drupal_render($vocabulary['edit']);
$row[] = drupal_render($vocabulary['list']);
$row[] = drupal_render($vocabulary['add']);
- $rows[] = array('data' => $row, 'class' => 'draggable');
+ $rows[] = array('data' => $row, 'class' => array('draggable'));
}
}
@@ -601,9 +601,9 @@ function theme_taxonomy_overview_terms($form) {
$row = array();
$row[] = (isset($term['#term']['depth']) && $term['#term']['depth'] > 0 ? theme('indentation', $term['#term']['depth']) : '') . drupal_render($term['view']);
if ($form['#parent_fields']) {
- $term['tid']['#attributes']['class'] = 'term-id';
- $term['parent']['#attributes']['class'] = 'term-parent';
- $term['depth']['#attributes']['class'] = 'term-depth';
+ $term['tid']['#attributes']['class'] = array('term-id');
+ $term['parent']['#attributes']['class'] = array('term-parent');
+ $term['depth']['#attributes']['class'] = array('term-depth');
$row[0] .= drupal_render($term['parent']) . drupal_render($term['tid']) . drupal_render($term['depth']);
}
$row[] = drupal_render($term['edit']);
@@ -616,32 +616,31 @@ function theme_taxonomy_overview_terms($form) {
// Add necessary classes to rows.
$row_position = 0;
foreach ($rows as $key => $row) {
- $classes = array();
+ $rows[$key]['class'] = array();
if (isset($form['#parent_fields'])) {
- $classes[] = 'draggable';
+ $rows[$key]['class'][] = 'draggable';
}
// Add classes that mark which terms belong to previous and next pages.
if ($row_position < $back_peddle || $row_position >= $page_entries - $forward_peddle) {
- $classes[] = 'taxonomy-term-preview';
+ $rows[$key]['class'][] = 'taxonomy-term-preview';
}
if ($row_position !== 0 && $row_position !== count($rows) - 1) {
if ($row_position == $back_peddle - 1 || $row_position == $page_entries - $forward_peddle - 1) {
- $classes[] = 'taxonomy-term-divider-top';
+ $rows[$key]['class'][] = 'taxonomy-term-divider-top';
}
elseif ($row_position == $back_peddle || $row_position == $page_entries - $forward_peddle) {
- $classes[] = 'taxonomy-term-divider-bottom';
+ $rows[$key]['class'][] = 'taxonomy-term-divider-bottom';
}
}
// Add an error class if this row contains a form error.
foreach ($errors as $error_key => $error) {
if (strpos($error_key, $key) === 0) {
- $classes[] = 'error';
+ $rows[$key]['class'][] = 'error';
}
}
- $rows[$key]['class'] = implode(' ', $classes);
$row_position++;
}
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 36459f73b..254013eb8 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -163,7 +163,7 @@ function taxonomy_node_view($node, $build_mode) {
$node->content['links']['terms'] = array(
'#theme' => 'links',
'#links' => $links,
- '#attributes' => array('class' => 'links inline'),
+ '#attributes' => array('class' => array('links', 'inline')),
'#sorted' => TRUE,
);
}
@@ -2178,7 +2178,7 @@ function taxonomy_autocomplete_elements_process($element, &$form_state, $form) {
'#default_value' => $typed_string,
'#autocomplete_path' => 'taxonomy/autocomplete/'. $element['#field_name'] .'/'. $element['#bundle'],
'#size' => $instance['widget']['settings']['size'],
- '#attributes' => array('class' => 'text'),
+ '#attributes' => array('class' => array('text')),
'#title' => $element['#title'],
'#description' => $element['#description'],
'#required' => $element['#required'],
diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module
index 0ca9cf714..e650d8b15 100644
--- a/modules/toolbar/toolbar.module
+++ b/modules/toolbar/toolbar.module
@@ -146,7 +146,7 @@ function toolbar_menu_navigation_links($tree) {
// Add icon placeholder.
$link['title'] = '<span class="icon"></span>' . $item['link']['title'];
// Add admin link ID and to-overlay class for the overlay.
- $link['attributes'] = array('id' => 'toolbar-link-' . $id, 'class' => 'to-overlay');
+ $link['attributes'] = array('id' => 'toolbar-link-' . $id, 'class' => array('to-overlay'));
$link['html'] = TRUE;
$class = ' path-' . $id;
diff --git a/modules/tracker/tracker.pages.inc b/modules/tracker/tracker.pages.inc
index b97933233..07226b8a8 100644
--- a/modules/tracker/tracker.pages.inc
+++ b/modules/tracker/tracker.pages.inc
@@ -59,7 +59,7 @@ function tracker_page($account = NULL, $set_title = FALSE) {
check_plain(node_type_get_name($node->type)),
l($node->title, "node/$node->nid") . ' ' . theme('mark', node_mark($node->nid, $node->changed)),
theme('username', $node),
- array('class' => 'replies', 'data' => $comments),
+ array('class' => array('replies'), 'data' => $comments),
t('!time ago', array('!time' => format_interval(REQUEST_TIME - $node->last_updated)))
);
}
diff --git a/modules/translation/translation.module b/modules/translation/translation.module
index 270d9d543..6bfef4e18 100644
--- a/modules/translation/translation.module
+++ b/modules/translation/translation.module
@@ -178,12 +178,12 @@ function translation_node_view($node, $build_mode) {
'title' => $language->native,
'href' => 'node/' . $translations[$langcode]->nid,
'language' => $language,
- 'attributes' => array('title' => $translations[$langcode]->title, 'class' => 'translation-link')
+ 'attributes' => array('title' => $translations[$langcode]->title, 'class' => array('translation-link')),
);
$node->content['links']['translation'] = array(
'#theme' => 'links',
'#links' => $links,
- '#attributes' => array('class' => 'links inline'),
+ '#attributes' => array('class' => array('links', 'inline')),
);
}
}
diff --git a/modules/update/update.api.php b/modules/update/update.api.php
index a7dd3f698..f28b6c0bf 100644
--- a/modules/update/update.api.php
+++ b/modules/update/update.api.php
@@ -95,7 +95,7 @@ function hook_update_status_alter(&$projects) {
$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'],
);
diff --git a/modules/update/update.compare.inc b/modules/update/update.compare.inc
index 0cfc83775..b9d60c155 100644
--- a/modules/update/update.compare.inc
+++ b/modules/update/update.compare.inc
@@ -275,7 +275,7 @@ function update_calculate_project_data($available) {
$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($available) {
$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($available) {
$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($available) {
$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($available) {
$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!'),
);
diff --git a/modules/update/update.module b/modules/update/update.module
index b418f1ebb..626560e92 100644
--- a/modules/update/update.module
+++ b/modules/update/update.module
@@ -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()),
),
);
}
diff --git a/modules/update/update.report.inc b/modules/update/update.report.inc
index 465509516..2133510f0 100644
--- a/modules/update/update.report.inc
+++ b/modules/update/update.report.inc
@@ -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'));
}
}
@@ -170,7 +170,7 @@ function theme_update_report($data) {
if (!empty($project['extra'])) {
$row .= '<div class="extra">' . "\n";
foreach ($project['extra'] as $key => $value) {
- $row .= '<div class="' . $value['class'] . '">';
+ $row .= '<div class="' . implode(' ', $value['class']) . '">';
$row .= check_plain($value['label']) . ': ';
$row .= theme('placeholder', $value['data']);
$row .= "</div>\n";
@@ -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<h3>" . $type_label . "</h3>\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');
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index e1f86db7a..726e0865b 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -78,7 +78,7 @@ function upload_node_links($node, $build_mode) {
$node->content['links']['upload_attachments'] = array(
'#theme' => 'links',
'#links' => $links,
- '#attributes' => array('class' => 'links inline'),
+ '#attributes' => array('class' => array('links', 'inline')),
);
}
}
@@ -445,7 +445,7 @@ function theme_upload_attachments($elements) {
}
}
if (count($rows)) {
- return theme('table', $header, $rows, array('class' => 'attachments'));
+ return theme('table', $header, $rows, array('class' => array('attachments')));
}
}
@@ -603,7 +603,7 @@ function theme_upload_form_current($form) {
foreach (element_children($form) as $key) {
// Add class to group weight fields for drag and drop.
- $form[$key]['weight']['#attributes']['class'] = 'upload-weight';
+ $form[$key]['weight']['#attributes']['class'] = array('upload-weight');
$row = array('');
$row[] = drupal_render($form[$key]['remove']);
@@ -611,7 +611,7 @@ function theme_upload_form_current($form) {
$row[] = drupal_render($form[$key]['description']);
$row[] = drupal_render($form[$key]['weight']);
$row[] = drupal_render($form[$key]['size']);
- $rows[] = array('data' => $row, 'class' => 'draggable');
+ $rows[] = array('data' => $row, 'class' => array('draggable'));
}
$output = theme('table', $header, $rows, array('id' => 'upload-attachments'));
$output .= drupal_render_children($form);
diff --git a/modules/user/user.admin.inc b/modules/user/user.admin.inc
index 46850da91..1ec1221b2 100644
--- a/modules/user/user.admin.inc
+++ b/modules/user/user.admin.inc
@@ -695,23 +695,23 @@ function theme_user_admin_permissions($form) {
$row = array();
// Module name
if (is_numeric($key)) {
- $row[] = array('data' => drupal_render($form['permission'][$key]), 'class' => 'module', 'id' => 'module-' . $form['permission'][$key]['#id'], 'colspan' => count($form['role_names']['#value']) + 1);
+ $row[] = array('data' => drupal_render($form['permission'][$key]), 'class' => array('module'), 'id' => 'module-' . $form['permission'][$key]['#id'], 'colspan' => count($form['role_names']['#value']) + 1);
}
else {
// Permission row.
$row[] = array(
'data' => drupal_render($form['permission'][$key]),
- 'class' => 'permission',
+ 'class' => array('permission'),
);
foreach (element_children($form['checkboxes']) as $rid) {
- $row[] = array('data' => drupal_render($form['checkboxes'][$rid][$key]), 'class' => 'checkbox', 'title' => $roles[$rid] . ' : ' . t($key));
+ $row[] = array('data' => drupal_render($form['checkboxes'][$rid][$key]), 'class' => array('checkbox'), 'title' => $roles[$rid] . ' : ' . t($key));
}
}
$rows[] = $row;
}
$header[] = (t('Permission'));
foreach (element_children($form['role_names']) as $rid) {
- $header[] = array('data' => drupal_render($form['role_names'][$rid]), 'class' => 'checkbox');
+ $header[] = array('data' => drupal_render($form['role_names'][$rid]), 'class' => array('checkbox'));
}
$output = theme('system_compact_link');
$output .= theme('table', $header, $rows, array('id' => 'permissions'));
diff --git a/modules/user/user.api.php b/modules/user/user.api.php
index 8c0da7568..e3c706555 100644
--- a/modules/user/user.api.php
+++ b/modules/user/user.api.php
@@ -417,7 +417,7 @@ function hook_user_view($account) {
'#type' => 'user_profile_item',
'#title' => t('Blog'),
'#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $account->name))))),
- '#attributes' => array('class' => 'blog'),
+ '#attributes' => array('class' => array('blog')),
);
}
}
diff --git a/modules/user/user.module b/modules/user/user.module
index 0f62c996b..7a4d01d8d 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -920,7 +920,7 @@ function user_user_view($account) {
}
$account->content['summary'] += array(
'#type' => 'user_profile_category',
- '#attributes' => array('class' => 'user-member'),
+ '#attributes' => array('class' => array('user-member')),
'#weight' => 5,
'#title' => t('History'),
);
@@ -1890,7 +1890,7 @@ function user_edit_form(&$form_state, $uid, $edit, $register = FALSE) {
'#maxlength' => USERNAME_MAX_LENGTH,
'#description' => t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.'),
'#required' => TRUE,
- '#attributes' => array('class' => 'username'),
+ '#attributes' => array('class' => array('username')),
);
}
$form['account']['mail'] = array('#type' => 'textfield',