function theme_recaptcha_custom_widget in reCAPTCHA 7
Same name and namespace in other branches
- 5.2 recaptcha.module \theme_recaptcha_custom_widget()
- 6 recaptcha.module \theme_recaptcha_custom_widget()
Theme function: creates the custom themed recaptcha widget.
1 theme call to theme_recaptcha_custom_widget()
- recaptcha_captcha in ./
recaptcha.module - Implements hook_captcha().
File
- ./
recaptcha.module, line 257 - Uses the reCAPTCHA web service to improve the CAPTCHA system.
Code
function theme_recaptcha_custom_widget() {
$recaptcha_only_if_incorrect_sol = t('Incorrect please try again');
$recaptcha_only_if_image_enter = t('Enter the words above:');
$recaptcha_only_if_audio_enter = t('Enter the words you hear:');
$recaptcha_get_another_captcha = t('Get another CAPTCHA');
$recaptcha_only_if_image = t('Get an audio CAPTCHA');
$recaptcha_only_if_audio = t('Get an image CAPTCHA');
$help = t('Help');
return <<<EOT
<div id="recaptcha_image"></div>
<div class="recaptcha_only_if_incorrect_sol" style="color:red">{<span class="php-variable">$recaptcha_only_if_incorrect_sol</span>}</div>
<span class="recaptcha_only_if_image">{<span class="php-variable">$recaptcha_only_if_image_enter</span>}</span>
<span class="recaptcha_only_if_audio">{<span class="php-variable">$recaptcha_only_if_audio_enter</span>}</span>
<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />
<div class="recaptcha_get_another_captcha"><a href="javascript:Recaptcha.reload()">{<span class="php-variable">$recaptcha_get_another_captcha</span>}</a></div>
<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')">{<span class="php-variable">$recaptcha_only_if_image</span>}</a></div>
<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')">{<span class="php-variable">$recaptcha_only_if_audio</span>}</a></div>
<div class="recaptcha_help"><a href="javascript:Recaptcha.showhelp()">{<span class="php-variable">$help</span>}</a></div>
EOT;
}