function _token_module in Token 7
Same name and namespace in other branches
- 8 token.module \_token_module()
Return the module responsible for a token.
Parameters
string $type: The token type.
string $name: The token name.
Return value
mixed The value of $info['tokens'][$type][$name]['module'] from token_get_info(), or NULL if the value does not exist.
2 calls to _token_module()
- field_tokens in ./
token.tokens.inc - Implements hook_tokens() on behalf of field.module.
- token_tokens in ./
token.tokens.inc - Implements hook_tokens().
File
- ./
token.module, line 572 - Enhances the token API in core: adds a browseable UI, missing tokens, etc.
Code
function _token_module($type, $name) {
$token_info = token_get_info($type, $name);
return isset($token_info['module']) ? $token_info['module'] : NULL;
}