function xmlsitemap_settings in XML sitemap 6
Form builder; return the sitemap settings form.
1 string reference to 'xmlsitemap_settings'
- xmlsitemap_menu in ./
xmlsitemap.module - Implementation of hook_menu().
File
- ./
xmlsitemap.admin.inc, line 21 - XML sitemap settings UI.
Code
function xmlsitemap_settings() {
$form['general'] = array(
'#type' => 'fieldset',
'#title' => t('Settings'),
'#collapsible' => TRUE,
'#weight' => -1,
);
$form['general']['xmlsitemap_all_links_to_default_language'] = array(
'#type' => 'checkbox',
'#title' => t('Add all the links to the default language sitemap'),
'#default_value' => variable_get('xmlsitemap_all_links_to_default_language', 0),
'#description' => t('This option will be used only when the language negotiation uses a path prefix mechanism.'),
);
$form['general']['xmlsitemap_cron_limit'] = array(
'#type' => 'select',
'#title' => t('Cron limit'),
'#description' => t('The number of links that are updated in each pass of a <a href="@cron">cron maintenance task</a>.', array(
'@cron' => url('admin/reports/status'),
)),
'#default_value' => variable_get('xmlsitemap_cron_limit', 100),
'#options' => xmlsitemap_cron_options(),
);
$form['general']['xmlsitemap_cache_directory'] = array(
'#type' => 'textfield',
'#title' => t('Cache directory'),
'#value' => variable_get('xmlsitemap_cache_directory', file_directory_path() . '/xmlsitemap'),
'#size' => 60,
'#description' => t('The directory where the cache files are created; change it only if you are having problems with the default setting.'),
'#disabled' => TRUE,
);
$form['general']['xmlsitemap_use_stylesheet'] = array(
'#type' => 'checkbox',
'#title' => t('Use stylesheet'),
'#default_value' => variable_get('xmlsitemap_use_stylesheet', FALSE),
'#description' => t('Specify a xml stylesheet for the sitemap?'),
);
$form['frontpage'] = array(
'#type' => 'fieldset',
'#title' => t('Front page'),
'#collapsible' => TRUE,
);
$form['frontpage']['xmlsitemap_front_page_changefreq'] = array(
'#type' => 'select',
'#title' => t('Front page change frequency'),
'#description' => t('The change frequency associated with the front page.'),
'#default_value' => variable_get('xmlsitemap_front_page_changefreq', 3600),
'#options' => array(
'3600' => t('Hourly'),
'86400' => t('Daily'),
'604800' => t('Weekly'),
'2419200' => t('Monthly'),
'29030400' => t('Yearly'),
),
);
$form['frontpage']['xmlsitemap_front_page_priority'] = array(
'#type' => 'select',
'#title' => t('Front page priority'),
'#description' => t('The absolute priority for the front page.'),
'#default_value' => variable_get('xmlsitemap_front_page_priority', 1),
'#options' => xmlsitemap_priority_options(),
);
$form = system_settings_form($form);
$form['buttons']['#weight'] = 10;
$form['#submit'][] = 'xmlsitemap_settings_submit';
$form['#validate'][] = 'xmlsitemap_settings_validate';
return $form;
}