You are here

function gm3_field_feeds_processor_targets_alter in Google Maps API V3 7

Implements hook_feeds_processor_targets_alter().

File

gm3_field/gm3_field.module, line 239

Code

function gm3_field_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) {
  $map_types = array(
    'gm3_point',
    'gm3_polygon',
    'gm3_polyline',
    'gm3_rectangle',
    'gm3_combination',
  );
  foreach (field_info_instances($entity_type, $bundle_name) as $name => $instance) {
    $info = field_info_field($name);
    if (in_array($info['type'], $map_types)) {
      $targets[$name] = array(
        'name' => check_plain($instance['label']),
        'callback' => 'gm3_field_feeds_set_target_text',
        'description' => t('The @label field of the node.', array(
          '@label' => $instance['label'],
        )),
      );
    }
  }
}