function htmlmail_get_selected_theme in HTML Mail 8.2
Same name and namespace in other branches
- 6.2 htmlmail.module \htmlmail_get_selected_theme()
- 7.2 htmlmail.module \htmlmail_get_selected_theme()
- 7 htmlmail.module \htmlmail_get_selected_theme()
Returns the selected theme to use for outgoing emails.
3 calls to htmlmail_get_selected_theme()
- HTMLMailSystem::format in ./
htmlmail.mail.inc - Format emails according to module settings.
- htmlmail_theme in ./
htmlmail.module - Implements hook_theme().
- template_preprocess_htmlmail in ./
htmlmail.module - Process variables to format email messages.
File
- ./
htmlmail.module, line 208 - Sends system emails in HTML.
Code
function htmlmail_get_selected_theme(&$message = array()) {
$selected = isset($message['theme']) ? $message['theme'] : variable_get('htmlmail_theme', '');
if ($selected) {
// Make sure the selected theme is allowed.
$themes =& htmlmail_get_allowed_themes();
if (empty($themes[$selected])) {
$selected = '';
}
}
return $selected;
}