function _image_captcha_get_font in CAPTCHA 5.3
Same name and namespace in other branches
- 6 image_captcha/image_captcha.module \_image_captcha_get_font()
Returns:
- the path to the image CAPTCHA font or FALSE when an error occured
- error message
3 calls to _image_captcha_get_font()
- image_captcha_captcha in image_captcha/
image_captcha.module - Implementation of hook_captcha().
- _image_captcha_generate_image in image_captcha/
image_captcha.user.inc - base function for generating a image CAPTCHA
- _image_captcha_settings_form in image_captcha/
image_captcha.admin.inc - Helper function for the configuration form for image_captcha Called by image_captcha_settings_form() (which determines the real form_id 'image_captcha_settings_form')
File
- image_captcha/
image_captcha.module, line 94 - Implementation of image CAPTCHA for use with the CAPTCHA module
Code
function _image_captcha_get_font() {
$font = variable_get('image_captcha_font', 'BUILTIN');
$errmsg = FALSE;
if ($font != 'BUILTIN' && (!is_file($font) || !is_readable($font))) {
$errmsg = t('Could not find or read the configured font "%font" for the image CAPTCHA.', array(
'%font' => $font,
));
$font = FALSE;
}
return array(
$font,
$errmsg,
);
}