function geolocation_feeds_processor_targets_alter in Geolocation Field 7
Implements hook_feeds_node_processor_targets_alter().
File
- ./
geolocation.feeds.inc, line 10 - Provides integration with Feeds module (http://drupal.org/project/feeds)
Code
function geolocation_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) {
foreach (field_info_instances($entity_type, $bundle_name) as $name => $instance) {
$info = field_info_field($name);
if ($info['type'] == 'geolocation_latlng') {
$targets[$info['field_name'] . ':lat'] = array(
'name' => t($instance['label'] . ' Latitude'),
'callback' => 'geolocation_set_target_simple',
'real_target' => $info['field_name'],
);
$targets[$info['field_name'] . ':lng'] = array(
'name' => t($instance['label'] . ' Longitude'),
'callback' => 'geolocation_set_target_simple',
'real_target' => $info['field_name'],
);
}
}
}