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

How to disable reCaptcha v3 except on Contact Form 7 pages?

I’d put the dequeue statements inside the ‘if’, replacing the $loadscripts line. No need to set the flag and then check the flag to dequeue. That might simplify the code for further debugging. Edited: suggested code corrections: function contactform_dequeue_scripts() { if (is_singular()) { $post = get_post(); if (has_shortcode($post->post_content, ‘contact-form-7’)) { wp_dequeue_script(‘contact-form-7’); wp_dequeue_script(‘google-recaptcha’); wp_dequeue_style(‘contact-form-7’); } } … Read more

Help with verifying google recaptcha in a custom form

You need to validate the reCAPTCHA immediately once you POST the form. You’re just sending a POST to the same page, so it should be done before any other handling. If it does not validate, you need to show the form again, with an error message. function recaptcha_validated(){ if( empty( $_POST[‘g-recaptcha-response’] ) ) return FALSE; … Read more

Is there a plugin to protect downloads with recaptcha?

None that I know of… However, this could be achieved indirectly by using a download manager plugin such as this one which has the option to allow downloads only to logged in users. The indirect solution would then come in the form of using one of the multitude of plugins which require captcha/reCaptcha as part … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)