You are here

function rules_path_clean_replacement_values in Rules 7.2

Clean replacements so they are URL friendly.

Can be used as 'cleaning callback' for action or condition parameters.

Parameters

$replacements: An array of token replacements that need to be "cleaned" for use in the URL.

array $data: An array of objects used to generate the replacements.

array $options: An array of options used to generate the replacements.

See also

rules_path_action_info()

2 string references to 'rules_path_clean_replacement_values'
rules_path_action_info in modules/path.rules.inc
Implements hook_rules_action_info() on behalf of the path module.
rules_path_condition_info in modules/path.rules.inc
Implements hook_rules_condition_info() on behalf of the path module.

File

./rules.module, line 1208
Rules engine module.

Code

function rules_path_clean_replacement_values(&$replacements, $data = array(), $options = array()) {

  // Include path.eval.inc which contains path cleaning functions.
  module_load_include('inc', 'rules', 'modules/path.eval');
  foreach ($replacements as $token => $value) {
    $replacements[$token] = rules_clean_path($value);
  }
}