You are here

function instagram_feeds_plugins_feeds_processor_targets_alter in Instagram Feeds 7

Implements hook_feeds_processor_targets_alter().

File

modules/instagram_feeds_plugins/instagram_feeds_plugins.module, line 83
Code for the Instagram Feeds Plugin module.

Code

function instagram_feeds_plugins_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 (in_array($info['type'], array(
      'file',
      'image',
    ))) {
      $targets[$name] = array(
        'name' => check_plain($instance['label']),
        'callback' => 'instagram_feeds_plugins_file_feeds_set_target',
        'description' => t('The @label field of the node.', array(
          '@label' => $instance['label'],
        )),
      );
    }
  }
}