when one wants to use token for multiple objects, the global tokens are included for each object per default. So they are run multiple times.
-> the attached patch introduces a new optional parameter, which allows one to hide the global tokens. per default the behaviour stays as is.
note that token_replace_multiple() also keeps compatible with the old way - although it would make sense to not "add" global tokens there by default, as they can be added in the $types array. However I don't think people have done this until now, so the patch stays compatible by just adding the new parameter.
If the patch is welcome,
* I'd provide a 6.x version too
* I'd migrate workflow-ng's and rules' token integration to use it.
| Comment | File | Size | Author |
|---|---|---|---|
| token_global_5.patch | 6.02 KB | fago |
Comments
Comment #1
dave reidAt this point I think this is out of scope of the module. Marking as won't fix.