You are here

function text_token_values in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 6.3 modules/text/text.token.inc \text_token_values()

Implementation of hook_token_values().

File

modules/text/text.token.inc, line 25
Provides tokens for text fields.

Code

function text_token_values($type, $object = NULL, $options = array()) {
  if ($type == 'field') {
    $item = $object[0];
    $tokens['raw'] = $item['value'];
    $tokens['formatted'] = isset($item['view']) ? $item['view'] : '';
    return $tokens;
  }
}