function advanced_forum_is_forum_tagged in Advanced Forum 6.2
Same name and namespace in other branches
- 7.2 includes/style.inc \advanced_forum_is_forum_tagged()
1 call to advanced_forum_is_forum_tagged()
- advanced_forum_node_is_styled in includes/
style.inc
File
- includes/
style.inc, line 245 - Functions relating to the style system, not including core hooks and preprocess / theme functions.
Code
function advanced_forum_is_forum_tagged($node, $preview = FALSE) {
$vid = variable_get('forum_nav_vocabulary', '');
if ($preview) {
foreach ($node->taxonomy as $term) {
if ($term->vid == $vid) {
return TRUE;
}
}
}
else {
// Get a list of the terms attached to this node
$terms = taxonomy_node_get_terms_by_vocabulary($node, $vid);
if (count($terms) > 0) {
return TRUE;
}
}
}