function taxonomy_edge_term_feed in Taxonomy Edge 7.2
Same name and namespace in other branches
- 8 taxonomy_edge.pages.inc \taxonomy_edge_term_feed()
- 7 taxonomy_edge.pages.inc \taxonomy_edge_term_feed()
Generate the content feed for a taxonomy term.
Parameters
$term: The taxonomy term.
1 string reference to 'taxonomy_edge_term_feed'
- taxonomy_edge_menu in ./
taxonomy_edge.module - Implements hook_menu().
File
- ./
taxonomy_edge.pages.inc, line 71
Code
function taxonomy_edge_term_feed($term, $depth = '0') {
$real_depth = $depth;
if ($depth === 'all') {
$real_depth = taxonomy_edge_get_max_depth($term->vid);
}
elseif (!is_numeric($depth)) {
$real_depth = 0;
}
$channel['link'] = url('taxonomy/term/' . $term->tid . '/' . $depth, array(
'absolute' => TRUE,
));
$channel['title'] = variable_get('site_name', 'Drupal') . ' - ' . $term->name;
// Only display the description if we have a single term, to avoid clutter and confusion.
// HTML will be removed from feed description.
$channel['description'] = check_markup($term->description, $term->format, '', TRUE);
$nids = taxonomy_edge_select_nodes($term->tid, FALSE, variable_get('feed_default_items', 10), $real_depth);
node_feed($nids, $channel);
}