You are here

function token_custom_token_list in Custom Tokens 6

Same name and namespace in other branches
  1. 5 token_custom.module \token_custom_token_list()

Implementation of hook_token_list()

File

./token_custom.module, line 109
The Token Custom module.

Code

function token_custom_token_list($type = 'all') {
  $result = db_query("SELECT * FROM {token_custom}");
  while ($row = db_fetch_object($result)) {
    if ($type == $row->type || $type == 'all') {
      $tokens['token_custom'][$row->id] = $row->description;
    }
  }
  return $tokens;
}