You are here

function sheetnode_token_info_alter in Sheetnode 7.2

Same name and namespace in other branches
  1. 7 sheetnode.module \sheetnode_token_info_alter()

Implements hook_token_info_alter().

File

./sheetnode.module, line 417
Module file for the sheetnode module.

Code

function sheetnode_token_info_alter(&$info) {
  $fields = field_info_fields();
  foreach ($info['tokens']['node'] as $name => &$token_info) {
    if (isset($fields[$name]) && $fields[$name]['type'] == 'sheetfield') {
      $token_info['type'] = 'sheet';
    }
  }
}