reCaptcha for login, signup, comment forms, Ninja Forms and Contact Form 7.
Integrate reCaptcha in your blog. Supports no Captcha as well as old style recaptcha.
Provides of the box integration for signup, login, comment formsand Ninja Forms as well
as a plugin API for your own integrations.
Features:
Localizations
Latest Files on GitHub: https://github.com/tareq1988/wp-recaptcha-integration
Compatibility
On a WP Multisite you can either activate the plugin network wide or on a single site.
Activated on a single site everything works as usual.
With network activation entering the API key and setting up where a captcha is required
is up to the network admin. A blog admin can override the API key e.g. when his blog is
running under his/her own domain name.
Known Limitations
-
You can’t have more than one old style reCaptcha on a page. This is a limitiation of
reCaptcha itself. If that’s an issue for you, you should use the no Captcha Form.
-
A No Captcha definitely requires client side JavaScript enabled. That’s how it does its
sophisticated bot detection magic. There is no fallback. If your visitor does not have
JS enabled the captcha test will not let him through.
-
On a Contact Form 7 when the reCaptcha is disabled (e.g. for logged in users) the field
label will be still visible. This is due to CF7 Shortcode architecture, and can’t be fixed.
To handle this there is a filter recaptcha_disabled_html
. You can return a message for your logged-in
users here. Check out the GitHub Repo for details.
-
As of version 4.3 CF7 comes with its own recaptcha. Both are supposed to work together.
I you want to keep the WP ReCaptcha functionality, e.g. if you want to hide the captcha
from known users, leave the integration in the CF7 settings unconfigured.
-
Old style reCaptcha does not work together with WooCommerce.
-
In WooCommerce the reset password form can not be protected by a captcha. Woocommerce does
not fire any action in the lost password form, so there is no way for the plugin to hook in.
Take a look at this thread for a workaround.
-
Due to a lack of filters there is no (and as far as one can see, there will never be)
support for the MailPoet subscription form.
Plugin API
The plugin offers some filters to allow themes and other plugins to hook in.
See GitHub-Repo for details.
Screenshots
Plugin Settings (v 1.1.4)
Ninja Form Integration
Contact Form 7 Integration
FAQ
The login captcha says ‘ERROR: (something somthing)’. What can I do?
If it says ‘Invalid sitekey’ and you checked the ‘Prevent lockout’ option on the plugin
settings (it’s on by default) you can log in with an administrator account and ignore the
captcha. If the keys are really invalid, the plugin will let you in, so you can set up a
new keypair.
When you see “Invalid domain for site key”, then the key is okay in general, but not for
your domain. The server can not test this case, so an effective lockout prevention is not
possible.
You will either need one of the following:
– access to the settings for your sitekey on reCaptcha API key administration
– access to your WordPress installation (via SSH or FTP) or database access
– database access
With API key admin
-
Look at source code of the login page.
-
Find the part saying data-sitekey="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
(The XXX-part should be your sitekey.)
-
Go to the Google reCaptcha API key administration
-
Find the list entry with the sitekey from step 2
-
If lockout prevention is enabled you can simply delete the key set up a new one.
If not enter your domain name at “Domains” in a new line and wait up to 30 minutes.
With FTP Access:
-
Add this line of Code somewhere at the end of your theme functions.php:
add_filter(‘wp_recaptcha_required’,’__return_false’);
This will disable the chaptcha everywhere.
-
Set up a new keypair and test it.
-
Remove the line above from your theme functions.php.
If you have Database access
-
Execute the following SQL-Commands in your Database:
DELETE FROM wp_options WHERE option_name = ‘recaptcha_publickey’;
DELETE FROM wp_options WHERE option_name = ‘recaptcha_privatekey’;
(Please note that wp_options
might have a different prefix in your installation.)
-
After the login you will see a message asking you to set up the API keys.
-
Set up a new keypair on Google and test it.
If none of these works for you
That’s too bad…
ChangeLog
v1.2.5 (11 October, 2021)
- WordPress 5.8.1 compatibility
v1.2.4 (6 July, 2020)
- Removed abandonment notice, plugin is no longer unmaintained.
1.2.1
- Drop most of Contact form 7 and Ninja Forms support. (Both have their own recaptcha now)
- Register Form compatibility with WooCommerce 3.0+ Thanks to ywatt and MrFent37
- Fix WSOD
1.2.0
1.1.11
- Code: Move plugin main class to include directory
- Update: Disable 2.0 updates on PHP < 5.4
1.1.10
- Feature: Changed Contact Form 7 support: As of version 4.3 CF7 comes with its own recaptcha. The plugin now just makes sure both captchas work together. It also keeps the API keys in sync.
- Fix: Disable Captcha for logged in users now respects custom roles without read capability. (Thanks to @lainme)
1.1.9
- Fix: Layout issues on recaptcha nojs fallback (thanks to nurupo)
- Metadata: add plugin textdomain
1.1.8
- Feature: Support AwesomeSupport
- Feature: Support bbPress new Topics and posts
- L10n: italian
- Fix: Layout issue on theme twenty fifteen (recaptcha)
1.1.7
- Fix: Compatibility with CF7 4.2 User Interface
1.1.6
- Fix: Skip Ninja Forms required check
1.1.5
- Feature: Noscript fallback option for noCaptcha
- Feature: Option for WP 4.2 compatible hook on comment form.
- Fix: Remove automatic key testing in Backend.
- L10n: Improved de_DE (thx @quassy)
- L10n: Updated pt_BR (thx again man)
1.1.4
- Comments: get back to
comment_form_defaults
filter (was introduced in 1.1.3)
- Fix: Get key option
- Fix: Key testing return value
1.1.3
- Comments: use filter
comment_form_submit_button
in WP >= 4.2
- WooCommerce: Add action listener to
woocommerce_lostpassword_form
(probably functional in WC 2.3.8).
- Introduce
{$feature}recaptcha_html
filters for custom form integration.
- Introduce filter
wp_recaptcha_cf7_shortcode_wrap
.
1.1.2
- Fix: Was not possible to uncheck lockout setting.
- Fix: Potential JS error when ‘Disable Submit Buttons’ was enabled.
1.1.1
- Filter:
wp_recaptcha_do_scripts
allow disabling recaptcha scripts on certain pages.
- Filter:
wp_recaptcha_print_login_css
, allow disabling login CSS.
- Fix: Didn’t render with Submit Button Disabling checked
- Fix: Use
add_query_arg()
to generate recaptcha API URL
1.1.0
- Feature: Prevent Lockout – Admins can still log in when the API keys are invalid
- Feature: Customize error message on contact form 7 and ninja forms
- Filters: add actions
recaptcha_print
, print_comments_recaptcha
and filters recaptcha_valid
, recaptcha_error
for custom forms.
- Redesign: settings page
- Fix: woocommerce checkout form: fix unnecessary captcha test on new customer registration
- Fix: settings: testing keys for multiple times
- Fix: settings: key setup -> cancel button target
- Fix: settings: test keys only with a nocaptcha
1.0.9
- Fix: Preserve PHP 5.2 compatibility
1.0.8
- Feature: Individually set captcha theme in CF7 and Ninja forms (NoCaptcha only, old recaptcha not supported)
- Fix: PHP Warning in settings.
- Fix: PHP Fatal when check a old reCaptcha.
- Fix: js error with jQuery not present
- Fix: woocommerce checkout
- L10n: add Spanish
1.0.7
- Fix: Fatal error in settings
- Fix: messed up HTML comments
- Code: Put NinjaForms + CF7 handling into singletons
1.0.6
- Code: separate classes for recaptcha / nocaptcha
- Code: Class autoloader
- Fix: avoid double verification
- Fix: CF7 4.1 validation
1.0.5
- Add Language option
- Brasilian Portuguese localization
- Fix: conditionally load recaptcha lib.
- Fix: js error after cf7 validation error.
1.0.4
- Add WooCommerce Support (checkout page)
- Multisite: protect signup form as well.
- Reset noCaptcha after ajax calls (enhance compatibility with Comment Form Ajax plugin)
- Fix: incorrect redirect after saving Network settings
1.0.3
- Add BuddyPress support
- Action hook for wp_recaptcha_checked
- NoCaptcha: add non-js fallback.
- Code: pass
WP_Error
to wp_die()
when comment captcha fails.
- Code: Rename filters recaptcha_required > wp_recaptcha_required and recaptcha_disabled_html > wp_recaptcha_disabled_html
- Happy New Year!
1.0.2
- Feature: option to disable submit button, until the captcha is solved
- Rearrange comment form (put captcha above submit button)
- Fix: NoCaptcha did not refresh after submitting invalid ninja form via ajax
1.0.1
- Fix API Key test
- Fix theme select
1.0.0
- Allow more than one no Captcha per page
- Test captcha verification in Settings
- Multisite support.
0.9.1
- Add testing tool for checking the api key.
- Fixes
0.9.0
Initial Release