_forum_node_check_node_type
- Versions
- 7
_forum_node_check_node_type($node)
Check whether a content type can be used in a forum.
Parameters
$node A node object.
Return value
Boolean indicating if the node can be assigned to a forum.
Code
modules/forum/forum.module, line 227
<?php
function _forum_node_check_node_type($node) {
// Fetch information about the forum field.
$field = field_info_instance('node', 'taxonomy_forums', $node->type);
return is_array($field);
}
?>Login or register to post comments 