function comment_delete_settings_form in Comment Delete 7
Same name and namespace in other branches
- 6 comment_delete.admin.inc \comment_delete_settings_form()
Page callback for comment deletion settings form.
1 string reference to 'comment_delete_settings_form'
- comment_delete_menu in ./
comment_delete.module - Implements hook_menu().
File
- ./
comment_delete.admin.inc, line 11 - comment_delete.admin.inc
Code
function comment_delete_settings_form() {
$form['comment_delete_default'] = array(
'#type' => 'radios',
'#title' => t('Default Delete Option'),
'#description' => t('Choose the default option selected when a comments deleted.'),
'#options' => array(
0 => t('Delete comment and replies'),
1 => t('Delete comment and move replies up'),
2 => t('Delete comment and keep replies'),
),
'#required' => TRUE,
'#default_value' => variable_get('comment_delete_default', 0),
);
$form['comment_delete_soft'] = array(
'#type' => 'checkbox',
'#title' => t('Soft delete comments'),
'#description' => t('When enabled the comment subject+body is cleared but comment+author is retained.'),
'#default_value' => variable_get('comment_delete_soft', 0),
);
$form['comment_delete_threshold'] = array(
'#type' => 'textfield',
'#title' => t('Threshold Period'),
'#description' => t('Max allowable time comments can be deleted after creation. Enter zero (0) to disable.'),
'#size' => 10,
'#default_value' => variable_get('comment_delete_threshold', 0),
);
$form['comment_delete_message'] = array(
'#type' => 'textarea',
'#title' => t('Confirmation Message'),
'#description' => t('Customize confirmation message shown after comment has been deleted.'),
'#default_value' => variable_get('comment_delete_message', ''),
);
return system_settings_form($form);
}