You are here

function feeds_tamper_find_replace_callback in Feeds Tamper 7

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

File

plugins/find_replace.inc, line 79

Code

function feeds_tamper_find_replace_callback($result, $item_key, $element_key, &$field, $settings, $source) {
  if ($settings['regex']) {
    $field = preg_replace($settings['regex_find'], $settings['replace'], $field);
  }
  else {
    $field = $settings['func']($settings['find'], $settings['replace'], $field);
  }
}