Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

HOTFIX for v2.8 Contact Form 7 reCAPTCHA

$
0
0

Replies: 0

Hello, I seem to have mitigated the issue that v2.8 causes with Contact Form 7’s built in reCAPTCHA with by replacing the sgr_check function with the following code block:

function sgr_check() {
	if (get_option("sgr_site_key") && get_option("sgr_secret_key") && !is_user_logged_in()) {
		add_action("login_enqueue_scripts", "frontend_sgr_script");
		if (!function_exists( 'wpcf7_enqueue_scripts' ) ) {
			add_action("wp_enqueue_scripts", "frontend_sgr_script");
		}
		
		$sgr_verify_list = array("preprocess_comment", "wp_authenticate_user", "registration_errors", "lostpassword_post", "resetpass_post", "bp_signup_validate", "woocommerce_register_post");
		
		foreach($sgr_verify_list as $sgr_verify) {
			add_action($sgr_verify, "sgr_verify");
		}
	}
}
  • This topic was modified 26 minutes ago by traxus. Reason: Title specificity

Viewing all articles
Browse latest Browse all 59525

Trending Articles