diff options
Diffstat (limited to 'includes/token.inc')
-rw-r--r-- | includes/token.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/token.inc b/includes/token.inc index 3f9a5b5ce..2db6c78c9 100644 --- a/includes/token.inc +++ b/includes/token.inc @@ -78,6 +78,9 @@ function token_replace($text, array $data = array(), array $options = array()) { $replacements = array(); foreach (token_scan($text) as $type => $tokens) { $replacements += token_generate($type, $tokens, $data, $options); + if (!empty($options['clear'])) { + $replacements += array_fill_keys($tokens, ''); + } } // Optionally alter the list of replacement values. |