You are here

function feeds_tamper_unique_callback in Feeds Tamper 7

Same name and namespace in other branches
  1. 6 plugins/unique.inc \feeds_tamper_unique_callback()
1 string reference to 'feeds_tamper_unique_callback'
unique.inc in plugins/unique.inc

File

plugins/unique.inc, line 23

Code

function feeds_tamper_unique_callback($result, $item_key, $element_key, &$field, $settings, $source) {
  $unique = array();
  foreach ($field as $f) {
    if (!in_array($f, $unique)) {
      $unique[] = $f;
    }
  }
  $field = $unique;
}