function talk_form_alter in Talk 6
Same name and namespace in other branches
- 5 talk.module \talk_form_alter()
- 7 talk.module \talk_form_alter()
Implementation of hook_form_alter().
File
- ./
talk.module, line 198 - Comments are displayed in a separate 'talk' tab, for node types you wish
Code
function talk_form_alter(&$form, $form_state, $form_id) {
// Add option to comment options of node types.
if ($form_id == 'node_type_form' && isset($form['identity']['type']) && module_exists('comment')) {
$form['comment']['comment_talk'] = array(
'#type' => 'checkbox',
'#title' => t('Display comments on separate talk page'),
'#prefix' => '<strong>' . t('Talk pages:') . '</strong>',
'#weight' => 5,
'#default_value' => talk_activated($form['#node_type']->type),
);
}
}