How to validate recaptcha on comments form?

There’s a preprocess_comment filter that is run before the comment is inserted in the database. You will have access to the comment’s data: add_filter( ‘preprocess_comment’ , ‘wpse321083_process_recaptcha’ ); function wpse321083_process_recaptcha( $commentdata ) { // Process recaptcha here return $commentdata; } Here’s also a good article on SitePoint.com explaining how to implement this feature in your … Read more

Adding a slider captcha to the comment system

First things first, there is quite a bit of _doing_it_wrong() in the script enqueueing. Don’t override core-bundled scripts Try removing this hook callback, and see if that fixes things: function my_scripts_method() { wp_deregister_script( ‘jquery’ ); wp_deregister_script( ‘jquery ui’ ); wp_register_script( ‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js’); wp_register_script( ‘jquery ui’, ‘https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js’); wp_enqueue_script( ‘jquery’ ); wp_enqueue_script( ‘jquery ui’ ); } add_action(‘wp_enqueue_scripts’, … Read more