function _forum_node_check_node_type

_forum_node_check_node_type($node)

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.

File

modules/forum/forum.module, line 255
Provides discussion forums.

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);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!forum!forum.module/function/_forum_node_check_node_type/7.x