intersynergy-login-plugin.php
/**
     * Checks that the reCAPTCHA parameter sent with the registration
     * request is valid.
     *
     * @return bool True if the CAPTCHA is OK, otherwise false.
     */
Checks that the reCAPTCHA parameter sent with the registration
request is valid.

@return bool True if the CAPTCHA is OK, otherwise false.
Checks that the reCAPTCHA parameter sent with the registration request is valid . @return bool True if the CAPTCHA is OK otherwise false .
private function verify_recaptcha()
    {
        if (isset($_POST['g-recaptcha-response'])) {
            $captcha_response = $_POST['g-recaptcha-response'];
        } else {
            return false;
        }
        $response = wp_remote_post(
            'https://www.google.com/recaptcha/api/siteverify',
            array(
                'body' => array(
                    'secret' => get_option('intersynergy-login-recaptcha-secret-key'),
                    'response' => $captcha_response,
                ),
            )
        );
        $success = false;
        if ($response && is_array($response)) {
            $decoded_response = json_decode($response['body']);
            $success = $decoded_response->success;
        }
        return $success;
    }
private function verify_recaptcha ( ) { if ( isset ( $ _POST [ 'g-recaptcha-response' ] ) ) { $ captcha_response = $ _POST [ 'g-recaptcha-response' ] ; } else { return false ; } $ response = wp_remote_post ( 'https://www.google.com/recaptcha/api/siteverify' , array ( 'body' => array ( 'secret' => get_option ( 'intersynergy-login-recaptcha-secret-key' ) , 'response' => $ captcha_response , ) , ) ) ; $ success = false ; if ( $ response && is_array ( $ response ) ) { $ decoded_response = json_decode ( $ response [ 'body' ] ) ; $ success = $ decoded_response -> success ; } return $ success ; }
Checks that the reCAPTCHA parameter sent with the registration
 request is valid.
Checks that the reCAPTCHA parameter sent with the registration request is valid .
// This field is set by the recaptcha widget if check is successful // Verify the captcha response from Google