function themekey_ui_theme_select_form in ThemeKey 7.2
Same name and namespace in other branches
- 6.4 themekey_ui_admin.inc \themekey_ui_theme_select_form()
- 6.2 themekey_ui_admin.inc \themekey_ui_theme_select_form()
- 6.3 themekey_ui_admin.inc \themekey_ui_theme_select_form()
- 7.3 themekey_ui_admin.inc \themekey_ui_theme_select_form()
- 7 themekey_ui_admin.inc \themekey_ui_theme_select_form()
Adds theme selector to a form.
Parameters
$form: form array
$title: title as string
$description: description as string
$weight: integer
$collapsed: boolean
$element_key: the name of form element
See also
themekey_ui_theme_build_select_form()
3 calls to themekey_ui_theme_select_form()
- themekey_ui_form_alter in ./
themekey_ui.module - Implements hook_form_alter().
- themekey_ui_pathalias in ./
themekey_ui_admin.inc - Adds theme select box to url alias form
- themekey_user_profile_form_alter in ./
themekey_user_profile.module - Implements hook_form_alter().
File
- ./
themekey_ui_admin.inc, line 185
Code
function themekey_ui_theme_select_form(&$form, $title, $description, $default = 'default', $weight = NULL, $collapsed = TRUE, $element_key = 'themekey_ui_theme') {
$themes = list_themes();
$selectable_themes = variable_get('themekey_ui_selectable_themes', array(
'default' => t('System default'),
));
foreach (array_keys($themes) as $name) {
if (!array_key_exists($name, $selectable_themes) || empty($selectable_themes[$name])) {
unset($themes[$name]);
}
}
themekey_ui_theme_build_select_form($form, $title, $description, $default, $weight, $collapsed, $element_key, $themes, TRUE);
}