function admin_menu_form_alter in Administration menu 5
Same name and namespace in other branches
- 8.3 admin_menu.module \admin_menu_form_alter()
- 5.3 admin_menu.inc \admin_menu_form_alter()
- 5.2 admin_menu.module \admin_menu_form_alter()
- 7.3 admin_menu.module \admin_menu_form_alter()
Implementation of hook_form_alter() to extend devel.module.
File
- ./
admin_menu.module, line 89
Code
function admin_menu_form_alter($form_id, &$form) {
if ($form_id == 'devel_admin_settings') {
// shift system_settings_form buttons
$weight = $form['buttons']['#weight'];
$form['buttons']['#weight'] = $weight + 1;
$form['admin_menu'] = array(
'#type' => 'fieldset',
'#title' => t('Administration Menu settings'),
'#collapsible' => true,
'#collapsed' => true,
);
$form['admin_menu']['admin_menu_show_item_ids'] = array(
'#type' => 'checkbox',
'#title' => t('Display menu item IDs in Drupal Administration Menu'),
'#default_value' => variable_get('admin_menu_show_item_ids', 0),
'#description' => t('If enabled, the corresponding menu item id will appear next to each menu item link.'),
);
$form['admin_menu']['admin_menu_show_all'] = array(
'#type' => 'checkbox',
'#title' => t('Display all menu items'),
'#default_value' => variable_get('admin_menu_show_all', 0),
'#description' => t('Enable this option to disable user access checks for menu items, i.e. every menu item in the visible menu tree will be displayed to every user regardless of access permissions.'),
);
}
}