You are here

function nodeviewcount_is_node_type_count in Node view count 7

Same name and namespace in other branches
  1. 7.3 includes/nodeviewcount.api.inc \nodeviewcount_is_node_type_count()
  2. 7.2 includes/nodeviewcount.api.inc \nodeviewcount_is_node_type_count()

Check node on content type for node view count.

Parameters

object $node: The node for checking.

Return value

bool TRUE if the node content type checked for count views, otherwise FALSE.

2 calls to nodeviewcount_is_node_type_count()
nodeviewcountcount_count_node_views in includes/nodeviewcount.api.inc
Count node views.
nodeviewcount_node_view in ./nodeviewcount.module
Implements hook_node_view().

File

includes/nodeviewcount.api.inc, line 28

Code

function nodeviewcount_is_node_type_count($node) {
  $node_types = variable_get('nodeviewcount_node_types', array());
  if (!empty($node_types[$node->type])) {
    return TRUE;
  }
  return FALSE;
}