Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3443488
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-3443488
Commits
685be2ff
Commit
685be2ff
authored
18 years ago
by
Neil Drumm
Browse files
Options
Downloads
Patches
Plain Diff
#71728
by Eaton, re-add taxonomy_term_path()
parent
1e34796a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/taxonomy.module
+9
-1
9 additions, 1 deletion
modules/taxonomy.module
modules/taxonomy/taxonomy.module
+9
-1
9 additions, 1 deletion
modules/taxonomy/taxonomy.module
with
18 additions
and
2 deletions
modules/taxonomy.module
+
9
−
1
View file @
685be2ff
...
...
@@ -31,7 +31,7 @@ function taxonomy_link($type, $node = NULL) {
foreach
(
$node
->
taxonomy
as
$term
)
{
$links
[
'taxonomy_term_'
.
$term
->
tid
]
=
array
(
'#title'
=>
$term
->
name
,
'#href'
=>
'
taxonomy
/
term
/'
.
$term
->
tid
,
'#href'
=>
taxonomy
_
term
_path
(
$term
)
,
'#attributes'
=>
array
(
'rel'
=>
'tag'
,
'title'
=>
strip_tags
(
$term
->
description
))
);
}
...
...
@@ -47,6 +47,14 @@ function taxonomy_link($type, $node = NULL) {
}
}
function
taxonomy_term_path
(
$term
)
{
$vocabulary
=
taxonomy_get_vocabulary
(
$term
->
vid
);
if
(
$vocabulary
->
module
!=
'taxonomy'
&&
$path
=
module_invoke
(
$vocabulary
->
module
,
'term_path'
,
$term
))
{
return
$path
;
}
return
'taxonomy/term/'
.
$term
->
tid
;
}
/**
* Implementation of hook_menu().
*/
...
...
This diff is collapsed.
Click to expand it.
modules/taxonomy/taxonomy.module
+
9
−
1
View file @
685be2ff
...
...
@@ -31,7 +31,7 @@ function taxonomy_link($type, $node = NULL) {
foreach
(
$node
->
taxonomy
as
$term
)
{
$links
[
'taxonomy_term_'
.
$term
->
tid
]
=
array
(
'#title'
=>
$term
->
name
,
'#href'
=>
'
taxonomy
/
term
/'
.
$term
->
tid
,
'#href'
=>
taxonomy
_
term
_path
(
$term
)
,
'#attributes'
=>
array
(
'rel'
=>
'tag'
,
'title'
=>
strip_tags
(
$term
->
description
))
);
}
...
...
@@ -47,6 +47,14 @@ function taxonomy_link($type, $node = NULL) {
}
}
function
taxonomy_term_path
(
$term
)
{
$vocabulary
=
taxonomy_get_vocabulary
(
$term
->
vid
);
if
(
$vocabulary
->
module
!=
'taxonomy'
&&
$path
=
module_invoke
(
$vocabulary
->
module
,
'term_path'
,
$term
))
{
return
$path
;
}
return
'taxonomy/term/'
.
$term
->
tid
;
}
/**
* Implementation of hook_menu().
*/
...
...
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