You are here

function word_link_modify_action in Word Link 7.2

Action function.

Goes through values and uses them to modify the passed words by replacing the existing values.

File

./word_link.actions.inc, line 14
Actions for the Word Link module.

Code

function word_link_modify_action($word, $context) {
  $modify = array_filter($context['modify']);
  foreach ($modify as $name => $value) {
    $value = $context['properties'][$name];
    $word->{$name} = $value;
  }
  word_link_save($word);
  if ($context['progress']['current'] >= $context['progress']['total']) {
    word_link_clear_filter_cache();
  }
}