function nodewords_form_taxonomy_form_vocabulary_alter in Nodewords: D6 Meta Tags 6
Implements hook_form_FORM_ID_alter().
File
- ./
nodewords.module, line 237 - Implement an API that other modules can use to implement meta tags.
Code
function nodewords_form_taxonomy_form_vocabulary_alter(&$form, &$form_state) {
if (isset($form['vid']['#value'])) {
$id = $form['vid']['#value'];
if (!empty($form_state['values']['nodewords'])) {
$tags = $form_state['values']['nodewords'];
}
elseif (isset($id) && is_numeric($id)) {
$tags = nodewords_load_tags(NODEWORDS_TYPE_VOCABULARY, $id);
}
else {
$tags = array();
}
$form['nodewords'] = nodewords_form(NODEWORDS_TYPE_VOCABULARY, $tags);
// Ensure the submit & delete buttons are at the bottom. Hopefully.
$form['submit']['#weight'] = 1000;
$form['delete']['#weight'] = 1001;
}
}