function template_preprocess_htmlmail in HTML Mail 8.2
Same name and namespace in other branches
- 8.3 htmlmail.module \template_preprocess_htmlmail()
- 8 htmlmail.module \template_preprocess_htmlmail()
- 6.2 htmlmail.module \template_preprocess_htmlmail()
- 6 htmlmail.module \template_preprocess_htmlmail()
- 7.2 htmlmail.module \template_preprocess_htmlmail()
- 7 htmlmail.module \template_preprocess_htmlmail()
Process variables to format email messages.
See also
File
- ./
htmlmail.module, line 114 - Sends system emails in HTML.
Code
function template_preprocess_htmlmail(array &$variables) {
$variables['debug'] = variable_get('htmlmail_debug', '0');
$variables['theme'] = htmlmail_get_selected_theme($variables);
$variables['module_path'] = drupal_get_path('module', 'htmlmail');
if (empty($variables['theme'])) {
$variables['theme'] = 'no theme';
$variables['theme_path'] = $variables['module_path'];
}
else {
$variables['theme_path'] = drupal_get_path('theme', $variables['theme']);
}
$variables['theme_url'] = url($variables['theme_path'], array(
'absolute' => TRUE,
));
$variables['message_id'] = $variables['module'] . '_' . $variables['key'];
$suggestion = 'htmlmail__' . $variables['module'];
$variables['theme_hook_suggestions'][] = $suggestion;
$suggestion .= '__' . $variables['key'];
$variables['theme_hook_suggestions'][] = $suggestion;
}