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
302
Merge Requests
302
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
1811d659
Commit
1811d659
authored
Mar 14, 2009
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#372914
by chx: Fix link titles when using a non-t() callback.
parent
b77475ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
includes/menu.inc
includes/menu.inc
+7
-3
No files found.
includes/menu.inc
View file @
1811d659
...
...
@@ -536,9 +536,13 @@ function _menu_check_access(&$item, $map) {
function
_menu_item_localize
(
&
$item
,
$map
,
$link_translate
=
FALSE
)
{
$callback
=
$item
[
'title_callback'
];
$item
[
'localized_options'
]
=
$item
[
'options'
];
// If we are not doing link translation or if the title matches the
// link title of its router item, localize it.
if
(
!
$link_translate
||
(
!
empty
(
$item
[
'title'
])
&&
(
$item
[
'title'
]
==
$item
[
'link_title'
])))
{
// If we are translating the title of a menu link, and its title is the same
// as the corresponding router item, then we can use the title information
// from the router. If it's customized, then we need to use the link title
// itself; can't localize.
// If we are translating a router item (tabs, page, breadcrumb), then we
// can always use the information from the router item.
if
(
!
$link_translate
||
(
$item
[
'title'
]
==
$item
[
'link_title'
]))
{
// t() is a special case. Since it is used very close to all the time,
// we handle it directly instead of using indirect, slower methods.
if
(
$callback
==
't'
)
{
...
...
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