Add Shield silentCAPTCHA integration#1517
Open
paulgoodchild wants to merge 9 commits into
Open
Conversation
… evf_data localization fix
This commit introduces Shield silentCAPTCHA integration for Everest Forms, adds global diagnostics for Shield threshold=0 configuration, and includes a minimal core admin-assets fix for the evf-upgrade JS data contract.
Implementation
- Register ShieldSilentCaptcha addon in addons/Addons.php.
- Add addon implementation in addons/ShieldSilentCaptcha/ShieldSilentCaptcha.php:
- Adds Shield provider row to CAPTCHA Integration settings.
- Adds per-form Shield toggle in builder security settings.
- Adds form processing gate via everest_forms_process_initial_errors.
- Uses Shield bot verdict callable priority:
- \FernleafSystems\Wordpress\Plugin\Shield\Functions\test_ip_is_bot
- shield_test_ip_is_bot
- Uses Shield threshold callable priority:
- \FernleafSystems\Wordpress\Plugin\Shield\Functions\get_silentcaptcha_bot_threshold
- shield_get_silentcaptcha_bot_threshold
- Preserves fail-open behavior for callable absence/throwable/non-strict verdicts.
- Adds threshold-zero global settings notice:
- "Shield is active and running, but your Shield silentcaptcha bot threshold is set to zero."
- Evaluates threshold only after Shield availability is confirmed.
- Evaluates threshold only when callable exists; throwable/non-numeric results fail open.
- Caches threshold-zero evaluation result per request lifecycle.
- Reuses a shared helper for notice + Learn More link markup.
- Add Shield icon asset at assets/images/captcha/shield-security-logo.png.
Core bug fix
- Update includes/admin/class-evf-admin-assets.php to localize evf_data directly to the evf-upgrade handle.
- Add inline code comments documenting the bug and rationale.
- Fixes the evf_data-is-undefined path for evf-upgrade in affected admin contexts.
Tests
- Add tests/phpunit/includes/class-shield-silent-captcha-test.php with coverage for:
- verdict normalization and callable ordering.
- fail-open behavior for missing/throwing callables.
- closed-gate and existing-error short-circuit behavior.
- strict-true block header behavior and AMP bypass.
- global toggle and builder selector contracts.
- threshold path behavior:
- threshold callable missing => standard available branch.
- threshold callable throws => standard available branch.
- threshold 0 => threshold-warning branch.
- threshold non-zero => standard available branch.
- Shield unavailable => threshold check short-circuited.
- threshold lookup cache => single threshold callable invocation across repeated calls.
- behavior-focused assertions using branch instrumentation/call counts (no fragile string-content assertions for threshold message copy).
- Add tests/phpunit/includes/class-shield-silent-captcha-flow-test.php with flow coverage for:
- reCAPTCHA failure short-circuit before Shield initial-errors stage.
- reCAPTCHA success path reaching initial-errors stage where Shield can apply.
* add option to download and copy the logs * fix: log button responsive with issue * update:review comment
* add: integrations and payments tab * sidebar design update * update: integration design * update: opacity and icon * remove unwanted class * remove unwanted class * fix text domain * fix class issue * fix class exist * fix duplicate class issue
…lexibility. (wpeverest#1542) * option to send form static reporting at a time * fix send test report email address update issue * remove: nps * fix two time mail send while sending report mail * update: review report * update: review report
* Fix - Coupon limit validation * fix: coupons not applied issue * pass: coupon data for coupon calculation on backend * pass: all coupon data for the coupon validation * merge pre-develop into EVF-2293-enhance/coupons * Dev - Payment Summary Field. (wpeverest#1545) * added: payment sumary description * fix: show payment history field on pro version * fix: saving the form due to the payment summary * added: show hide button for the payment history * fix: class not found issue * changelog updated * changelog updated
* Initial Commit * UI updates for field adding popover * Placement updates for fields popover * Popover added for row add button too * Ui updates for popover trigger button * Popover arrow UI added * Removed non-important comments * Layout options such as one-column container, two-column container, etc. * Enable grouping feature for fields. * fix : Field still hoverable after Selected * fix : Field popover placement issue fixed * fix: popup clipping issue * update: update selected count while duplicate * update:on group delete redirect to add field --------- Co-authored-by: som3669 <somshrestha3669@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request:
This commit introduces Shield silentCAPTCHA integration for Everest Forms, adds global diagnostics for Shield threshold=0 configuration, and includes a minimal core admin-assets fix for the evf-upgrade JS data contract.
Implementation
Core bug fix
How to test the changes in this Pull Request:
Tests
Types of changes:
Other information:
Changelog entry
Added support for Shield Security's silentCAPTCHA Bot SPAM protection features alongside Google reCAPTCHA & CloudFlare Turnstile.