=== PrivacyScrubber ZTDS Guard ===
Contributors: brandmeweb
Donate link: https://privacyscrubber.com/integrations/wordpress/
Tags: privacy, gdpr, hipaa, security, contact-form-7
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 2.4.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Client-side PII sanitizer for WordPress forms (CF7, WPForms, Gravity Forms, Elementor, Fluent Forms). Tokenizes data in browser RAM (<0.4ms).

== Description ==

**PrivacyScrubber ZTDS Guard** (Plane 6 of the PrivacyScrubber ecosystem) enforces the **Zero-Trust Data Sanitization (ZTDS™ RFC v1.0)** protocol on WordPress contact, patient intake, legal consultation, and financial onboarding forms.

When a visitor submits a form on your WordPress site, sensitive data frequently flows into third-party webhooks (Zapier, Make), CRM systems (HubSpot, Salesforce), Slack notifications, and AI triage bots (OpenAI, Anthropic Claude). PrivacyScrubber ZTDS Guard intercepts the form submission **inside the visitor's browser RAM (<0.4ms)** during the DOM capture phase—before `fetch()` or `XMLHttpRequest` sends data over the network.

= Dual-Envelope Architecture =

1. **Public Envelope (Sanitized Form Fields):** Sensitive identifiers (Names, Phone Numbers, Emails, Payment Cards, SSN/National IDs, IBANs, Medical Record Numbers, Tax IDs) are replaced in-memory with deterministic tokens such as `[NAME_1]`, `[PHONE_1]`, `[EMAIL_1]`, and `[SSN_1]`. Downstream CRMs, email notifications, and AI triage agents process the inquiry with zero exposure to raw PII/PHI.
2. **Private Vault Envelope (`_ztds_vault_payload`):** The original cleartext mapping is encrypted inside the visitor's browser using native WebCrypto (`AES-256-GCM` + `PBKDF2-SHA256`) and attached as a sealed hidden payload. Authorized administrators can decrypt and reveal original entries in 1 click inside the WordPress Admin dashboard using their local browser key.

= Supported Form Builders =

* **Contact Form 7** (`form.wpcf7-form`)
* **WPForms** (`form.wpforms-form`)
* **Elementor Forms** (`form.elementor-form`)
* **Gravity Forms** (`.gform_wrapper form`, `form[id^="gform_"]`)
* **Fluent Forms** (`form.fluentform`)
* **Custom HTML / AJAX Forms** (via `data-ztds="true"` or custom CSS selectors in Settings)

= Key Architectural Guarantees =

* **Zero External Network Egress:** 100% of detection, tokenization, and encryption executes locally in the visitor's browser (`window.crypto.subtle`). Zero bytes of form content are ever transmitted to PrivacyScrubber or third-party servers.
* **Fail-Open Business Continuity:** If a legacy browser lacks WebCrypto support or encounters a custom DOM exception, the interceptor gracefully bypasses tokenization so your business never loses an inbound lead.
* **Statutory Risk Minimization:** Technical & Organizational Measure (TOM) supporting GDPR Article 32 pseudonymization, HIPAA Safe Harbor (45 CFR § 164.514(b)), and PCI-DSS v4.0 intake hygiene.

= External Services & Privacy Disclosure =

This plugin executes 100% locally in the visitor's browser and does **not** transmit any form data, visitor PII, or telemetry to any external server. Optional verification badge links to `https://privacyscrubber.com/integrations/wordpress/` and `https://ztds.ai/` are strictly controlled by the site administrator under **Settings -> PrivacyScrubber ZTDS**.

== Installation ==

1. Upload the `privacyscrubber-wp-guard` folder to the `/wp-content/plugins/` directory, or install the plugin ZIP through the WordPress **Plugins -> Add New -> Upload Plugin** screen.
2. Activate **PrivacyScrubber ZTDS Guard** through the **Plugins** menu in WordPress.
3. Navigate to **Settings -> PrivacyScrubber ZTDS** to select your compliance profile (`General`, `Medical`, `Legal`, `Finance`, `Accounting`, `Insurance`, `RealEstate`, `HR`, `DevOps`), configure custom form selectors, or toggle the verification badge.

== Frequently Asked Questions ==

= Does this plugin send form submissions to an external API or cloud server? =

No. All PII detection, token replacement (`[NAME_1]`, `[EMAIL_1]`), and `AES-256-GCM` vault encryption run locally inside the visitor's web browser (`assets/ztds-form-guard.js`). No external API requests are made during form submission.

= How do administrators read the original unmasked values? =

When viewing entries in your WordPress Admin panel, `assets/ztds-admin.js` detects the `_ztds_vault_payload` field and renders a **1-Click Local Reveal** control. Decryption occurs locally in the administrator's browser memory.

= What is the difference between the Free Tier and TEAMS / Developer SDK licenses? =

The Free Tier includes universal consumer PII sanitization (`General` profile up to 15,000 characters per submission, and 5,000-character evaluation quota for specialized industry profiles). Entering a **TEAMS ($99/mo)** or **Developer SDK ($299/mo)** license key unlocks unlimited character throughput across all specialized compliance profiles.

== Changelog ==

= 2.4.3 =
* Synchronized PII detection engine with PrivacyScrubber v2.4.3 (Waves 1-30 cross-plane parity).
* Added dual-authority ZTDS verification seal with independent administrator toggles for badge visibility and verification links.
* Added native Gravity Forms (`form[id^="gform_"]`) and CPA/Tax (`Accounting`), `Insurance`, `RealEstate`, and `HR` profile selectors.
*Aligned Free Tier character quotas (15,000 chars for General profile; 5,000 chars for specialized profiles).

= 2.4.2 =
* Initial public release of Plane 6 WordPress ZTDS Form Guard with Dual-Envelope WebCrypto (`AES-256-GCM`) vaulting.
