diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index e147c1c..ff24037 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1574,6 +1574,10 @@ function taxonomy_field_formatter_info() { 'label' => t('Link'), 'field types' => array('taxonomy_term_reference'), ), + 'taxonomy_term_reference_feed_link' => array( + 'label' => t('Feed Link'), + 'field types' => array('taxonomy_term_reference'), + ), 'taxonomy_term_reference_plain' => array( 'label' => t('Plain text'), 'field types' => array('taxonomy_term_reference'), @@ -1616,6 +1620,27 @@ function taxonomy_field_formatter_view($entity_type, $entity, $field, $instance, } break; + case 'taxonomy_term_reference_feed_link': + foreach ($items as $delta => $item) { + if ($item['tid'] == 'autocreate') { + $element[$delta] = array( + '#markup' => check_plain($item['name']), + ); + } + else { + $term = $item['taxonomy_term']; + $uri = entity_uri('taxonomy_term', $term); + $element[$delta] = array( + '#type' => 'link', + '#title' => $term->name, + '#href' => $uri['path'], + '#options' => $uri['options'], + ); + $element[$delta]['#options']['absolute'] = TRUE; + } + } + break; + case 'taxonomy_term_reference_plain': foreach ($items as $delta => $item) { $name = ($item['tid'] != 'autocreate' ? $item['taxonomy_term']->name : $item['name']);