summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-02-28 11:13:18 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2012-02-28 11:13:18 -0800
commit3da69625986d0b1a2ae09899ac539ad3ef07e2a3 (patch)
tree8c64c11ebf1c4ae7493b7a7bb6fb663d17811965 /modules/taxonomy/taxonomy.module
parent5589b60aef70d852518acc65ad1725f85aecb854 (diff)
downloadbrdo-3da69625986d0b1a2ae09899ac539ad3ef07e2a3.tar.gz
brdo-3da69625986d0b1a2ae09899ac539ad3ef07e2a3.tar.bz2
Issue #872488 by acouch, Albert Volkman, mfb, musicnode, no_commit_credit: Regression: no way to get taxonomy tags into RSS feeds.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 8cf6487b2..28d488ec8 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -1418,6 +1418,10 @@ function taxonomy_field_formatter_info() {
'label' => t('Plain text'),
'field types' => array('taxonomy_term_reference'),
),
+ 'taxonomy_term_reference_rss_category' => array(
+ 'label' => t('RSS category'),
+ 'field types' => array('taxonomy_term_reference'),
+ ),
);
}
@@ -1460,6 +1464,18 @@ function taxonomy_field_formatter_view($entity_type, $entity, $field, $instance,
);
}
break;
+
+ case 'taxonomy_term_reference_rss_category':
+ foreach ($items as $delta => $item) {
+ $entity->rss_elements[] = array(
+ 'key' => 'category',
+ 'value' => $item['tid'] != 'autocreate' ? $item['taxonomy_term']->name : $item['name'],
+ 'attributes' => array(
+ 'domain' => $item['tid'] != 'autocreate' ? url('taxonomy/term/' . $item['tid'], array('absolute' => TRUE)) : '',
+ ),
+ );
+ }
+ break;
}
return $element;