diff --git a/core/includes/common.inc b/core/includes/common.inc
index 19e0d59..0e2c978 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -2318,11 +2318,7 @@ function drupal_http_header_attributes(array $attributes = array()) {
* @ingroup sanitization
*/
function drupal_attributes(array $attributes = array()) {
- foreach ($attributes as $attribute => &$data) {
- $data = implode(' ', (array) $data);
- $data = $attribute . '="' . check_plain($data) . '"';
- }
- return $attributes ? ' ' . implode(' ', $attributes) : '';
+ return new Drupal\Core\Template\Attribute($attributes);
}
/**
@@ -5918,7 +5914,7 @@ function drupal_render(&$elements) {
// element is rendered into the final text.
if (isset($elements['#pre_render'])) {
foreach ($elements['#pre_render'] as $function) {
- $elements = $function($elements);
+ $elements = call_user_func($function, $elements);
}
}
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 7d638f6..1f28f9a 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2388,9 +2388,6 @@ function template_preprocess(&$variables, $hook) {
// Tell all templates where they are located.
$variables['directory'] = path_to_theme();
- // Initialize html class attribute for the current hook.
- $variables['classes_array'] = array(drupal_html_class($hook));
-
// Merge in variables that don't depend on hook and don't change during a
// single page request.
// Use the advanced drupal_static() pattern, since this is called very often.
@@ -2405,7 +2402,14 @@ function template_preprocess(&$variables, $hook) {
if (!isset($default_variables) || ($user !== $default_variables['user'])) {
$default_variables = _template_preprocess_default_variables();
}
- $variables += $default_variables;
+ $variables += $default_variables + array(
+ 'attributes' => drupal_attributes(array('class' => array())),
+ 'title_attributes' => drupal_attributes(array('class' => array())),
+ 'content_attributes' => drupal_attributes(array('class' => array())),
+ );
+
+ // Initialize html class attribute for the current hook.
+ $variables['attributes']['class'] = array(drupal_html_class($hook));
}
/**
@@ -2416,9 +2420,6 @@ function _template_preprocess_default_variables() {
// Variables that don't depend on a database connection.
$variables = array(
- 'attributes_array' => array(),
- 'title_attributes_array' => array(),
- 'content_attributes_array' => array(),
'title_prefix' => array(),
'title_suffix' => array(),
'user' => $user,
@@ -2450,25 +2451,6 @@ function _template_preprocess_default_variables() {
}
/**
- * A default process function used to alter variables as late as possible.
- *
- * For more detailed information, see theme().
- *
- */
-function template_process(&$variables, $hook) {
- // Flatten out classes.
- $variables['classes'] = implode(' ', $variables['classes_array']);
-
- // Flatten out attributes, title_attributes, and content_attributes.
- // Because this function can be called very often, and often with empty
- // attributes, optimize performance by only calling drupal_attributes() if
- // necessary.
- $variables['attributes'] = $variables['attributes_array'] ? drupal_attributes($variables['attributes_array']) : '';
- $variables['title_attributes'] = $variables['title_attributes_array'] ? drupal_attributes($variables['title_attributes_array']) : '';
- $variables['content_attributes'] = $variables['content_attributes_array'] ? drupal_attributes($variables['content_attributes_array']) : '';
-}
-
-/**
* Preprocess variables for html.tpl.php
*
* @see system_elements()
@@ -2480,22 +2462,24 @@ function template_preprocess_html(&$variables) {
// Compile a list of classes that are going to be applied to the body element.
// This allows advanced theming based on context (home page, node of certain type, etc.).
// Add a class that tells us whether we're on the front page or not.
- $variables['classes_array'][] = $variables['is_front'] ? 'front' : 'not-front';
+ $variables['attributes']['class'][] = $variables['is_front'] ? 'front' : 'not-front';
// Add a class that tells us whether the page is viewed by an authenticated user or not.
- $variables['classes_array'][] = $variables['logged_in'] ? 'logged-in' : 'not-logged-in';
+ $variables['attributes']['class'][] = $variables['logged_in'] ? 'logged-in' : 'not-logged-in';
// Add information about the number of sidebars.
if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
- $variables['classes_array'][] = 'two-sidebars';
+ $variables['attributes']['class'][] = 'two-sidebars';
}
elseif (!empty($variables['page']['sidebar_first'])) {
- $variables['classes_array'][] = 'one-sidebar sidebar-first';
+ $variables['attributes']['class'][] = 'one-sidebar';
+ $variables['attributes']['class'][] = 'sidebar-first';
}
elseif (!empty($variables['page']['sidebar_second'])) {
- $variables['classes_array'][] = 'one-sidebar sidebar-second';
+ $variables['attributes']['class'][] = 'one-sidebar';
+ $variables['attributes']['class'][] = 'sidebar-second';
}
else {
- $variables['classes_array'][] = 'no-sidebars';
+ $variables['attributes']['class'][] = 'no-sidebars';
}
// Populate the body classes.
@@ -2505,23 +2489,22 @@ function template_preprocess_html(&$variables) {
// Add current suggestion to page classes to make it possible to theme
// the page depending on the current page type (e.g. node, admin, user,
// etc.) as well as more specific data like node-12 or node-edit.
- $variables['classes_array'][] = drupal_html_class($suggestion);
+ $variables['attributes']['class'][] = drupal_html_class($suggestion);
}
}
}
// If on an individual node page, add the node type to body classes.
if ($node = menu_get_object()) {
- $variables['classes_array'][] = drupal_html_class('node-type-' . $node->type);
+ $variables['attributes']['class'][] = drupal_html_class('node-type-' . $node->type);
}
// Initializes attributes which are specific to the html and body elements.
- $variables['html_attributes_array'] = array();
- $variables['body_attributes_array'] = array();
+ $variables['html_attributes'] = array();
// HTML element attributes.
- $variables['html_attributes_array']['lang'] = $language_interface->langcode;
- $variables['html_attributes_array']['dir'] = $language_interface->direction ? 'rtl' : 'ltr';
+ $variables['html_attributes']['lang'] = $language_interface->langcode;
+ $variables['html_attributes']['dir'] = $language_interface->direction ? 'rtl' : 'ltr';
// Add favicon.
if (theme_get_setting('toggle_favicon')) {
@@ -2655,9 +2638,8 @@ function template_process_page(&$variables) {
* @see html.tpl.php
*/
function template_process_html(&$variables) {
- // Flatten out html_attributes and body_attributes.
- $variables['html_attributes'] = drupal_attributes($variables['html_attributes_array']);
- $variables['body_attributes'] = drupal_attributes($variables['body_attributes_array']);
+ // Flatten out html_attributes and attributes.
+ $variables['html_attributes'] = drupal_attributes($variables['html_attributes']);
// Render page_top and page_bottom into top level variables.
$variables['page_top'] = drupal_render($variables['page']['page_top']);
@@ -2676,8 +2658,8 @@ function template_process_html(&$variables) {
* Generate an array of suggestions from path arguments.
*
* This is typically called for adding to the 'theme_hook_suggestions' or
- * 'classes_array' variables from within preprocess functions, when wanting to
- * base the additional suggestions on the path of the current page.
+ * 'attributes' class key variables from within preprocess functions, when
+ * wanting to base the additional suggestions on the path of the current page.
*
* @param $args
* An array of path arguments, such as from function arg().
@@ -2692,7 +2674,7 @@ function template_process_html(&$variables) {
* @return
* An array of suggestions, suitable for adding to
* $variables['theme_hook_suggestions'] within a preprocess function or to
- * $variables['classes_array'] if the suggestions represent extra CSS classes.
+ * $variables['attributes']['class'] if the suggestions represent extra CSS classes.
*/
function theme_get_suggestions($args, $base, $delimiter = '__') {
@@ -2819,18 +2801,19 @@ function template_preprocess_maintenance_page(&$variables) {
$variables['title'] = drupal_get_title();
// Compile a list of classes that are going to be applied to the body element.
- $variables['classes_array'][] = 'in-maintenance';
+ $variables['attributes']['class'][] = 'in-maintenance';
if (isset($variables['db_is_active']) && !$variables['db_is_active']) {
- $variables['classes_array'][] = 'db-offline';
+ $variables['attributes']['class'][] = 'db-offline';
}
if ($variables['layout'] == 'both') {
- $variables['classes_array'][] = 'two-sidebars';
+ $variables['attributes']['class'][] = 'two-sidebars';
}
elseif ($variables['layout'] == 'none') {
- $variables['classes_array'][] = 'no-sidebars';
+ $variables['attributes']['class'][] = 'no-sidebars';
}
else {
- $variables['classes_array'][] = 'one-sidebar sidebar-' . $variables['layout'];
+ $variables['attributes']['class'][] = 'one-sidebar';
+ $variables['attributes']['class'][] = 'sidebar-' . $variables['layout'];
}
// Dead databases will show error messages so supplying this template will
@@ -2868,6 +2851,6 @@ function template_preprocess_region(&$variables) {
$variables['content'] = $variables['elements']['#children'];
$variables['region'] = $variables['elements']['#region'];
- $variables['classes_array'][] = drupal_region_class($variables['region']);
+ $variables['attributes']['class'][] = drupal_region_class($variables['region']);
$variables['theme_hook_suggestions'][] = 'region__' . $variables['region'];
}
diff --git a/core/modules/aggregator/aggregator-wrapper.tpl.php b/core/modules/aggregator/aggregator-wrapper.tpl.php
index 7cac5bf..0e97ba4 100644
--- a/core/modules/aggregator/aggregator-wrapper.tpl.php
+++ b/core/modules/aggregator/aggregator-wrapper.tpl.php
@@ -14,7 +14,7 @@
* @ingroup themeable
*/
?>
-
+
diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module
index 0626f72..3e9850c 100644
--- a/core/modules/aggregator/aggregator.module
+++ b/core/modules/aggregator/aggregator.module
@@ -793,6 +793,6 @@ function _aggregator_items($count) {
*/
function aggregator_preprocess_block(&$variables) {
if ($variables['block']->module == 'aggregator') {
- $variables['attributes_array']['role'] = 'complementary';
+ $variables['attributes']['role'] = 'complementary';
}
}
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index 97f59e9..bc63939 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -998,10 +998,10 @@ function template_preprocess_block(&$variables) {
// Create the $content variable that templates expect.
$variables['content'] = $variables['elements']['#children'];
- $variables['classes_array'][] = drupal_html_class('block-' . $variables['block']->module);
+ $variables['attributes']['class'][] = drupal_html_class('block-' . $variables['block']->module);
// Add default class for block content.
- $variables['content_attributes_array']['class'][] = 'content';
+ $variables['content_attributes']['class'][] = 'content';
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->region;
$variables['theme_hook_suggestions'][] = 'block__' . $variables['block']->module;
diff --git a/core/modules/block/block.test b/core/modules/block/block.test
index e6b2e42..a9a6dcd 100644
--- a/core/modules/block/block.test
+++ b/core/modules/block/block.test
@@ -780,11 +780,11 @@ class BlockTemplateSuggestionsUnitTest extends UnitTestBase {
$variables2['elements']['#block'] = $block2;
$variables2['elements']['#children'] = '';
// Test adding a class to the block content.
- $variables2['content_attributes_array']['class'][] = 'test-class';
+ $variables2['content_attributes']['class'][] = 'test-class';
template_preprocess_block($variables2);
$this->assertEqual($variables2['theme_hook_suggestions'], array('block__footer', 'block__block', 'block__block__hyphen_test'), t('Hyphens (-) in block delta were replaced by underscore (_)'));
// Test that the default class and added class are available.
- $this->assertEqual($variables2['content_attributes_array']['class'], array('test-class', 'content'), t('Default .content class added to block content_attributes_array'));
+ $this->assertEqual($variables2['content_attributes']['class'], array('test-class', 'content'), t('Default .content class added to block content_attributes'));
}
}
diff --git a/core/modules/block/block.tpl.php b/core/modules/block/block.tpl.php
index 78387a8..2b32f65 100644
--- a/core/modules/block/block.tpl.php
+++ b/core/modules/block/block.tpl.php
@@ -10,10 +10,9 @@
* - $block->module: Module that generated the block.
* - $block->delta: An ID for the block, unique within each module.
* - $block->region: The block region embedding the current block.
- * - $classes: String of classes that can be used to style contextually through
- * CSS. It can be manipulated through the variable $classes_array from
- * preprocess functions. The default values can be one or more of the
- * following:
+ * - $attributes: An object of HTML attributes that can be manipulated as an
+ * array and printed as a string.
+ * It includes the 'class' information, which includes:
* - block: The current template type, i.e., "theming hook".
* - block-[module]: The module generating the block. For example, the user
* module is responsible for handling the default user navigation block. In
@@ -26,8 +25,6 @@
* the template.
*
* Helper variables:
- * - $classes_array: Array of html class attribute values. It is flattened
- * into a string within the variable $classes.
* - $block_zebra: Outputs 'odd' and 'even' dependent on each block region.
* - $zebra: Same output as $block_zebra but independent of any block region.
* - $block_id: Counter dependent on each block region.
@@ -44,7 +41,7 @@
* @ingroup themeable
*/
?>
-
>
+
>
subject): ?>
diff --git a/core/modules/book/book.module b/core/modules/book/book.module
index bbdfab3..a453354 100644
--- a/core/modules/book/book.module
+++ b/core/modules/book/book.module
@@ -1069,7 +1069,7 @@ function _book_link_defaults($nid) {
*/
function book_preprocess_block(&$variables) {
if ($variables['block']-> module == 'book') {
- $variables['attributes_array']['role'] = 'navigation';
+ $variables['attributes']['role'] = 'navigation';
}
}
@@ -1233,8 +1233,8 @@ function template_preprocess_book_export_html(&$variables) {
$variables['head'] = drupal_get_html_head();
// HTML element attributes.
- $variables['html_attributes_array']['lang'] = $language_interface->langcode;
- $variables['html_attributes_array']['dir'] = $language_interface->direction ? 'rtl' : 'ltr';
+ $variables['html_attributes']['lang'] = $language_interface->langcode;
+ $variables['html_attributes']['dir'] = $language_interface->direction ? 'rtl' : 'ltr';
}
/**
@@ -1244,7 +1244,7 @@ function template_preprocess_book_export_html(&$variables) {
*/
function template_process_book_export_html(&$variables) {
// Flatten out html_attributes
- $variables['html_attributes'] = drupal_attributes($variables['html_attributes_array']);
+ $variables['html_attributes'] = drupal_attributes($variables['html_attributes']);
}
/**
diff --git a/core/modules/comment/comment-wrapper.tpl.php b/core/modules/comment/comment-wrapper.tpl.php
index 1f97851..1e2e10f 100644
--- a/core/modules/comment/comment-wrapper.tpl.php
+++ b/core/modules/comment/comment-wrapper.tpl.php
@@ -8,9 +8,9 @@
* - $content: The array of content-related elements for the node. Use
* render($content) to print them all, or
* print a subset such as render($content['comment_form']).
- * - $classes: String of classes that can be used to style contextually through
- * CSS. It can be manipulated through the variable $classes_array from
- * preprocess functions. The default value has the following:
+ * - $attributes: An object of HTML attributes that can be manipulated as an
+ * array and printed as a string.
+ * It includes the 'class' information, which includes:
* - comment-wrapper: The current template type, i.e., "theming hook".
* - $title_prefix (array): An array containing additional output populated by
* modules, intended to be displayed in front of the main title tag that
@@ -27,15 +27,11 @@
* - COMMENT_MODE_FLAT
* - COMMENT_MODE_THREADED
*
- * Other variables:
- * - $classes_array: Array of html class attribute values. It is flattened
- * into a string within the variable $classes.
- *
* @see template_preprocess_comment_wrapper()
* @see theme_comment_wrapper()
*/
?>
-
';
// Render the top-level DIV.
- $output = '
' . $output . '
';
+ $output = '
' . $output . '
';
return $output;
}
diff --git a/core/modules/field/theme/field.tpl.php b/core/modules/field/theme/field.tpl.php
index c496908..0743062 100644
--- a/core/modules/field/theme/field.tpl.php
+++ b/core/modules/field/theme/field.tpl.php
@@ -11,10 +11,9 @@
* - $items: An array of field values. Use render() to output them.
* - $label: The item label.
* - $label_hidden: Whether the label display is set to 'hidden'.
- * - $classes: String of classes that can be used to style contextually through
- * CSS. It can be manipulated through the variable $classes_array from
- * preprocess functions. The default values can be one or more of the
- * following:
+ * - $attributes: An object of HTML attributes that can be manipulated as an
+ * array and printed as a string.
+ * It includes the 'class' information, which includes:
* - field: The current template type, i.e., "theming hook".
* - field-name-[field_name]: The current field name. For example, if the
* field name is "field_description" it would result in
@@ -35,8 +34,6 @@
* hidden.
* - $field_name_css: The css-compatible field name.
* - $field_type_css: The css-compatible field type.
- * - $classes_array: Array of html class attribute values. It is flattened
- * into a string within the variable $classes.
*
* @see template_preprocess_field()
* @see theme_field()
@@ -48,7 +45,7 @@ See http://api.drupal.org/api/function/theme_field/8 for details.
After copying this file to your theme's folder and customizing it, remove this
HTML comment.
-->
-
>
+
>
>:
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 28e7f17..384ef36 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -997,7 +997,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
*/
function forum_preprocess_block(&$variables) {
if ($variables['block']->module == 'forum') {
- $variables['attributes_array']['role'] = 'navigation';
+ $variables['attributes']['role'] = 'navigation';
}
}
diff --git a/core/modules/help/help.module b/core/modules/help/help.module
index dbc836c..26ef533 100644
--- a/core/modules/help/help.module
+++ b/core/modules/help/help.module
@@ -70,6 +70,6 @@ function help_help($path, $arg) {
*/
function help_preprocess_block(&$variables) {
if ($variables['block']->module == 'system' && $variables['block']->delta == 'help') {
- $variables['attributes_array']['role'] = 'complementary';
+ $variables['attributes']['role'] = 'complementary';
}
}
diff --git a/core/modules/language/language.module b/core/modules/language/language.module
index 7acc783..72737b4 100644
--- a/core/modules/language/language.module
+++ b/core/modules/language/language.module
@@ -481,7 +481,7 @@ function language_block_view($type) {
*/
function language_preprocess_block(&$variables) {
if ($variables['block']->module == 'language') {
- $variables['attributes_array']['role'] = 'navigation';
+ $variables['attributes']['role'] = 'navigation';
}
}
diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module
index 35f8032..6484861 100644
--- a/core/modules/locale/locale.module
+++ b/core/modules/locale/locale.module
@@ -792,12 +792,12 @@ function locale_preprocess_node(&$variables) {
// If the node language was different from the page language, we should
// add markup to identify the language. Otherwise the page language is
// inherited.
- $variables['attributes_array']['lang'] = $variables['langcode'];
+ $variables['attributes']['lang'] = $variables['langcode'];
if ($node_language->direction != $language_interface->direction) {
// If text direction is different form the page's text direction, add
// direction information as well.
$dir = array('ltr', 'rtl');
- $variables['attributes_array']['dir'] = $dir[$node_language->direction];
+ $variables['attributes']['dir'] = $dir[$node_language->direction];
}
}
}
diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index 466cd88..803b9e8 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -800,6 +800,6 @@ function menu_get_menus($all = TRUE) {
*/
function menu_preprocess_block(&$variables) {
if ($variables['block']->module == 'menu') {
- $variables['attributes_array']['role'] = 'navigation';
+ $variables['attributes']['role'] = 'navigation';
}
}
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 3c3881d..942ba3e 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -1289,10 +1289,10 @@ function node_preprocess_block(&$variables) {
if ($variables['block']->module == 'node') {
switch ($variables['block']->delta) {
case 'syndicate':
- $variables['attributes_array']['role'] = 'complementary';
+ $variables['attributes']['role'] = 'complementary';
break;
case 'recent':
- $variables['attributes_array']['role'] = 'navigation';
+ $variables['attributes']['role'] = 'navigation';
break;
}
}
@@ -1356,24 +1356,24 @@ function template_preprocess_node(&$variables) {
}
// Add article ARIA role.
- $variables['attributes_array']['role'] = 'article';
+ $variables['attributes']['role'] = 'article';
// Gather node classes.
- $variables['classes_array'][] = drupal_html_class('node-' . $node->type);
+ $variables['attributes']['class'][] = drupal_html_class('node-' . $node->type);
if ($variables['promote']) {
- $variables['classes_array'][] = 'promoted';
+ $variables['attributes']['class'][] = 'promoted';
}
if ($variables['sticky']) {
- $variables['classes_array'][] = 'sticky';
+ $variables['attributes']['class'][] = 'sticky';
}
if (!$variables['status']) {
- $variables['classes_array'][] = 'unpublished';
+ $variables['attributes']['class'][] = 'unpublished';
}
if ($variables['view_mode']) {
- $variables['classes_array'][] = drupal_html_class('view-mode-' . $variables['view_mode']);
+ $variables['attributes']['class'][] = drupal_html_class('view-mode-' . $variables['view_mode']);
}
if (isset($variables['preview'])) {
- $variables['classes_array'][] = 'preview';
+ $variables['attributes']['class'][] = 'preview';
}
// Clean up name so there are no underscores.
diff --git a/core/modules/node/node.tpl.php b/core/modules/node/node.tpl.php
index c3db5ae..e1c787e 100644
--- a/core/modules/node/node.tpl.php
+++ b/core/modules/node/node.tpl.php
@@ -18,10 +18,9 @@
* - $display_submitted: Whether submission information should be displayed.
* - $submitted: Submission information created from $name and $date during
* template_preprocess_node().
- * - $classes: String of classes that can be used to style contextually through
- * CSS. It can be manipulated through the variable $classes_array from
- * preprocess functions. The default values can be one or more of the
- * following:
+ * - $attributes: An object of HTML attributes that can be manipulated as an
+ * array and printed as a string.
+ * It includes the 'class' information, which includes:
* - node: The current template type, i.e., "theming hook".
* - node-[type]: The current node type. For example, if the node is a
* "Article" it would result in "node-article". Note that the machine
@@ -46,8 +45,6 @@
* - $comment_count: Number of comments attached to the node.
* - $uid: User ID of the node author.
* - $created: Time the node was published formatted in Unix timestamp.
- * - $classes_array: Array of html class attribute values. It is flattened
- * into a string within the variable $classes.
* - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
* teaser listings.
* - $id: Position of the node. Increments each time it's output.
@@ -78,7 +75,7 @@
* @see template_process()
*/
?>
-
>
+>
diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module
index 02c0883..3582fdf 100644
--- a/core/modules/overlay/overlay.module
+++ b/core/modules/overlay/overlay.module
@@ -455,7 +455,7 @@ function overlay_system_info_alter(&$info, $file, $type) {
function overlay_preprocess_html(&$variables) {
if (overlay_get_mode() == 'child') {
// Add overlay class, so themes can react to being displayed in the overlay.
- $variables['classes_array'][] = 'overlay';
+ $variables['attributes']['class'][] = 'overlay';
}
}
@@ -478,7 +478,7 @@ function template_preprocess_overlay(&$variables) {
$variables['tabs'] = menu_primary_local_tasks();
$variables['title'] = drupal_get_title();
$variables['disable_overlay'] = overlay_disable_message();
- $variables['content_attributes_array']['class'][] = 'clearfix';
+ $variables['content_attributes']['class'][] = 'clearfix';
}
/**
diff --git a/core/modules/overlay/overlay.tpl.php b/core/modules/overlay/overlay.tpl.php
index 54b10af..00fa36c 100644
--- a/core/modules/overlay/overlay.tpl.php
+++ b/core/modules/overlay/overlay.tpl.php
@@ -10,10 +10,6 @@
* - $tabs (array): Tabs linking to any sub-pages beneath the current page
* (e.g., the view and edit tabs when displaying a node).
*
- * Helper variables:
- * - $classes_array: Array of html class attribute values. It is flattened
- * into a string within the variable $classes.
- *
* @see template_preprocess()
* @see template_preprocess_overlay()
* @see template_process()
diff --git a/core/modules/poll/poll.module b/core/modules/poll/poll.module
index 2e36e0b..f7dc477 100644
--- a/core/modules/poll/poll.module
+++ b/core/modules/poll/poll.module
@@ -777,7 +777,7 @@ function poll_vote($form, &$form_state) {
*/
function poll_preprocess_block(&$variables) {
if ($variables['block']->module == 'poll') {
- $variables['attributes_array']['role'] = 'complementary';
+ $variables['attributes']['role'] = 'complementary';
}
}
diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module
index 43ee4ed..1f7b268 100644
--- a/core/modules/rdf/rdf.module
+++ b/core/modules/rdf/rdf.module
@@ -438,8 +438,8 @@ function rdf_process(&$variables, $hook) {
// and field items. It does this by adjusting the variable sent to the
// template so that the template doesn't have to worry about it. See
// theme_rdf_template_variable_wrapper().
- if (!empty($variables['rdf_template_variable_attributes_array'])) {
- foreach ($variables['rdf_template_variable_attributes_array'] as $variable_name => $attributes) {
+ if (!empty($variables['rdf_template_variable_attributes'])) {
+ foreach ($variables['rdf_template_variable_attributes'] as $variable_name => $attributes) {
$context = array(
'hook' => $hook,
'variable_name' => $variable_name,
@@ -452,11 +452,11 @@ function rdf_process(&$variables, $hook) {
// reasons, can't be placed into that template's $attributes variable. This
// is "meta" information that is related to particular content, so render it
// close to that content.
- if (!empty($variables['rdf_metadata_attributes_array'])) {
+ if (!empty($variables['rdf_metadata_attributes'])) {
if (!isset($variables['content']['#prefix'])) {
$variables['content']['#prefix'] = '';
}
- $variables['content']['#prefix'] = theme('rdf_metadata', array('metadata' => $variables['rdf_metadata_attributes_array'])) . $variables['content']['#prefix'];
+ $variables['content']['#prefix'] = theme('rdf_metadata', array('metadata' => $variables['rdf_metadata_attributes'])) . $variables['content']['#prefix'];
}
}
@@ -468,7 +468,7 @@ function rdf_preprocess_html(&$variables) {
// attribute inside the html element.
$prefixes = array();
foreach(rdf_get_namespaces() as $prefix => $uri) {
- $variables['html_attributes_array']['prefix'][] = $prefix . ': ' . $uri . "\n";
+ $variables['html_attributes']['prefix'][] = $prefix . ': ' . $uri . "\n";
}
}
@@ -480,15 +480,15 @@ function rdf_preprocess_node(&$variables) {
// URI of the resource described within the HTML element, while the @typeof
// attribute indicates its RDF type (e.g., foaf:Document, sioc:Person, and so
// on.)
- $variables['attributes_array']['about'] = empty($variables['node_url']) ? NULL: $variables['node_url'];
- $variables['attributes_array']['typeof'] = empty($variables['node']->rdf_mapping['rdftype']) ? NULL : $variables['node']->rdf_mapping['rdftype'];
+ $variables['attributes']['about'] = empty($variables['node_url']) ? NULL: $variables['node_url'];
+ $variables['attributes']['typeof'] = empty($variables['node']->rdf_mapping['rdftype']) ? NULL : $variables['node']->rdf_mapping['rdftype'];
// Adds RDFa markup to the title of the node. Because the RDFa markup is
// added to the