function admin_menu_theme_settings in Administration menu 6
Same name and namespace in other branches
- 5.3 admin_menu.inc \admin_menu_theme_settings()
- 5.2 admin_menu.module \admin_menu_theme_settings()
- 6.3 admin_menu.inc \admin_menu_theme_settings()
- 7.3 admin_menu.inc \admin_menu_theme_settings()
Form builder function for module settings.
1 string reference to 'admin_menu_theme_settings'
- admin_menu_menu in ./
admin_menu.module - Implementation of hook_menu().
File
- ./
admin_menu.inc, line 375
Code
function admin_menu_theme_settings() {
$form['admin_menu_margin_top'] = array(
'#type' => 'checkbox',
'#title' => t('Adjust top margin'),
'#default_value' => variable_get('admin_menu_margin_top', 1),
'#description' => t('If enabled, the site output is shifted down approximately 20 pixels from the top of the viewport to display the administration menu. If disabled, some absolute- or fixed-positioned page elements may be covered by the administration menu.'),
);
$form['admin_menu_position_fixed'] = array(
'#type' => 'checkbox',
'#title' => t('Keep menu at top of page'),
'#default_value' => variable_get('admin_menu_position_fixed', 0),
'#description' => t('If enabled, the administration menu is always displayed at the top of the browser viewport (even after the page is scrolled). <strong>Note: In some browsers, this setting results in a malformed page, an invisible cursor, non-selectable elements in forms, or other issues. Disable this option if these issues occur.</strong>'),
);
$form['tweaks'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced settings'),
);
$form['tweaks']['admin_menu_tweak_modules'] = array(
'#type' => 'checkbox',
'#title' => t('Collapse fieldsets on modules page'),
'#default_value' => variable_get('admin_menu_tweak_modules', 0),
'#description' => t('If enabled, fieldsets on the <a href="!modules-url">modules</a> page are automatically collapsed when loading the page.', array(
'!modules-url' => url('admin/build/modules'),
)),
);
if (module_exists('util')) {
$form['tweaks']['admin_menu_tweak_modules']['#description'] .= '<br /><strong>' . t('If the Utility module was installed for this purpose, it can be safely disabled and uninstalled.') . '</strong>';
}
$form['tweaks']['admin_menu_tweak_tabs'] = array(
'#type' => 'checkbox',
'#title' => t('Move local tasks into menu'),
'#default_value' => variable_get('admin_menu_tweak_tabs', 0),
'#description' => t('If enabled, the tabs on the current page are moved into the administration menu. This feature is only available in themes that use the CSS classes <code>tabs primary</code> and <code>tabs secondary</code> for tabs.'),
);
$form = system_settings_form($form);
$form['wipe description'] = array(
'#type' => 'item',
'#value' => t('If the administration menu displays duplicate menu items, you may need to rebuild your menu items using the <em>Wipe and rebuild</em> button.'),
);
$form['wipe'] = array(
'#type' => 'submit',
'#value' => t('Wipe and rebuild'),
'#submit' => array(
'admin_menu_wipe',
),
);
return $form;
}