[Plugin: Contact Form 7] CAPTCHA width fix
-
Really Simple CAPTCHA plugin that WPCF7 (v7.3.2.1) uses has a default char_length = 4 (no. of chars in CAPTCHA).
The default width settings for small, medium and large are in modules/captcha.php lines 459-481:
if ( $image_size = array_shift( $image_size_array ) ) { preg_match( '%^size:([smlSML])$%', $image_size, $is_matches ); switch ( strtolower( $is_matches[1] ) ) { case 's': $op['img_size'] = array( 60, 20 ); $op['base'] = array( 6, 15 ); $op['font_size'] = 11; $op['font_char_width'] = 13; break; case 'l': $op['img_size'] = array( 84, 28 ); $op['base'] = array( 6, 20 ); $op['font_size'] = 17; $op['font_char_width'] = 19; break; case 'm': default: $op['img_size'] = array( 72, 24 ); $op['base'] = array( 6, 18 ); $op['font_size'] = 14; $op['font_char_width'] = 15; } }
The $op(‘img_size’][0] values can be doubled to accomodate upto 8 chars for char_length by editing the really-simple-captcha.php (v1.5) at line 36 to override the captcha default of 4:
$op['char_length'] = 6;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Contact Form 7] CAPTCHA width fix’ is closed to new replies.