function location_node_import_fields in Node import 5
Same name and namespace in other branches
- 6 supported/location/location.inc \location_node_import_fields()
Implementation of hook_node_import_fields().
File
- supported/
location.inc, line 6
Code
function location_node_import_fields($type) {
if (!variable_get('location_maxnum_' . $type, 0)) {
return;
}
$fields = array();
foreach ((array) location_field_names() as $field => $fieldname) {
if (variable_get('location_' . $field . '_' . $type, $field == 'country' ? 1 : 0)) {
$fields['node_import_location_' . $field] = t('Location: @fieldname', array(
'@fieldname' => $fieldname,
));
}
}
if (user_access('submit latitude/longitude')) {
$fields['node_import_location_latitude'] = t('Location: Latitude');
$fields['node_import_location_longitude'] = t('Location: Longitude');
}
return $fields;
}