You are here

function domain_path_is_node_path in Domain Path 6

Tell us if the given path is a node link.

1 call to domain_path_is_node_path()
domain_path_domainpath in ./domain_path.module
Implements hook_domainpath().

File

./domain_path.module, line 68
Path alias handling for multiple domains.

Code

function domain_path_is_node_path($path, $language) {
  $lookup = drupal_lookup_path('source', $path, $language);
  if (!empty($lookup)) {
    $path = $lookup;
  }
  if (arg(0, $path) != 'node') {
    return NULL;
  }
  $arg2 = arg(2, $path);
  if (!empty($arg2)) {
    return NULL;
  }
  $arg1 = intval(arg(1, $path));
  if (empty($arg1)) {
    return NULL;
  }
  return $arg1;
}