function _forum_node_check_node_type
Checks whether a node can be used in a forum, based on its content type.
Parameters
$node: A node object.
Return value
Boolean indicating if the node can be assigned to a forum.
11 calls to _forum_node_check_node_type()
- forum_field_storage_pre_insert in modules/
forum/ forum.module - Implements hook_field_storage_pre_insert().
- forum_field_storage_pre_update in modules/
forum/ forum.module - Implements hook_field_storage_pre_update().
- forum_node_delete in modules/
forum/ forum.module - Implements hook_node_delete().
- forum_node_insert in modules/
forum/ forum.module - Implements hook_node_insert().
- forum_node_load in modules/
forum/ forum.module - Implements hook_node_load().
File
-
modules/
forum/ forum.module, line 255
Code
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.