function nodewords_form_alter in Nodewords: D6 Meta Tags 6
Same name and namespace in other branches
- 5 nodewords.module \nodewords_form_alter()
Implements hook_form_alter().
File
- ./
nodewords.module, line 72 - Implement an API that other modules can use to implement meta tags.
Code
function nodewords_form_alter(&$form, &$form_state, $form_id) {
$bool = isset($form['type']) && isset($form['#node']) && $form_id == $form['type']['#value'] . '_node_form' && variable_get('nodewords_edit_metatags_' . $form['type']['#value'], TRUE);
if ($bool) {
$node = $form['#node'];
$form['nodewords'] = nodewords_form(NODEWORDS_TYPE_NODE, !empty($node->nodewords) ? $node->nodewords : array(), array(
'tag_options' => array(
'node_type' => $form['type']['#value'],
),
));
}
}