No need to specify 'global' => NULL. Global tokens are automatically replaced.
No need to specify 'user' => global $user. Users should be using the [current-user:*] tokens.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1017384-ga-token-replace-cleanup.patch | 1005 bytes | dave reid |
Comments
Comment #1
dave reidComment #2
hass commentedTHX for review.
Comment #3
hass commentedI keep this open for D6 backport in #609892: Multiple custom variables.
Comment #4
hass commented@dave: Can you give me a hint for D6, please?
Is this line of code correct?
How can we clear tokens that haven't been replaced? They seems to be kept in the string as configured? D7 have the
array('clear' => TRUE), but I cannot find this for D6.Comment #5
dave reidThe latest development code actually supports using $options['clear'] with token_replace or token_replace_multiple(). Use:
Comment #6
hass commentedGreat, thank you very much!
Comment #7
hass commentedI set this fixed now as it will go in with the first commit of #609892: Multiple custom variables