JS; } public function html() { return <<

Vaptcha Initializing...
HTML; } public function checkVaptcha($url, $token, $ip) { $param = [ 'id' => iro_opt('vaptcha_vid'), 'secretkey' => iro_opt('vaptcha_key'), 'scene' => iro_opt('vaptcha_scene'), 'token' => $token, 'ip' => $ip, ]; return $this->post($url, $param); } public function post($url, $param = []) { $response = wp_safe_remote_post($url, [ 'timeout' => 15, 'body' => $param, ]); if (is_wp_error($response)) { $errorMessage = $response->get_error_message(); return $errorMessage; } else { return json_decode($response['body']); } } }