Dear newterminator3,
A few reCAPTCHA functions are changing names in the next release of the plugin. This is to avoid a fatal error on the server (“cannot redeclare [name-of-the-function]() previously declared in…”) in the case where another plugin uses the same Google’s functions library to produce the reCAPTCHA challenge (or to verify the response).
The change is just the addition of a “nurc_” prefix to the existing function name as to make it unique.
So if you are still using the references given two months ago, I suggest you change them to the conditional format below for awhile. This format will give your site the ability to automatically change to the new name as soon as the new version of the plugin is released.
To display the captcha: no changes.
nurc_recaptcha_challenge();
To verify the response:
if(class_exists('nurc_ReCaptchaResponse')){
$result = new nurc_ReCaptchaResponse(); // sets $result as a class variable
}else{
$result = new ReCaptchaResponse();
}
if(function_exists('nurc_recaptcha_check_answer')){
$result = nurc_recaptcha_check_answer(get_option('sktnurc_privtkey'), $_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field'] );
}else{
$result = recaptcha_check_answer(get_option('sktnurc_privtkey'), $_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field'] );
}
if ($result->is_valid) { // captcha passed, so let's run anything else...
} else { // captcha is not valid, so display some warning and block access...
}
I am sorry for the trouble.