Commit 0d9a413e authored by alexpott's avatar alexpott

Issue #2056837 by longwave: Fixed Modules can no longer alter page_bottom().

parent fedfd496
......@@ -2610,7 +2610,7 @@ function template_preprocess_html(&$variables) {
}
$variables['page_bottom'] = array();
if (isset($variables['page']['page_bottom'])) {
$variables['page_bottom'] = drupal_render($variables['page']['page_bottom']);
$variables['page_bottom'][]['#markup'] = drupal_render($variables['page']['page_bottom']);
}
// Add footer scripts as '#markup' so they can be rendered with other
......
......@@ -276,6 +276,7 @@ function testPreprocessHtml() {
$this->drupalGet('');
$attributes = $this->xpath('/html/body[@theme_test_page_variable="Page variable is an array."]');
$this->assertTrue(count($attributes) == 1, 'In template_preprocess_html(), the page variable is still an array (not rendered yet).');
$this->assertText('theme test page bottom markup', 'Modules are able to set the page bottom region.');
}
......
......@@ -162,6 +162,13 @@ function theme_test_preprocess_html(&$variables) {
}
}
/**
* Implements hook_page_alter().
*/
function theme_test_page_alter(&$page) {
$page['page_bottom']['theme_test_page_bottom'] = array('#markup' => 'theme test page bottom markup');
}
/**
* Theme function for testing theme('theme_test_foo').
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment