You are here

function location_node_node_insert in Location 7.4

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

Implementation of hook_node_insert().

1 call to location_node_node_insert()
location_node_node_update in ./location_node.module
Implementation of hook_node_update().

File

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

Code

function location_node_node_insert($node) {
  if (!empty($node->locations)) {
    location_save_locations($node->locations, array(
      'nid' => $node->nid,
      'vid' => $node->vid,
    ));
  }
}