function themekey_compat_settings_form in ThemeKey 7
Same name and namespace in other branches
- 7.3 themekey_compat_admin.inc \themekey_compat_settings_form()
- 7.2 themekey_compat_admin.inc \themekey_compat_settings_form()
Form builder for the form to enable modules for ThemeKey compatibility mode.
1 string reference to 'themekey_compat_settings_form'
- themekey_compat_menu in ./
themekey_compat.module - Implements hook_menu().
File
- ./
themekey_compat_admin.inc, line 16 - @author Markus Kalkbrenner | Cocomore AG
Code
function themekey_compat_settings_form() {
$form = array();
$modules = module_implements('custom_theme');
$modules = array_diff($modules, array(
'themekey',
));
if (!empty($modules)) {
$modules_list = system_list('module_enabled');
$options = array();
foreach ($modules as $module) {
$name = $module;
if (isset($modules_list[$module]->info) && !empty($modules_list[$module]->info['name'])) {
$name = $modules_list[$module]->info['name'];
}
if ('system' == $module) {
$name .= ' (' . t('Administration theme') . ')';
}
$options[$module] = $name;
}
$form['themekey_compat']['modules_enabled'] = array(
'#type' => 'fieldset',
'#title' => t('Modules'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['themekey_compat']['modules_enabled']['themekey_compat_modules_enabled'] = array(
'#type' => 'checkboxes',
'#title' => t('Integrate Modules in Theme Switching Rule Chain'),
'#default_value' => variable_get('themekey_compat_modules_enabled', array()),
'#options' => $options,
);
$form['themekey_compat']['modules_no_default_theme'] = array(
'#type' => 'fieldset',
'#title' => t('No Default Theme'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['themekey_compat']['modules_no_default_theme']['themekey_compat_modules_no_default_theme'] = array(
'#type' => 'checkboxes',
'#title' => t('Ignore the theme decision of these modules if they select the default theme'),
'#default_value' => variable_get('themekey_compat_modules_no_default_theme', array()),
'#options' => $options,
);
$form['buttons']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
}
else {
$form['themekey_compat']['no_module'] = array(
'#type' => 'markup',
'#value' => t('No different theme switching module installed.'),
);
}
return $form;
}