summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module21
1 files changed, 12 insertions, 9 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 29ccd3ae0..d917c7511 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -29,19 +29,22 @@ function taxonomy_link($type, $node = NULL) {
$links = array();
if (array_key_exists('taxonomy', $node)) {
foreach ($node->taxonomy as $term) {
- $links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => strip_tags($term->description)));
+ $links['taxonomy_term_'. $term->tid] = array(
+ '#title' => $term->name,
+ '#href' => 'taxonomy/term/'. $term->tid,
+ '#attributes' => array('rel' => 'tag', 'title' => strip_tags($term->description))
+ );
}
}
- return $links;
- }
-}
-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;
+ // We call this hook again because some modules and themes call taxonomy_link('taxonomy terms') directly
+ foreach (module_implements('link_alter') AS $module) {
+ $function = $module .'_link_alter';
+ $function($node, $links);
+ }
+
+ return $links;
}
- return 'taxonomy/term/'. $term->tid;
}
/**