You are here

function _linkchecker_scan_nodetype in Link checker 6.2

Same name and namespace in other branches
  1. 5.2 linkchecker.module \_linkchecker_scan_nodetype()

Should the defined node type scanned for links?

Parameters

string $node_type: Verifies if the node type is enabled for link checks and should be scanned.

Return value

TRUE if node type should be scanned, otherwise FALSE.

2 calls to _linkchecker_scan_nodetype()
linkchecker_comment in ./linkchecker.module
linkchecker_nodeapi in ./linkchecker.module

File

./linkchecker.module, line 1857
This module periodically check links in given node types, blocks, cck fields, etc.

Code

function _linkchecker_scan_nodetype($node_type = NULL) {
  $enabled = FALSE;
  $node_types = array_keys(array_filter(variable_get('linkchecker_scan_nodetypes', array())));

  // Scan specific node types only.
  if (in_array($node_type, $node_types)) {
    $enabled = TRUE;
  }
  return $enabled;
}