You are here

function theme_htmlmail_token_help in HTML Mail 6

Token support

1 theme call to theme_htmlmail_token_help()
htmlmail_template_settings in ./htmlmail.admin.inc

File

./htmlmail.module, line 134
Send system emails in HTML

Code

function theme_htmlmail_token_help($prefix = '[', $suffix = ']') {
  token_include();
  $full_list = array_merge(token_get_list('user'), token_get_list('profile'));
  $headers = array(
    t('Token'),
    t('Replacement value'),
  );
  $rows = array();
  foreach ($full_list as $key => $category) {
    $rows[] = array(
      array(
        'data' => drupal_ucfirst($key) . ' ' . t('tokens'),
        'class' => 'region',
        'colspan' => 2,
      ),
    );
    foreach ($category as $token => $description) {
      $row = array();
      $row[] = $prefix . $token . $suffix;
      $row[] = $description;
      $rows[] = $row;
    }
  }
  $output = theme('table', $headers, $rows, array(
    'class' => 'description',
  ));
  return $output;
}