var RecaptchaOptions = { theme : 'white', lang : 'en' , tabindex : 5 };"; echo '
'.__("Please prove you are human").''; echo recaptcha_get_html(RECAPTCHA_PUBLIC_KEY); echo '
'; } // Check response to challenge function bb_recaptcha_check() { if (!bb_recaptcha_is_register_page() || !$_POST) return; global $privatekey; $resp = recaptcha_check_answer(RECAPTCHA_PRIVATE_KEY, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp || !$resp->is_valid) { bb_get_header(); echo "

".__('Error')."

".__("Sorry, you failed to pass human test. Please go back and try again!"); bb_get_footer(); exit; } } // Register callbacks add_action('extra_profile_info', 'bb_recaptcha_print_challenge', 11); add_action('bb_send_headers', 'bb_recaptcha_check');