You are here

function _linkchecker_link_check_status_filter in Link checker 5.2

Same name and namespace in other branches
  1. 6.2 linkchecker.module \_linkchecker_link_check_status_filter()
  2. 7 linkchecker.module \_linkchecker_link_check_status_filter()

Verifies against the url blacklist, if the link status should be checked or not.

3 calls to _linkchecker_link_check_status_filter()
_linkchecker_add_box_links in ./linkchecker.module
Add box links to database.
_linkchecker_add_comment_links in ./linkchecker.module
Add comment links to database.
_linkchecker_add_node_links in ./linkchecker.module
Add node links to database.

File

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

Code

function _linkchecker_link_check_status_filter($url) {
  $status = TRUE;
  $urls = variable_get('linkchecker_disable_link_check_for_urls', LINKCHECKER_RESERVED_DOCUMENTATION_DOMAINS);
  if (!empty($urls) && preg_match('/' . implode('|', array_map(create_function('$links', 'return preg_quote($links, \'/\');'), preg_split('/(\\r\\n?|\\n)/', $urls))) . '/', $url)) {
    $status = FALSE;
  }
  return $status;
}