diff options
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.module | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 45cad76eb..951ac3c95 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -504,10 +504,10 @@ function comment_nodeapi_view($node, $teaser) { } /** - * Implementation of hook_form_alter(). + * Implementation of hook_form_FORM_ID_alter(). */ -function comment_form_alter(&$form, $form_state, $form_id) { - if ($form_id == 'node_type_form' && isset($form['identity']['type'])) { +function comment_form_node_type_form_alter(&$form, $form_state) { + if (isset($form['identity']['type'])) { $form['comment'] = array( '#type' => 'fieldset', '#title' => t('Comment settings'), @@ -571,7 +571,13 @@ function comment_form_alter(&$form, $form_state, $form_id) { '#options' => array(t('Display on separate page'), t('Display below post or comments')), ); } - elseif (!empty($form['#node_edit_form'])) { +} + +/** + * Implementation of hook_form_alter(). + */ +function comment_form_alter(&$form, $form_state, $form_id) { + if (!empty($form['#node_edit_form'])) { $node = $form['#node']; $form['comment_settings'] = array( '#type' => 'fieldset', |