function commentformsettings_elements_default in Node and Comments Form Settings 6.3
Same name and namespace in other branches
- 6.2 commentformsettings/commentformsettings.module \commentformsettings_elements_default()
- 7.3 commentformsettings/commentformsettings.module \commentformsettings_elements_default()
- 7.2 commentformsettings/commentformsettings.module \commentformsettings_elements_default()
Define the element and a default value
If you're making a patch define here the name of the element and the default value, try to keep the array sorted by alphabetical order for readability purposes
1 => usually means Disabled 0 => usually means Enabled
4 calls to commentformsettings_elements_default()
- commentformsettings_form_alter in commentformsettings/
commentformsettings.module - Implementation of hook_form_alter()
- commentformsettings_purge in commentformsettings/
commentformsettings.module - commentformsettings_settings_submit in commentformsettings/
commentformsettings.module - Submit callback for the node form alter
- _commentformsettings_settings_form in commentformsettings/
includes/ settings_comments.inc
File
- commentformsettings/
commentformsettings.module, line 22 - main file, only one hook_form_alter to change several settings
Code
function commentformsettings_elements_default() {
return array(
'cfs_anonymousname' => 0,
'cfs_anonymousmail' => 0,
'cfs_anonymoushomepage' => 0,
'cfs_author' => 0,
'cfs_comment_cancel' => 1,
'cfs_inputformat' => 0,
'cfs_newadmin' => 1,
// Since the element 'cfs_pnc' (in the form) is #tree => TRUE, we build an array or arrays
// so is detected
'cfs_pnc' => array(
'cfs_post_new_comment' => 0,
'cfs_post_new_comment_value' => '',
'cfs_post_new_comment_tag' => 'h2',
),
'cfs_preview' => 0,
'cfs_size' => 10,
'cfs_submit' => t('Submit'),
'cfs_title' => 0,
);
}