Commit 42e2eb0d authored by Dries's avatar Dries

- Patch #35178 by Robert Douglas: add title attribute to taxonomy links - use...

- Patch #35178 by Robert Douglas: add title attribute to taxonomy links - use term description as text.
parent ea8cfd18
......@@ -30,12 +30,12 @@ function taxonomy_link($type, $node = NULL) {
if (array_key_exists('taxonomy', $node)) {
foreach ($node->taxonomy as $tid) {
$term = taxonomy_get_term($tid);
$links[] = l($term->name, taxonomy_term_path($term));
$links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => $term->description));
}
}
else {
foreach (taxonomy_node_get_terms($node->nid) as $term) {
$links[] = l($term->name, taxonomy_term_path($term));
$links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => $term->description));
}
}
return $links;
......
......@@ -30,12 +30,12 @@ function taxonomy_link($type, $node = NULL) {
if (array_key_exists('taxonomy', $node)) {
foreach ($node->taxonomy as $tid) {
$term = taxonomy_get_term($tid);
$links[] = l($term->name, taxonomy_term_path($term));
$links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => $term->description));
}
}
else {
foreach (taxonomy_node_get_terms($node->nid) as $term) {
$links[] = l($term->name, taxonomy_term_path($term));
$links[] = l($term->name, taxonomy_term_path($term), array('rel' => 'tag', 'title' => $term->description));
}
}
return $links;
......
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