hook_domain_source_path_alter

Versions
domain
hook_domain_source_path_alter(&$source, $path)

Allows modules to specify the target link for a Drupal path.

Note: This hook is not meant to be used for node paths, which are handled by hook_domain_source_alter(). This hook is split from hook_domain_source_alter() for better performance.

Currently, no modules in the package implement this hook.

Parameters

&$source The domain array from domain_get_node_match(), passed by reference.

$nid The identifier of the obect being rewritten. For nodes, this is the node id. In other instances, we may pass a $path string or other variable.

Return value

No return value; modify $source by reference.

Code

./API.php, line 378

<?php
function hook_domain_source_path_alter(&$source, $path) {
  // Always make admin links go to the primary domain.
  $base = arg(0, $path);
  if ($base == 'admin') {
    $source = domain_default();
  }
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List