function xmlsitemap_node_form_node_type_form_alter in XML sitemap 6
Same name and namespace in other branches
- 6.2 xmlsitemap_node/xmlsitemap_node.module \xmlsitemap_node_form_node_type_form_alter()
- 7.2 xmlsitemap_node/xmlsitemap_node.module \xmlsitemap_node_form_node_type_form_alter()
Implementation of hook_form_FORM_ID_alter().
File
- xmlsitemap_node/
xmlsitemap_node.module, line 130 - Adds nodes to the sitemap.
Code
function xmlsitemap_node_form_node_type_form_alter(&$form, &$from_state) {
if (isset($form['identity']['type'])) {
if (!isset($form['xmlsitemap'])) {
$form['xmlsitemap'] = array(
'#type' => 'fieldset',
'#title' => t('XML sitemap'),
'#collapsible' => TRUE,
'#weight' => 30,
);
}
$form['xmlsitemap']['xmlsitemap_node_type_priority'] = array(
'#type' => 'select',
'#title' => t('Priority adjustment'),
'#description' => t('This number will be added to the priority of this content type.'),
'#default_value' => variable_get('xmlsitemap_node_type_priority_' . $form['#node_type']->type, 0.5),
'#options' => xmlsitemap_priority_options('exclude'),
);
$form['#submit'][] = 'xmlsitemap_node_type_submit';
}
}