-
-
Notifications
You must be signed in to change notification settings - Fork 393
feat: Adding Cloudflare Turnstile support #1273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: preview
Are you sure you want to change the base?
Conversation
在commit 6d4ec48中,我已经完成国际化和页面调整,另外我注意到登陆页面vcaptcha验证出错的提示并没有做本地化,所以我暂时没有做出错提示的本地化,如需要的话我后期加上。 @robert1chi |
我认为应该为turnstile加载引入占位符号以避免网络不畅时turnstile未能及时加载,我看到vaptcha代码中有这一部分,但是我没能成功移植,css样式太令人困惑了。非常抱歉打扰您。@robert1chi |
TODO: function test |
整体没有问题,但是有点小瑕疵,登录页不论是否有登录动作都会提示请完成验证码,即使小组件还没有加载出来 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Cloudflare Turnstile as an alternative captcha solution, updating theme options, language files, and integrating a new Turnstile class along with modifications to login, registration, and lost password flows.
- New theme options for specifying Turnstile site/secret keys and theme selection.
- New language entries and modifications to the .pot file to include Cloudflare Turnstile strings.
- Addition of a Turnstile integration class with corresponding form hooks and validation logic in functions.php.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
File | Description |
---|---|
opt/options/theme-options.php | Added new captcha options and Turnstile site/secret key settings. |
opt/languages/sakurairo_csf.pot | Added language entries for Cloudflare Turnstile support. |
inc/classes/Turnstile.php | Introduced a new class for Cloudflare Turnstile integration. |
functions.php | Updated login, registration, and lost password flows with Turnstile support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
通过一些微小的改动使主题支持turnstile,已完成核心代码,测试可以使用
没有完成的部分:
1、国际化字符串
2、测试中发现cloudflare turnstile的验证框会顶到登录框右边,应该可以通过调整css样式解决