Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19309

tbradley22 on "W3 Total Cache & CAPTCHA"

$
0
0

I had the same problem using really simple captcha with contact form 7 and w3 total cache for wordpress 3.2.1.

I was able to fix it by modifying the wpcf7_remove_captcha() and wpcf7_cleanup_captcha_files() functions in /contact-form-7/modules/captcha.php

1. wpcf7_remove_captcha() --> i commented out the remove function so that a captcha image is never removed while generating a new captcha image

$captcha->remove( $prefix );

2. wpcf7_cleanup_captcha_files() --> i changed the cleanup time from default 60 min to 1440 minutes (1 hour) by passing the integer 1440 in the cleanup() function.

return $captcha->cleanup(1440);
if ( $stat['mtime'] + 86400 < time() )

That is a fix for contact-form-7 but you can make the same edits to the really simple captcha functions as well. To to that just change the default $minutes in the cleanup function from 60 to 1440.


Viewing all articles
Browse latest Browse all 19309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>