You are here

function linkchecker_node_insert in Link checker 7

Implements hook_node_insert().

File

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

Code

function linkchecker_node_insert($node) {

  // Every moderation module saving a forward revision needs to exit here.
  // Please see _linkchecker_isdefaultrevision() for more details.
  // @todo: Refactor this workaround under D8.
  if (!_linkchecker_isdefaultrevision($node)) {
    return;
  }

  // The node is going to be published.
  if (variable_get('linkchecker_scan_node_' . $node->type, FALSE) && $node->status == NODE_PUBLISHED) {
    _linkchecker_add_node_links($node);
  }
}