Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
220
Merge Requests
220
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
0d9a413e
Commit
0d9a413e
authored
Aug 09, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2056837
by longwave: Fixed Modules can no longer alter page_bottom().
parent
fedfd496
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
core/includes/theme.inc
core/includes/theme.inc
+1
-1
core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
...odules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
+1
-0
core/modules/system/tests/modules/theme_test/theme_test.module
...modules/system/tests/modules/theme_test/theme_test.module
+7
-0
No files found.
core/includes/theme.inc
View file @
0d9a413e
...
...
@@ -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
...
...
core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTest.php
View file @
0d9a413e
...
...
@@ -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.'
);
}
...
...
core/modules/system/tests/modules/theme_test/theme_test.module
View file @
0d9a413e
...
...
@@ -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').
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment