function xmlsitemap_taxonomy_form_taxonomy_form_vocabulary_alter in XML sitemap 6
Same name and namespace in other branches
- 6.2 xmlsitemap_taxonomy/xmlsitemap_taxonomy.module \xmlsitemap_taxonomy_form_taxonomy_form_vocabulary_alter()
- 7.2 xmlsitemap_taxonomy/xmlsitemap_taxonomy.module \xmlsitemap_taxonomy_form_taxonomy_form_vocabulary_alter()
Implementation of hook_form_FORM_ID_alter().
File
- xmlsitemap_taxonomy/
xmlsitemap_taxonomy.module, line 86 - Adds taxonomy terms to the sitemap.
Code
function xmlsitemap_taxonomy_form_taxonomy_form_vocabulary_alter(&$form, &$from_state) {
$form['xmlsitemap'] = array(
'#type' => 'fieldset',
'#title' => t('XML sitemap'),
'#collapsible' => TRUE,
);
$form['xmlsitemap']['xmlsitemap_taxonomy_vocabulary_priority'] = array(
'#type' => 'select',
'#title' => t('Priority'),
'#description' => t('This will be the default priority of terms in this vocabulary.'),
'#default_value' => variable_get('xmlsitemap_taxonomy_vocabulary_priority_' . $form['vid']['#value'], 0.5),
'#options' => xmlsitemap_priority_options('exclude'),
);
$form['submit']['#weight'] = isset($form['submit']['#weight']) ? $form['submit']['#weight'] + 1 : 1;
$form['delete']['#weight'] = isset($form['delete']['#weight']) ? $form['delete']['#weight'] + 2 : 2;
}