Turnstile Validation
by meonvalleyweb · github.com/meonvalleyweb/cloudflare-turnstile-wordpress
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/meonvalleyweb/cloudflare-turnstile-wordpress/archive/refs/heads/main.zipCloudflare Turnstile Validation for WordPress (Breakdance Compatible)
A lightweight WordPress plugin to validate Cloudflare Turnstile CAPTCHA responses. Ideal for Breakdance forms or any custom HTML form.
📌 Features
- ✅ Validates
cf-turnstile-responseon form submission - ✅ Blocks form processing if Turnstile fails
- ✅ Reads Turnstile secret key from
.env(Bedrock-compatible) - ✅ Plugin-based (no theme edits needed)
- ✅ Works with any form builder (Breakdance, custom, etc.)
⚙️ Requirements
- WordPress (Bedrock or standard)
- PHP 7.4+
- Cloudflare Turnstile Site & Secret Keys
- Optional: Breakdance Builder
🚀 Installation
-
Clone or download into
wp-content/plugins/turnstile-validation -
Add the secret key to your
.envfile:CLOUDFLARE_TURNSTILE_SECRET=your_secret_key_here -
Expose it in
config/application.php:Config::define('CLOUDFLARE_TURNSTILE_SECRET', env('CLOUDFLARE_TURNSTILE_SECRET')); -
Activate the plugin in your WordPress admin.
🧪 Usage
In your form (e.g., Breakdance HTML block), add:
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
<div class="cf-turnstile" data-sitekey="your_site_key_here"></div>
Make sure your form:
- Uses the
POSTmethod - Includes the hidden field
cf-turnstile-response - Submits to a page that runs before
wp_loaded(usually handled by this plugin)
📸 Screenshot
Example Turnstile widget in a Breakdance form:

📝 License
This plugin is open-sourced under the MIT License.