=== Consent Manager - GDPR & CCPA ===
Contributors: pitterlopes
Tags: cookie, consent, gdpr, lgpd, google consent mode
Requires at least: 5.6
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.1.9
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The high-performance, self-hosted CMP. Supports Google Consent Mode v2 (Basic & Advanced), zero asset load technology, and is Agency-ready.

== Description ==

**STOP PAYING MONTHLY FEES FOR COOKIE CONSENT.**

WP Consent Manager is the professional choice for agencies and businesses who prioritize **Site Performance**, **Strict Compliance**, and **Flexibility**. Unlike cloud-based solutions (SaaS) that slow down your site with heavy external scripts, WP Consent Manager runs natively on your server.

It implements **"Zero Asset Load"** technology: once a visitor consents, the plugin unloads its own assets (CSS/JS), leaving your site with 0% performance impact.

### 🚀 2025 Performance & Compliance Features

* **GOOGLE CONSENT MODE V2 (FLEXIBLE):** Choose your compliance level.
    * **Basic Mode (Default):** Blocks Google tags completely until consent is granted. Preferred for strict GDPR/LGPD privacy.
    * **Advanced Mode (New):** Allows Google tags to load anonymously (cookieless pings) before consent, improving conversion modeling for Google Ads while respecting user choices.
* **ZERO ASSET LOAD:** Unique to this plugin. If a user has already consented, we stop loading our CSS and JS files entirely. Your site remains lightning fast for returning visitors.
* **TRUE SCRIPT BLOCKING:** Our shim-blocker technology intercepts scripts (Analytics, Meta Pixel, TikTok, Hotjar) and iFrames (YouTube, Vimeo) *before* they execute.
    * **UNBREAKABLE UX:** "Shielded" logic ensures the consent banner always closes and saves preferences, even if third-party scripts (like a broken Meta Pixel) cause JavaScript errors on your page.
* **AUDIT TRAIL & IP LOGGING:** Generates a hashed, immutable proof of consent stored locally in your database. Now includes optional **IP Address Logging** for stronger legal protection.

### 🏢 Built for Agencies (The Eco-system)

This plugin is free and fully functional. However, it is architected to connect with our premium **Agency Hub**.

* **Centralized Management:** Control 100+ client sites from one dashboard.
* **White-Label:** Rename the plugin, change the developer name, and hide the menu from your clients.
* **Sync Settings:** Push legal changes to all clients instantly.

**Why choose Self-Hosted?**
1.  **Better Performance:** No external DNS lookups or slow script fetches.
2.  **Data Sovereignty:** User consent data stays on your server, not on a third-party cloud.
3.  **No Recurring Costs:** Stop renting your compliance.

== Installation ==

1.  Upload `consent-manager-gdpr-ccpa.zip` to the `/wp-content/plugins/` directory.
2.  Activate the plugin through the 'Plugins' menu in WordPress.
3.  Run the **60-Second Setup Wizard** to auto-configure blocking for Google, Meta, TikTok, and more.
4.  (Optional) Go to **Settings > General** to enable "Google Consent Mode v2 (Advanced)" if you need conversion modeling data.

== Frequently Asked Questions ==

= Is this compatible with Google Consent Mode v2? =
Yes. It supports both implementation methods:
1. **Basic Implementation (Default):** Blocks tags until consent. Safe and strict.
2. **Advanced Implementation:** Sends anonymous signals ("denied") to Google before consent, and updates to "granted" upon acceptance.

= Will this slow down my site? =
For new visitors, it loads a tiny (<5kb) script. For visitors who have already accepted cookies, it loads **nothing** (Zero Asset Load technology). It is significantly faster than Cookiebot, OneTrust, or Iubenda.

= Does it block TikTok and Facebook Pixels? =
Yes. We include pre-configured blocking rules for TikTok (`ttq`), Meta Pixel (`fbevents.js`), and many others. It also handles script dependencies to prevent console errors.

= Where is the consent log stored? =
In your WordPress database (`wp_consent_log` table). You can export this log to CSV at any time for legal audits.

== Screenshots ==

1.  **Modern Banner:** Minimalist, high-conversion design (Bottom-Left).
2.  **Granular Control:** Users can toggle Marketing/Analytics categories individually.
3.  **Compliance Dashboard:** Visualize consent rates and export logs.
4.  **Setup Wizard:** Auto-detect and configure services in seconds.

== Changelog ==

= 1.1.8 =
* **NEW:** Google Consent Mode v2 "Advanced Mode" option. Now supports cookieless pings for better ad tracking.
* **NEW:** "Zero Asset Load" architecture. Plugin assets are stripped for consented users to boost Core Web Vitals.
* **NEW:** High-Performance CSV Export. Refactored to use batch processing.
* **NEW:** Optional IP Address Logging added to the Consent Log.
* **UPDATE:** Enhanced "Unbreakable" Javascript logic.
* **FIX:** Updated blocker presets for TikTok and Trustindex.
* **SECURITY:** Improved input sanitization across all admin settings.

= 1.1.9 =
= 1.1.9 =
* **FIX:** Resolved layout overflow issues where long texts pushed buttons off-screen.
* **UI:** Improved CSS isolation ("Shielding") to prevent third-party themes from breaking the banner buttons' design.
* **UI:** Updated the action bar to allow button wrapping (`flex-wrap`) for better responsiveness on all screen sizes.
* **UX:** Improved alignment of the "Customize" link, keeping it separated from the main action buttons.

