=== WPGo Consent ===
Contributors: wpgo
Tags: cookie consent, gdpr, consent management, cmp, eprivacy, cookie banner, privacy, google consent mode
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Fully free, EU-first cookie consent & Consent Management Platform. Prior consent, script blocking, Consent Mode v2, 6 designs, scanner, logs. No paywalls.

== Description ==

WPGo Consent is a complete, 100% free cookie consent and Consent Management Platform (CMP) for WordPress. It is built for the EU rules of today and tomorrow: ePrivacy Directive, GDPR (articles 6, 7, 12, 13, 25, 30), the EDPB Guidelines 05/2020 and the current enforcement priorities of DPAs such as CNIL, AP and BfDI.

The philosophy is simple: compliance over conversion rate, transparency over dark patterns, and user control first. No premium tier, no locked features, no upsells - ever.

= Key features =

* Prior consent + robust script blocking (type="text/plain", data-attributes, MutationObserver for dynamically added scripts).
* Granular consent by category: Necessary, Preferences, Statistics, Marketing.
* Accept All and Reject All with equal visual prominence - no dark patterns.
* Google Consent Mode v2 (default denied + update on consent) and Microsoft UET friendly.
* 6 fully customizable banner designs: bottom bar, centered modal, floating card, top bar, side drawer, minimal floating button.
* Live banner preview in the admin, full color and button-style customization, animations, dark mode.
* Consent logs stored in your own database (hashed identifiers), exportable to CSV.
* Built-in cookie & script scanner (on-demand + scheduled) with a list of known services (GA4, GTM, Meta Pixel, Hotjar, YouTube, Matomo and more).
* Preferences center shortcodes and a persistent withdraw button.
* WordPress Consent API support so other plugins respect the same state.
* Geo-aware: strict opt-in for EU/EEA/UK, simple notice mode elsewhere.
* No external SaaS, no phone-home, no telemetry. Self-hosted and privacy-friendly.
* WCAG 2.2 AA oriented: keyboard navigation, ARIA, sufficient contrast.
* No jQuery on the frontend, minimal assets, PHP 8.0+, WP 6.4+.

= Developer friendly =

* Vanilla JS engine with a public API (`window.wpgoConsent.api`).
* JS events: `wpgo_consent_updated`.
* PHP actions: `wpgo_consent_recorded`, `wpgo_consent_scanned`, `wpgo_consent_api_synced`.
* PHP filters: `wpgo_consent_known_services`, `wpgo_consent_region`, `wpgo_consent_frontend_config`.
* Block scripts/iframes by adding `data-consent-category="statistics"` (or `data-cookieconsent` / `data-euconsent-category`).

== Installation ==

1. Upload the `wpgo-consent` folder to `/wp-content/plugins/`, or install the zip via Plugins > Add New.
2. Activate the plugin.
3. Go to "Consent" in the admin, pick a region, design and colors.
4. Add `data-consent-category` attributes to your non-essential scripts/iframes (or use a tag manager with Consent Mode).
5. (Optional) Run the Scanner, then paste `[wpgo_consent_policy]` and `[wpgo_consent_preferences]` on the relevant pages.

== Frequently Asked Questions ==

= How do I block a script until consent? =

Add `type="text/plain"` and `data-consent-category="statistics"` (or your category) to the script tag. The consent engine restores and runs it once the visitor grants that category. Same works for iframes: they are unloaded until consent.

= Does it support Google Consent Mode? =

Yes. Enable "Consent Mode v2" in Settings > General. Defaults are emitted as denied; the state updates when the visitor chooses.

= Is there a paid version? =

No. This plugin is and will always be free and open (GPL). No features are locked.

== Changelog ==

= 1.0.0 =
* Initial release.
