Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
685be2ff
Commit
685be2ff
authored
Jul 02, 2006
by
Neil Drumm
Browse files
#71728
by Eaton, re-add taxonomy_term_path()
parent
1e34796a
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/taxonomy.module
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().
*/
...
...
modules/taxonomy/taxonomy.module
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().
*/
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment