function location_taxonomize_locationapi in Location Taxonomize 7
Implements hook_locationapi(). Used to save terms when locations are saved.
File
- ./
location_taxonomize.module, line 52
Code
function location_taxonomize_locationapi(&$obj, $op, $a3, $a4, $a5) {
$settings = variable_get('location_taxonomize_settings');
$vid = variable_get('location_taxonomize_vid');
// check module settings
if (!$settings['enable'] || !$vid) {
return;
}
switch ($op) {
// if we're saving a location, synchronize with vocab
case 'save':
$saved = location_taxonomize_process_loc($obj);
$msg = t('Location taxonomize: @num new terms saved', array(
'@num' => $saved,
));
drupal_set_message($msg);
}
}