Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443915
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3443915
Commits
a70cff3e
Commit
a70cff3e
authored
9 years ago
by
David Rothstein
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#890934
by sandipmkhairnar, reglogge: Garland uses $vars instead of $variables
parent
3d1be9b5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
themes/garland/template.php
+39
-39
39 additions, 39 deletions
themes/garland/template.php
with
39 additions
and
39 deletions
themes/garland/template.php
+
39
−
39
View file @
a70cff3e
...
...
@@ -19,22 +19,22 @@ function garland_breadcrumb($variables) {
/**
* Override or insert variables into the maintenance page template.
*/
function
garland_preprocess_maintenance_page
(
&
$vars
)
{
function
garland_preprocess_maintenance_page
(
&
$var
iable
s
)
{
// While markup for normal pages is split into page.tpl.php and html.tpl.php,
// the markup for the maintenance page is all in the single
// maintenance-page.tpl.php template. So, to have what's done in
// garland_preprocess_html() also happen on the maintenance page, it has to be
// called here.
garland_preprocess_html
(
$vars
);
garland_preprocess_html
(
$var
iable
s
);
}
/**
* Override or insert variables into the html template.
*/
function
garland_preprocess_html
(
&
$vars
)
{
function
garland_preprocess_html
(
&
$var
iable
s
)
{
// Toggle fixed or fluid width.
if
(
theme_get_setting
(
'garland_width'
)
==
'fluid'
)
{
$vars
[
'classes_array'
][]
=
'fluid-width'
;
$var
iable
s
[
'classes_array'
][]
=
'fluid-width'
;
}
// Add conditional CSS for IE6.
drupal_add_css
(
path_to_theme
()
.
'/fix-ie.css'
,
array
(
'group'
=>
CSS_THEME
,
'browsers'
=>
array
(
'IE'
=>
'lt IE 7'
,
'!IE'
=>
FALSE
),
'preprocess'
=>
FALSE
));
...
...
@@ -43,27 +43,27 @@ function garland_preprocess_html(&$vars) {
/**
* Override or insert variables into the html template.
*/
function
garland_process_html
(
&
$vars
)
{
function
garland_process_html
(
&
$var
iable
s
)
{
// Hook into color.module
if
(
module_exists
(
'color'
))
{
_color_html_alter
(
$vars
);
_color_html_alter
(
$var
iable
s
);
}
}
/**
* Override or insert variables into the page template.
*/
function
garland_preprocess_page
(
&
$vars
)
{
function
garland_preprocess_page
(
&
$var
iable
s
)
{
// Move secondary tabs into a separate variable.
$vars
[
'tabs2'
]
=
array
(
$var
iable
s
[
'tabs2'
]
=
array
(
'#theme'
=>
'menu_local_tasks'
,
'#secondary'
=>
$vars
[
'tabs'
][
'#secondary'
],
'#secondary'
=>
$var
iable
s
[
'tabs'
][
'#secondary'
],
);
unset
(
$vars
[
'tabs'
][
'#secondary'
]);
unset
(
$var
iable
s
[
'tabs'
][
'#secondary'
]);
if
(
isset
(
$vars
[
'main_menu'
]))
{
$vars
[
'primary_nav'
]
=
theme
(
'links__system_main_menu'
,
array
(
'links'
=>
$vars
[
'main_menu'
],
if
(
isset
(
$var
iable
s
[
'main_menu'
]))
{
$var
iable
s
[
'primary_nav'
]
=
theme
(
'links__system_main_menu'
,
array
(
'links'
=>
$var
iable
s
[
'main_menu'
],
'attributes'
=>
array
(
'class'
=>
array
(
'links'
,
'inline'
,
'main-menu'
),
),
...
...
@@ -75,11 +75,11 @@ function garland_preprocess_page(&$vars) {
));
}
else
{
$vars
[
'primary_nav'
]
=
FALSE
;
$var
iable
s
[
'primary_nav'
]
=
FALSE
;
}
if
(
isset
(
$vars
[
'secondary_menu'
]))
{
$vars
[
'secondary_nav'
]
=
theme
(
'links__system_secondary_menu'
,
array
(
'links'
=>
$vars
[
'secondary_menu'
],
if
(
isset
(
$var
iable
s
[
'secondary_menu'
]))
{
$var
iable
s
[
'secondary_nav'
]
=
theme
(
'links__system_secondary_menu'
,
array
(
'links'
=>
$var
iable
s
[
'secondary_menu'
],
'attributes'
=>
array
(
'class'
=>
array
(
'links'
,
'inline'
,
'secondary-menu'
),
),
...
...
@@ -91,66 +91,66 @@ function garland_preprocess_page(&$vars) {
));
}
else
{
$vars
[
'secondary_nav'
]
=
FALSE
;
$var
iable
s
[
'secondary_nav'
]
=
FALSE
;
}
// Prepare header.
$site_fields
=
array
();
if
(
!
empty
(
$vars
[
'site_name'
]))
{
$site_fields
[]
=
$vars
[
'site_name'
];
if
(
!
empty
(
$var
iable
s
[
'site_name'
]))
{
$site_fields
[]
=
$var
iable
s
[
'site_name'
];
}
if
(
!
empty
(
$vars
[
'site_slogan'
]))
{
$site_fields
[]
=
$vars
[
'site_slogan'
];
if
(
!
empty
(
$var
iable
s
[
'site_slogan'
]))
{
$site_fields
[]
=
$var
iable
s
[
'site_slogan'
];
}
$vars
[
'site_title'
]
=
implode
(
' '
,
$site_fields
);
$var
iable
s
[
'site_title'
]
=
implode
(
' '
,
$site_fields
);
if
(
!
empty
(
$site_fields
))
{
$site_fields
[
0
]
=
'<span>'
.
$site_fields
[
0
]
.
'</span>'
;
}
$vars
[
'site_html'
]
=
implode
(
' '
,
$site_fields
);
$var
iable
s
[
'site_html'
]
=
implode
(
' '
,
$site_fields
);
// Set a variable for the site name title and logo alt attributes text.
$slogan_text
=
$vars
[
'site_slogan'
];
$site_name_text
=
$vars
[
'site_name'
];
$vars
[
'site_name_and_slogan'
]
=
$site_name_text
.
' '
.
$slogan_text
;
$slogan_text
=
$var
iable
s
[
'site_slogan'
];
$site_name_text
=
$var
iable
s
[
'site_name'
];
$var
iable
s
[
'site_name_and_slogan'
]
=
$site_name_text
.
' '
.
$slogan_text
;
}
/**
* Override or insert variables into the node template.
*/
function
garland_preprocess_node
(
&
$vars
)
{
$vars
[
'submitted'
]
=
$vars
[
'date'
]
.
' — '
.
$vars
[
'name'
];
function
garland_preprocess_node
(
&
$var
iable
s
)
{
$var
iable
s
[
'submitted'
]
=
$var
iable
s
[
'date'
]
.
' — '
.
$var
iable
s
[
'name'
];
}
/**
* Override or insert variables into the comment template.
*/
function
garland_preprocess_comment
(
&
$vars
)
{
$vars
[
'submitted'
]
=
$vars
[
'created'
]
.
' — '
.
$vars
[
'author'
];
function
garland_preprocess_comment
(
&
$var
iable
s
)
{
$var
iable
s
[
'submitted'
]
=
$var
iable
s
[
'created'
]
.
' — '
.
$var
iable
s
[
'author'
];
}
/**
* Override or insert variables into the block template.
*/
function
garland_preprocess_block
(
&
$vars
)
{
$vars
[
'title_attributes_array'
][
'class'
][]
=
'title'
;
$vars
[
'classes_array'
][]
=
'clearfix'
;
function
garland_preprocess_block
(
&
$var
iable
s
)
{
$var
iable
s
[
'title_attributes_array'
][
'class'
][]
=
'title'
;
$var
iable
s
[
'classes_array'
][]
=
'clearfix'
;
}
/**
* Override or insert variables into the page template.
*/
function
garland_process_page
(
&
$vars
)
{
function
garland_process_page
(
&
$var
iable
s
)
{
// Hook into color.module
if
(
module_exists
(
'color'
))
{
_color_page_alter
(
$vars
);
_color_page_alter
(
$var
iable
s
);
}
}
/**
* Override or insert variables into the region template.
*/
function
garland_preprocess_region
(
&
$vars
)
{
if
(
$vars
[
'region'
]
==
'header'
)
{
$vars
[
'classes_array'
][]
=
'clearfix'
;
function
garland_preprocess_region
(
&
$var
iable
s
)
{
if
(
$var
iable
s
[
'region'
]
==
'header'
)
{
$var
iable
s
[
'classes_array'
][]
=
'clearfix'
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment