Same name and namespace in other branches
  1. 4.6.x modules/taxonomy.module \taxonomy_rss_item()
  2. 4.7.x modules/taxonomy.module \taxonomy_rss_item()
  3. 5.x modules/taxonomy/taxonomy.module \taxonomy_rss_item()

Provides category information for RSS feeds.

File

modules/taxonomy/taxonomy.module, line 1329
Enables the organization of content into categories.

Code

function taxonomy_rss_item($node) {
  $output = array();
  foreach ($node->taxonomy as $term) {
    $output[] = array(
      'key' => 'category',
      'value' => $term->name,
      'attributes' => array(
        'domain' => url('taxonomy/term/' . $term->tid, array(
          'absolute' => TRUE,
        )),
      ),
    );
  }
  return $output;
}