You are here

function domain_source_node_load in Domain Access 7.2

Same name and namespace in other branches
  1. 7.3 domain_source/domain_source.module \domain_source_node_load()

Implements hook_node_load().

File

domain_source/domain_source.module, line 182
Creates a source domain for linking to content from other domains.

Code

function domain_source_node_load($nodes, $types) {
  $source = domain_source_lookup($nodes);
  foreach ($nodes as $node) {

    // Cannot load if the node has not been created yet.
    if (!isset($node->nid)) {
      continue;
    }
    $nodes[$node->nid]->domain_source = $source[$node->nid]['domain_id'];
  }
}