Skip to content
Snippets Groups Projects
Commit e7334c37 authored by Jeff Geerling's avatar Jeff Geerling
Browse files

Issue #1489700 by geerlingguy: Allow comment form settings only when comment...

Issue #1489700 by geerlingguy: Allow comment form settings only when comment module is actually enabled.
parent aaef0f97
No related branches found
Tags 5.0.0-alpha1
No related merge requests found
......@@ -109,12 +109,14 @@ function honeypot_admin_form($form) {
}
// Comment forms.
$form['enabled_forms']['comment_forms'] = array('#value' => '<h5>' . t('Comment Forms') . '</h5>');
$form['enabled_forms']['honeypot_form_comment_form'] = array(
'#type' => 'checkbox',
'#title' => t('Comment forms (all)'),
'#default_value' => variable_get('honeypot_form_comment_form', 0),
);
if (module_exists('comment')) {
$form['enabled_forms']['comment_forms'] = array('#value' => '<h5>' . t('Comment Forms') . '</h5>');
$form['enabled_forms']['honeypot_form_comment_form'] = array(
'#type' => 'checkbox',
'#title' => t('Comment forms (all)'),
'#default_value' => variable_get('honeypot_form_comment_form', 0),
);
}
// Add our own submit handler to clear honeypot's form cache on save.
$form['#submit'][] = 'honeypot_admin_form_submit';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment