You are here

function location_node_node_load in Location 7.4

Same name and namespace in other branches
  1. 7.3 location_node.module \location_node_node_load()

Implementation of hook_node_load().

File

./location_node.module, line 45
Associate locations with nodes.

Code

function location_node_node_load($nodes, $types) {

  // @@@ Resurrect the behavior from way back (1.x/2.x) that disabled existing
  // locations when the content type wasn't enabled for locations?
  // @@@TODO 7.x -- multiload version!
  foreach (array_keys($nodes) as $nid) {
    $nodes[$nid]->locations = location_load_locations($nodes[$nid]->vid);

    // @@@TODO 7.x -- Either reimplement or cut $node->location.
  }
}