Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443205
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-3443205
Commits
527f6dbe
Commit
527f6dbe
authored
10 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1331852
by droplet, franz: template_preprocess_menu_local_task localized_options is optional
parent
bc7c79c6
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
core/includes/menu.inc
+6
-6
6 additions, 6 deletions
core/includes/menu.inc
with
6 additions
and
6 deletions
core/includes/menu.inc
+
6
−
6
View file @
527f6dbe
...
...
@@ -23,8 +23,8 @@
* @param array $variables
* An associative array containing:
* - element: A render element containing:
* - #link: A menu link array with 'title', '
href
', and
'localized_
option
s'
* keys.
* - #link: A menu link array with 'title', '
url
', and
(
option
ally)
*
'localized_options'
keys.
* - #active: A boolean indicating whether the local task is active.
*/
function
template_preprocess_menu_local_task
(
&
$variables
)
{
...
...
@@ -42,10 +42,10 @@ function template_preprocess_menu_local_task(&$variables) {
// If the link does not contain HTML already, String::checkPlain() it now.
// After we set 'html'=TRUE the link will not be sanitized by l().
if
(
empty
(
$link
[
'localized_options'
][
'html'
]))
{
$link
[
'title'
]
=
String
::
checkPlain
(
$link
[
'title'
]
);
$link
_text
=
String
::
checkPlain
(
$link
_text
);
}
$link
[
'localized_options'
][
'html'
]
=
TRUE
;
$link_text
=
t
(
'!local-task-title!active'
,
array
(
'!local-task-title'
=>
$link
[
'title'
]
,
'!active'
=>
$active
));
$link_text
=
t
(
'!local-task-title!active'
,
array
(
'!local-task-title'
=>
$link
_text
,
'!active'
=>
$active
));
}
$link
[
'localized_options'
][
'set_active_class'
]
=
TRUE
;
...
...
@@ -65,8 +65,8 @@ function template_preprocess_menu_local_task(&$variables) {
* @param array $variables
* An associative array containing:
* - element: A render element containing:
* - #link: A menu link array with 'title', '
href
', and
'localized_
option
s'
* keys.
* - #link: A menu link array with 'title', '
url
', and
(
option
ally)
*
'localized_options'
keys.
*/
function
template_preprocess_menu_local_action
(
&
$variables
)
{
$link
=
$variables
[
'element'
][
'#link'
];
...
...
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