I want to display the image (using taxonomy_image) of the term instead of the name.
// Taxonomy
$taxonomy_content_type = (theme_get_setting('taxonomy_enable_content_type') == 1) ? $vars['node']->type : 'default';
$taxonomy_display = theme_get_setting('taxonomy_display_'. $taxonomy_content_type);
$taxonomy_format = theme_get_setting('taxonomy_format_'. $taxonomy_content_type);
if ((module_exists('taxonomy')) && ($taxonomy_display == 'all' || ($taxonomy_display == 'only' && $vars['page']))) {
$vocabularies = taxonomy_get_vocabularies($vars['node']->type);
$output = '';
$vocab_delimiter = '';
foreach ($vocabularies as $vocabulary) {
if (theme_get_setting('taxonomy_vocab_display_'. $taxonomy_content_type .'_'. $vocabulary->vid) == 1) {
$terms = taxonomy_node_get_terms_by_vocabulary($vars['node'], $vocabulary->vid);
if ($terms) {
$output .= ($taxonomy_format == 'vocab') ? '
- ' : '';
- '. l($term->name, taxonomy_term_path($term), array('attributes' => array('rel' => 'tag', 'title' => strip_tags($term->description)))) .'
$links = array();
foreach ($terms as $term) {
$links[] = '
';
}
if ($taxonomy_format == 'list') {
$output .= $vocab_delimiter; // Add comma between vocabularies
$vocab_delimiter = ', '; // Use a comma delimiter after first displayed vocabulary
}
$output .= implode(", ", $links);
$output .= ($taxonomy_format == 'vocab') ? '
' : '';
}
}
}
if ($output != '') {
$output = '
- '. $output .'
';
}
$vars['terms'] = $output;
}
else {
$vars['terms'] = '';
}