function location_taxonomize_taxonomize in Location Taxonomize 7.2
Parameters
$items - an array of items ready to be taxonomized:
2 calls to location_taxonomize_taxonomize()
- location_taxonomize_af_element_submitted in location_taxonomize_af/
location_taxonomize_af.module - A submit handler for forms that contain an addressfield
- location_taxonomize_location_submitt in location_taxonomize_location/
location_taxonomize_location.module - Submit handler for forms with Location fields in them
File
- ./
location_taxonomize.module, line 134
Code
function location_taxonomize_taxonomize($items, $form, &$form_state) {
$saved = 0;
$tids = array();
foreach ($items as $item) {
$results = location_taxonomize_process_item($item);
$saved += $results['saved'];
$tids = array_merge($tids, $results['tids']);
}
if (!empty($tids)) {
if (location_taxonomize_term_attach_enabled()) {
location_taxonomize_term_attach($tids, $form, $form_state);
}
}
if (variable_get('location_taxonomize_show_messages', 1)) {
$msg = t('Location taxonomize: @num new terms saved', array(
'@num' => $saved,
));
drupal_set_message($msg);
}
return array(
"saved" => $saved,
"tids" => $tids,
);
}