You are here

function workflow_ng_condition_token_numeric_upgrade in Rules 6

Related topics

File

rules/modules/rules.rules_forms.inc, line 81
Forms for the integration provided by rules

Code

function workflow_ng_condition_token_numeric_upgrade(&$element) {
  $element['#name'] = 'rules_condition_number_compare';
  foreach (array(
    'text1',
    'text2',
    'text1_args',
    'text2_args',
  ) as $key) {
    $element['#settings'][str_replace('text', 'number', $key)] = $element['#settings'][$key];
    unset($element['#settings'][$key]);
  }
}