| 开发者 | friendlycaptcha |
|---|---|
| 更新时间 | 2026年6月23日 21:28 |
| PHP版本: | 7.3 及以上 |
| WordPress版本: | 6.8 |
| 版权: | GPL v2 or later |
| 版权网址: | 版权信息 |
friendly-captcha folder to the /wp-content/plugins/ directoryThe Friendly Captcha plugin supports WordPress core and many plugins with forms automatically. To use Friendly Captcha, you can create an account at www.friendlycaptcha.com and create a Site Key and API Key there. It is best to copy both keys and save them in a safe place. Then go to the Friendly Captcha plugin settings page and enter the created site key and API key. Below that, select the forms you want to protect. Finally, save these settings by clicking on the "Save Changes" button at the end of the settings page.
Open a PR on GitHub here or just email the authors of the plugin itself. Adding Friendly Captcha support is typically quite a quick task for most plugins.
Enable the Generic Integration (for custom and unsupported plugins) option in the Friendly Captcha settings page. This exposes two WordPress filters that you can use from your own theme or plugin code to render the widget and verify the solution.
1. Render the widget inside your form
Apply the frc_captcha_append_widget filter to append the widget HTML wherever you want it to appear (typically just before the submit button):
<?php echo apply_filters('frc_captcha_append_widget', ''); ?>
2. Verify the solution on submit
When the form is submitted, read the captcha solution from $_POST and pass it through the frc_captcha_validation filter. The second argument controls the network-failure behavior: true lets the user through (lax), false blocks them (strict).
<?php $solution = isset($_POST['frc-captcha-solution']) ? $_POST['frc-captcha-solution'] : ''; $is_human = apply_filters('frc_captcha_validation', $solution, true); if (!$is_human) { // Reject submission, e.g. show an error. } ?>
If you have Friendly Captcha v2 enabled, use frc-captcha-response as the field name instead of frc-captcha-solution.
Please see our website at: www.friendlycaptcha.com
friendly-captcha-sdk to version 0.1.10, which fixes compatibility with some old browsers (including Safari 11.x and 12.x).friendly-captcha-sdk to version 0.1.8.friendly-challenge to version 0.9.18 which adds support for more languages (Arabic, Korean, Hebrew, Thai).Settings section in the Wordpress admin dashboard.api.friendlycaptcha.com instead of friendlycaptcha.com (no user-facing changes).