I'm trying to debug creating a token. How to programmatically create a custom token in a module shows me how to create them.
Is there a way to display all available tokens? I'm trying to test if my module actually created that token.
I'm trying to debug creating a token. How to programmatically create a custom token in a module shows me how to create them.
Is there a way to display all available tokens? I'm trying to test if my module actually created that token.
There's a function in the token module called token_get_list()
which is:
A helper function that retrieves all currently exposed tokens, and merges them recursively.
It invokes hook_token_list()
for all modules so should give you every single token defined in the site.