You are here

function messaging_template_token_description in Messaging 6.3

Token list and description

1 call to messaging_template_token_description()
messaging_template_edit_form in messaging_template/messaging_template.admin.inc
Edit message formats

File

messaging_template/messaging_template.admin.inc, line 286
Messaging Framework - Admin UI

Code

function messaging_template_token_description($tokens) {
  $token_info = messaging_template_invoke_all('token info');
  $items = $others = array();
  foreach ($tokens as $type => $type_tokens) {
    if (isset($token_info[$type])) {
      $items[$type] = messaging_template_token_group($token_info[$type]['name'], $type_tokens, $token_info[$type]['description']);
    }
    else {
      $others += $type_tokens;
    }
  }
  if (!empty($others)) {
    $items['others'] = messaging_template_token_group(t('Others'), $others);
  }
  return drupal_render($items);
}