Download the PHP package shtrihstr/wp-recaptcha without Composer
On this page you can find all versions of the php package shtrihstr/wp-recaptcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package wp-recaptcha
Bot Protection
Description
Helps to protect website with Google reCAPTCHA v3 or Cloudflare Turnstile. This plugin provides Login and Lost Password forms protection by default, but it's possible to add protection to any form by following this documentation.
Requirements
- PHP 7.4+
- WordPress 6.2+ (you can try with older versions, but it's not tested)
Features
- Protects Login and Lost Password forms by default.
- Supports Google reCAPTCHA v3 and Cloudflare Turnstile.
- Allows IP addresses to bypass verification.
- Sends verification email to user.
- Allows to customize verification email subject, message body and link.
- Allows to customize verification code length.
- Allows to add protection to custom form.
Screenshots
Install
-
Preferable way is to use Composer:
`
By default, it will be installed as Must Use Plugin. But it's possible to control with
extra.installer-paths
incomposer.json
. -
Alternate way is to clone this repo to
wp-content/mu-plugins/
orwp-content/plugins/
:`
If plugin was installed as regular plugin then activate Bot Protection from Plugins page
or WP-CLI: wp plugin activate wp-recaptcha
.
Usage
Add required constants (usually to wp-config.php
):
`
or just:
`
Depending on constants, plugin will use Google reCAPTCHA v3 or Cloudflare Turnstile. If both constants are empty then plugin will be disabled.
Cloudflare Turnstile is detecting based on WPD_RECAPTCHA_KEY
or RECAPTCHA_KEY
constant,
by using regex: ^\dx
.
Allow IP addresses to bypass verification
There are two ways to allow IP addresses to bypass verification:
-
Add IP addresses to
WPD_RECAPTCHA_ALLOWED_IPS
constant:`
- Add IP in admin area: Settings -> Bot Protection -> Allowed IPs, one IP per line (see screenshots).
Customization
Verification
Change verification email subject:
`
Change verification email message body:
`
Modify verification link:
`
Change verification code length:
`
Hooks
Actions
wpd_recaptcha_loaded
- Fires when plugin is loaded. Accepts one argument:WPD\Recaptcha\Plugin
instance.wpd_recaptcha_verify
- Fires when verification is required. Accepts one argument:WP_User
instance.wpd_recaptcha_form_success
- Fires when reCAPTCHA or Turnstile validation is successful. Accepts two arguments:WPD\Forms\FormInterface
instance andWPD\Recaptcha\Response
instance.
Documentation
Add protection to custom form:
-
Create class which implements form interface
WPD\Forms\FormInterface
:`
-
Add form to
wpd_recaptcha_forms
filter:`
All versions of wp-recaptcha with dependencies
ext-json Version *
composer/installers Version ~1.0
vectorface/whip Version ^0.4.0
php-di/php-di Version ^7.0