You are here

function token_custom_token_list in Custom Tokens 5

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

Implementation of hook_token_list()

File

./token_custom.module, line 92

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;
}