function xmlsitemap_node_form_xmlsitemap_settings_alter in XML sitemap 6
Implementation of hook_form_FORM_ID_alter().
File
- xmlsitemap_node/
xmlsitemap_node.module, line 154 - Adds nodes to the sitemap.
Code
function xmlsitemap_node_form_xmlsitemap_settings_alter(&$form, &$from_state) {
$options = xmlsitemap_priority_options();
$form['xmlsitemap_node'] = array(
'#type' => 'fieldset',
'#title' => t('Node settings'),
'#description' => t('The settings for the nodes to include in the sitemap.'),
'#collapsible' => TRUE,
'#weight' => 1,
);
$form['xmlsitemap_node']['xmlsitemap_node_promote_priority'] = array(
'#type' => 'select',
'#title' => t('Promotion priority adjustment'),
'#description' => t("This number will be added to the priority of each post that is promoted to the front page. This setting doesn't apply for the nodes for which the priority is overriden."),
'#default_value' => variable_get('xmlsitemap_node_promote_priority', 0.3),
'#options' => $options,
);
$form['xmlsitemap_node']['xmlsitemap_node_comment_priority'] = array(
'#type' => 'select',
'#title' => t('Comment ratio priority adjustment'),
'#description' => t("This number will be added to the priority of the post with the highest number of comments; for the other posts, the number is calculated proportionally to the number of comments. This doesn't apply if the maximum number of comments is one, nor for the nodes for which the priority is overriden."),
'#default_value' => variable_get('xmlsitemap_node_comment_priority', 0.2),
'#options' => $options,
);
}