You are here

function asin_feeds_processor_targets_alter in Amazon Product Advertisement API 7

Same name and namespace in other branches
  1. 7.2 asin/asin.module \asin_feeds_processor_targets_alter()

Implementation of hook_feeds_node_processor_targets_alter().

File

asin/asin.module, line 361
Defines a field type for referencing an Amazon product.

Code

function asin_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'] == 'asin') {
      $targets[$name] = array(
        'name' => $bundle_name . ':' . $name,
        'callback' => 'asin_feeds_set_target',
        'description' => t('The %name field of the %bundle', array(
          '%name' => $name,
          '%bundle' => $bundle_name,
        )),
        'real_target' => $name,
      );
    }
  }
}