Easy Cache fix
-
An easy 1-line fix to make this captcha working with any static cache plugin, add the following code needs to be added to your theme’s function.php:
add_action( 'wp_footer', function() { echo "<script> jQuery('#comment').keydown(function() {var a=jQuery(this); !a.hasClass('clicked')&&a.addClass('clicked')&&jQuery('.cptch_reload_button').click();}); </script>"; });
It just “clicks” the captcha refresh button as soon as the user starts typing a comment. This way it won’t add an extra AJAX request on normal pageviews, only if user really wants to submit a comment.
@bestwebsoft: Please add this to the plugin
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Easy Cache fix’ is closed to new replies.