function nice_menus_form_alter in Nice Menus 5
Same name and namespace in other branches
- 6.2 nice_menus.module \nice_menus_form_alter()
- 6 nice_menus.module \nice_menus_form_alter()
- 7.3 nice_menus.module \nice_menus_form_alter()
- 7.2 nice_menus.module \nice_menus_form_alter()
Implementation of hook_form_alter().
File
- ./
nice_menus.module, line 26
Code
function nice_menus_form_alter($form_id, &$form) {
switch ($form_id) {
case 'system_theme_settings':
// This is a global setting, so only insert the field
// on the global settings page.
if (arg(4)) {
return;
}
// Have to add a custom submit handler since this form doesn't use
// the standard system submit handler.
$form['#submit'] += array(
'nice_menus_system_theme_settings_submit' => array(),
);
// Add global theme setting for a custom CSS file.
$form['nice_menus_custom_css'] = array(
'#type' => 'textfield',
'#title' => t('Path to custom Nice Menus CSS file'),
'#description' => t('To override the default Nice Menus CSS layout, enter the path to your custom CSS file. It should be a relative path from the root of your Drupal install (e.g. sites/all/themes/example/mymenu.css).'),
'#default_value' => variable_get('nice_menus_custom_css', ''),
// Field appears below submit buttons without this -- yucky.
'#weight' => 0,
);
break;
}
}