| 开发者 | rajanit2000 |
|---|---|
| 更新时间 | 2026年10月24日 19:41 |
wp-spam-protecter. Everything is free, and nothing is ever sent to another service.
Invisible checks
Version 1.0 marked every comment by a logged-in user as spam, and its hidden field rarely caught bots. ShieldCraft replaces it completely. 1.0 stored no data, so there is nothing to move. Comments sent from old cached pages are held for moderation, not lost.
No. The checks are invisible. People who browse without JavaScript can still comment (their comments are held for you to approve) and still log in.
Open Settings → ShieldCraft → Log and choose Not spam. A held or spam comment is approved, and that sender's email address passes from now on (IP addresses are often shared, so they are not trusted). The log shows why each message was stopped, so you can adjust the rule.
Login protection is off by default. When it is on, administrators and editors are always let in, a login is never refused just for missing JavaScript, and XML-RPC, the REST API and application passwords are not affected. A custom login form must print the login_form action or use wp_login_form(). In an emergency, add define( 'SHIELDCRAFT_DISABLE', true ); to wp-config.php to switch every check off.
Yes. The script fetches a fresh token from the REST API (never cached) when the page opens.
Choose the header that holds the visitor's address under Settings → ShieldCraft → Allowlist and privacy. The page shows what each header holds for your own visit. Only change it if your proxy really sends that header; otherwise visitors could fake their address.
Print the fields inside the form and check the submission where you handle it:
<?php shieldcraft_fields( 'api' ); ?>
if ( shieldcraft_is_spam( 'api', array( 'email' => $email, 'message' => $message ) ) ) { /* refuse it */ }
shieldcraft_check() returns the verdict and the reasons. Add your own context with the shieldcraft_contexts filter. Headless front ends can get a token from GET /wp-json/shieldcraft/v1/token?context=api and ask POST /wp-json/shieldcraft/v1/check from the server that accepts the form.
Yes: shieldcraft_checks adds checks, shieldcraft_verdict changes a verdict, shieldcraft_blocked fires for every stopped submission, shieldcraft_min_seconds changes the time trap per form, shieldcraft_client_ip changes the visitor's address and shieldcraft_blocked_message changes the error message.