You are here

function token_include in Token 6

Same name and namespace in other branches
  1. 5 token.module \token_include()

General function to include the files that token relies on for the real work.

4 calls to token_include()
theme_token_help in ./token.pages.inc
For a given context, builds a formatted list of tokens and descriptions of their replacement values.
token_find_duplicate_tokens in ./token.module
Find tokens that have been declared twice by different modules.
token_get_list in ./token.module
A helper function that retrieves all currently exposed tokens, and merges them recursively. This is only necessary when building the token listing -- during actual value replacement, only tokens in a particular domain are requested and a normal…
token_get_values in ./token.module
Return a list of valid substitution tokens and their values for the specified type.

File

./token.module, line 168
The Token API module.

Code

function token_include() {
  static $run = FALSE;
  if (!$run) {
    $run = TRUE;
    $modules_enabled = array_keys(module_list());
    $modules = array_intersect(_token_core_supported_modules(), $modules_enabled);
    foreach ($modules as $module) {
      module_load_include('inc', 'token', "token_{$module}");
    }
  }
}