Commit a79313a1 authored by Steven Wittens's avatar Steven Wittens

#7468 - Added title="" attribute with term descriptions (if present) to taxonomy links.

See http://drupal.org/node/view/7468
parent 325b7d12
......@@ -37,7 +37,7 @@ function taxonomy_link($type, $node = NULL) {
if ($node->taxonomy) {
foreach ($node->taxonomy as $tid) {
$term = taxonomy_get_term($tid);
$links[] = l($term->name, "taxonomy/page/or/$term->tid");
$links[] = l($term->name, "taxonomy/page/or/$term->tid", $term->description ? array ('title' => $term->description) : array());
}
}
else {
......@@ -52,7 +52,7 @@ function taxonomy_link($type, $node = NULL) {
$links = array();
foreach (taxonomy_node_get_terms($node->nid) as $term) {
$links[] = l($term->name, "taxonomy/page/or/$term->tid");
$links[] = l($term->name, "taxonomy/page/or/$term->tid", $term->description ? array ('title' => $term->description) : array());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment