=== Cybexo CMP ===
Contributors: nexaguard
Donate link: https://cybexo.com
Tags: consent, privacy, gdpr, compliance, cookies
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 0.2.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Consent Management Platform for WordPress. Inject Cybexo loader, enable Google Consent Mode v2, and manage/reset consent via a simple admin UI.

== Description ==
Cybexo CMP makes it easy to integrate the Cybexo Consent Management Platform into WordPress.

**Highlights**
- Auto-injects the official Cybexo loader via the WordPress script pipeline.
- One-click **Reset Consent** (clears cookies/storage and hard-reloads).
- **Debug view** to force banner display and verify event flow.
- Google **Consent Mode v2** stub included (optional).
- Shortcodes `[cybexo_preferences]` and `[nexaguard_preferences]` open the preferences modal.
- Admin dashboard status panel and debug shortcuts.
- Clean uninstall — removes plugin settings.

**External Services**
This plugin loads assets from:
- `https://cmp.cybexo.com` (loader/assets)
- `https://api.cybexo.io` (configuration/API)

Cybexo may set cookies such as `cybexo_cmp_consent` (and legacy `nexaguard_cmp_consent` during migration) to store user choices.

== Installation ==
1. Install the plugin and activate it.
2. Go to **Cybexo CMP** (left menu).
3. Enter your **App ID (settings-id)** from your Cybexo dashboard.
4. (Optional) Toggle **Google Consent Mode v2**.
5. Open your site — the consent banner should appear for new visitors.

Use `[cybexo_preferences]` (or legacy `[nexaguard_preferences]`) to place a “Privacy settings” link anywhere.

== Frequently Asked Questions ==
= I don’t see the banner =
Check page/caching and CDN. Use **Reset consent** and the **Debug** link. Ensure no other CMP is injecting.

= Does this store personal data in WordPress? =
No. The plugin stores only configuration options (App ID, toggles). User choices are stored client-side (cookies/storage) by the CMP.

= Multisite? =
Yes, activate per-site and set each site’s App ID.

== Screenshots ==
1. Cybexo CMP admin screen.
2. Example banner/preferences on the front-end.

== Changelog ==
= 0.2.5 =
* Fix - Removed WordPress-side hard Consent Mode denied default enforcement.
* Improvement - CMP Engine is now the single source of truth for regional Consent Mode defaults.
* Improvement - Preserved early `dataLayer`/`gtag` bootstrap and `developer_id` signaling for compatibility.

= 0.2.4 =
* Maintenance - release and audit hardening updates with no functional behavior change to CMP runtime injection.

= 0.2.3 =
* Fix - WP Consent bridge debug logs now enable when either plugin Debug Mode is ON or `?nxg_debug=1` is present.

= 0.2.2 =
* Fix - WP Consent bridge logs now print only when both plugin debug is enabled and `?nxg_debug=1` is present.

= 0.2.1 =
* Fix — Always-on WP Consent API bridge listener with safe defaults.
* Fix — Ensures bridge enqueues after official WP Consent API script.
* New — Registers “marketing”, “statistics”, “statistics-anonymous” categories via `wp_register_consent_category`.
* Fix — Aligns WP Consent bridge categories and mapping with Core CMP Engine contract.
* Fix — Uses `developer_id.<id>` format and guards duplicate Consent Mode default pushes via `__nxgCMDefaultSet`.
* Fix — Corrects loader dependency handle for deterministic script ordering.
* UX — Removes WP admin certification warning notice for cleaner plugin experience.
* Improvement — Verified x.3.b compliance for Google CMP Gold Tier.

= 0.2.0 =
* New: WordPress Consent API integration (required for Google CMP Gold x.3.b). Cybexo consent states now sync to WP plugins via `wp_set_consent()/wp_has_consent()`.
* Improvement: Bridge script auto-detects API presence and maps GCM v2 keys: analytics_storage → statistics, ad_storage/ad_user_data/ad_personalization → marketing.
* Dev: Filter `nxg_wp_consent_mapping` allows site-specific category remaps.

= 0.1.1 =
* Nonce alignment, enqueue/escaping polish.

= 0.1.0 =
* First public release.
