{"id":15375315,"url":"https://github.com/sy-records/wp-geetest","last_synced_at":"2025-04-15T15:13:23.311Z","repository":{"id":98040603,"uuid":"189819654","full_name":"sy-records/wp-geetest","owner":"sy-records","description":"🎨基于极验 3.0，在 WordPress 的登录和评论时加入极验验证。","archived":false,"fork":false,"pushed_at":"2020-07-04T03:59:33.000Z","size":138,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T15:13:16.680Z","etag":null,"topics":["geetest","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sy-records.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://donate.qq52o.me","github":"sy-records"}},"created_at":"2019-06-02T07:58:14.000Z","updated_at":"2023-05-13T13:55:28.000Z","dependencies_parsed_at":"2023-06-27T04:16:04.975Z","dependency_job_id":null,"html_url":"https://github.com/sy-records/wp-geetest","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sy-records%2Fwp-geetest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sy-records%2Fwp-geetest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sy-records%2Fwp-geetest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sy-records%2Fwp-geetest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sy-records","download_url":"https://codeload.github.com/sy-records/wp-geetest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094933,"owners_count":21211837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geetest","wordpress","wordpress-plugin"],"created_at":"2024-10-01T14:02:36.950Z","updated_at":"2025-04-15T15:13:23.305Z","avatar_url":"https://github.com/sy-records.png","language":"PHP","funding_links":["https://donate.qq52o.me","https://github.com/sponsors/sy-records"],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003eWordPress GeeTest\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n基于极验 3.0，在 WordPress 的登录和评论时加入极验验证。\n\u003c/p\u003e\n\n## 使用\n\n1. 下载代码包上传到插件目录\n2. 编辑插件，修改`config.php` 的配置文件，填入你的[极验配置](https://gtaccount.geetest.com/sensebot/overview/)\n3. 启用插件\n\n\n## 注意事项\n\n\u003cdetails\u003e\n\u003csummary\u003e注意事项当然要点开看了，不点怎么注意，点击查看\u003c/summary\u003e\n\n 1. 插件没有设置页面，默认评论和登录时需要验证\n 2. `layer`和`jquery`默认引用`CDN`外链，如果失效请手动修改去掉注释\n 3. 极验验证码位置`css`样式不兼容的话需要自己调\n \n\u003c/details\u003e\n\n## 自定义验证\n\n只验证了正常`get`情况下的请求，所以机器人或恶意用户可以直接使用`post`请求跳过极验验证，所以需要自定义验证，可使用以下钩子增加验证\n\n```php\n// 增加登录时的验证\nfunction add_geetest_login_val() {\n    if (!empty($_POST)){\n        // 自定义内容省略\n    }\n}\nadd_action('login_form_login','add_geetest_login_val');\n\n// 增加提交评论时的验证\nfunction add_geetest_comment_val($incoming_comment) {\n\t\tif (!empty($_POST)){\n        // 自定义内容省略\n    }\n\t\t// 评论需要返回数据\n\t\treturn $incoming_comment;\n}\nadd_filter('preprocess_comment', 'add_geetest_comment_val');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsy-records%2Fwp-geetest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsy-records%2Fwp-geetest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsy-records%2Fwp-geetest/lists"}