You are here

function birthdays_feeds_processor_targets_alter in Birthdays 7

Implements hook_feeds_processor_targets_alter().

See also

FeedsNodeProcessor::getMappingTargets().

File

./birthdays.feeds.inc, line 12
Implements Feeds support for Birthdays fields.

Code

function birthdays_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'] == 'birthdays_date') {
      $targets[$name] = array(
        'name' => check_plain($instance['label']),
        'callback' => 'birthdays_feeds_set_target',
        'description' => t('The @label field of the node.', array(
          '@label' => $instance['label'],
        )),
      );
    }
  }
}