You are here

function hook_feeds_term_processor_targets_alter in Feeds 6

Alter mapping targets for taxonomy terms. Use this hook to add additional target options to the mapping form of Taxonomy term processor.

For an example implementation, look at geotaxnomy module. http://drupal.org/project/geotaxonomy

Parameters

&$targets: Array containing the targets to be offered to the user. Add to this array to expose additional options. Remove from this array to suppress options. Remove with caution.

$vid: The vocabulary id

Related topics

1 invocation of hook_feeds_term_processor_targets_alter()
FeedsTermProcessor::getMappingTargets in plugins/FeedsTermProcessor.inc
Return available mapping targets.

File

./feeds.api.php, line 235
Documentation of Feeds hooks.

Code

function hook_feeds_term_processor_targets_alter(&$targets, $vid) {
  if (variable_get('mymodule_vocabulary_' . $vid, 0)) {
    $targets['lat'] = array(
      'name' => t('Latitude'),
      'description' => t('Latitude of the term.'),
    );
    $targets['lon'] = array(
      'name' => t('Longitude'),
      'description' => t('Longitude of the term.'),
    );
  }
}