Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
+++ b/core/includes/theme.inc
@@ -1779,15 +1781,6 @@ function template_preprocess_page(&$variables) {
- // Set up layout variable.
- $variables['layout'] = 'none';
- if (!empty($variables['page']['sidebar_first'])) {
- $variables['layout'] = 'first';
- }
- if (!empty($variables['page']['sidebar_second'])) {
- $variables['layout'] = ($variables['layout'] == 'first') ? 'both' : 'second';
- }
-
$variables['layout']
appears to be unused and undocumented.
Proposed resolution
Remove it
Remaining tasks
-Write a patch
-Make sure it doesn't break anything / testing
User interface changes
-
API changes
-
Comment | File | Size | Author |
---|---|---|---|
#4 | remove_unused_variables-2341983-4.patch | 696 bytes | malotor |
#1 | 2341983-1.patch | 696 bytes | iMiksu |
Comments
Comment #1
iMiksuI couldn't find any instances using this variable form *.twig files.
Comment #2
lauriiiI grepped everything and didn't find anything where this could be needed.
Comment #3
tim.plunkettThese are not currently used, but I think they are set up because they could be very useful to contrib or custom themes.
Comment #4
malotor CreditAttribution: malotor commentedSame path here
Comment #5
tim.plunkettI'm saying I don't think we should do this. I don't know what "Same path here" means.
Comment #6
lauriii#2234331: Change the body classes to follow Drupal 8 CSS standards
Comment #7
malotor CreditAttribution: malotor commentedSorry! i wanted to say "patch"