function htmlmail_get_allowed_themes in HTML Mail 8.2
Same name and namespace in other branches
- 6.2 htmlmail.module \htmlmail_get_allowed_themes()
- 7.2 htmlmail.module \htmlmail_get_allowed_themes()
- 7 htmlmail.module \htmlmail_get_allowed_themes()
Returns an associative array of allowed themes. The keys are the machine-readable names and the values are the .info file names. Based on code from the og_theme module.
2 calls to htmlmail_get_allowed_themes()
- htmlmail_admin_settings in ./
htmlmail.admin.inc - Implements hook_admin_settings().
- htmlmail_get_selected_theme in ./
htmlmail.module - Returns the selected theme to use for outgoing emails.
File
- ./
htmlmail.module, line 189 - Sends system emails in HTML.
Code
function &htmlmail_get_allowed_themes() {
$allowed =& drupal_static(__FUNCTION__);
if (!isset($allowed)) {
$allowed = array(
'' => t('No theme'),
);
$themes = list_themes();
module_load_include('inc', 'system', 'system.admin');
uasort($themes, 'system_sort_modules_by_info_name');
foreach ($themes as $key => $value) {
if ($value->status) {
$allowed[$key] = check_plain($value->info['name']);
}
}
}
return $allowed;
}