function google_captcha_admin_settings in Google Captcha 7
Form callback; administrative settings for Google No CAPTCHA.
1 string reference to 'google_captcha_admin_settings'
- google_captcha_menu in ./
google_captcha.module - Implements hook_menu().
File
- ./
google_captcha.admin.inc, line 11 - Provides the Google No CAPTCHA administration settings.
Code
function google_captcha_admin_settings() {
// Load the recaptcha library. Error if library does not load.
if (!_google_captcha_load_library()) {
drupal_set_message(t('Error loading recaptchalib.'), 'error');
return FALSE;
}
$form = array();
$form['google_captcha_site_key'] = array(
'#type' => 'textfield',
'#title' => t('Site Key'),
'#default_value' => variable_get('google_captcha_site_key', ''),
'#maxlength' => 40,
'#description' => t('The public key given to you when you <a href="@url" target="_blank">register for reCAPTCHA</a>.', array(
'@url' => 'https://www.google.com/recaptcha/admin#createsite',
)),
'#required' => TRUE,
);
$form['google_captcha_private_key'] = array(
'#type' => 'textfield',
'#title' => t('Private Key'),
'#default_value' => variable_get('google_captcha_private_key', ''),
'#maxlength' => 40,
'#description' => t('The public key given to you when you <a href="@url" target="_blank">register for reCAPTCHA</a>.', array(
'@url' => 'https://www.google.com/recaptcha/admin#createsite',
)),
'#required' => TRUE,
);
return system_settings_form($form);
}