You are here

function token_var_token_list in Token Variable 6

Implementation of hook_token_info

File

./token_var.module, line 6

Code

function token_var_token_list($type = 'all') {
  global $conf;
  if ($type == 'global' || $type == 'all') {
    $info = array();
    foreach ($conf as $key => $var) {
      if (!is_array($var)) {
        if (is_string($var) && empty($var)) {
          continue;
        }
        $info['global']['variable-' . $key] = substr($var, 0, 10);
      }
    }
    return $info;
  }
}