function xmlsitemap_menu_form_alter in XML sitemap 5.2
Implementation of hook_form_alter().
File
- xmlsitemap_menu/
xmlsitemap_menu.module, line 20 - Adds menu items to the sitemap.
Code
function xmlsitemap_menu_form_alter($form_id, &$form) {
switch ($form_id) {
case 'xmlsitemap_settings_sitemap':
$form['xmlsitemap_menu'] = array(
'#type' => 'fieldset',
'#title' => t('Menu settings'),
'#description' => t('The settings for the menus to include in the sitemap.'),
'#collapsible' => TRUE,
);
$form['xmlsitemap_menu']['xmlsitemap_menu_menus'] = array(
'#type' => 'checkboxes',
'#title' => t('Menus to include in sitemap'),
'#default_value' => array_filter(variable_get('xmlsitemap_menu_menus', array())),
'#options' => menu_get_root_menus(),
'#checkall' => TRUE,
);
$form['buttons']['#weight'] = 1;
break;
}
}