secret = $secret; } /** * Verify captcha function * @param $response * @return bool */ public function VerifyCaptcha($response) { $url = $this->google_url . "?secret=" . $this->secret . "&response=" . $response; $data = wp_remote_get($url); $res = json_decode($data, TRUE); if ($res['success'] == 'true') return TRUE; else return FALSE; } }