=== CookieFort Consent Manager ===
Contributors: cookiefort
Tags: cookies, consent, gdpr, cmp, cookiefort
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Install the CookieFort consent widget on your WordPress site using your Property ID.

== Description ==

CookieFort is a consent management platform (CMP). This plugin connects your WordPress site to CookieFort by fetching your property configuration and injecting the appropriate tracking snippets.

**How it works:**

1. Subscribe to a CookieFort plan at [cookiefort.com](https://cookiefort.com)
2. Configure your banner and tracking mode (GTM or GA4) in the CookieFort dashboard
3. Copy your Property ID from the dashboard
4. Paste it in the CookieFort admin menu and save

The plugin automatically injects the CookieFort widget and, when configured for GA4, the Google tag (gtag.js) with a denied Consent Mode default until the visitor chooses.

== Installation ==

1. Upload the `cookiefort-consent-manager` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to CookieFort in the WordPress admin menu
4. Enter your Property ID and click Save Changes

== Languages ==

The plugin is translation-ready (`text domain: cookiefort-consent-manager`). Translations are provided via [translate.wordpress.org](https://translate.wordpress.org/).

== Frequently Asked Questions ==

= Do I need a CookieFort account? =

Yes. This plugin requires an active CookieFort subscription.

= Does the plugin store my banner configuration? =

No. Banner texts, styles, and cookie categories are loaded by the CookieFort widget at runtime. The plugin only stores your Property ID and cached tracking metadata locally.

= Does the plugin support the WP Consent API? =

Yes. When the separate WP Consent API plugin is active and this plugin is injecting the CookieFort widget, CookieFort registers with that API and copies the visitor's choice into its categories. The WP Consent API plugin is not bundled, and no additional remote service is contacted for this.

== External services ==

This plugin connects to the following third-party services when a Property ID is saved and the widget is enabled:

= CookieFort =

* URL: https://cookiefort.com
* Purpose: Fetches property configuration via HTTPS (`/api/v1/config/{id}`) and loads the consent widget script (`/api/v1/widget.js`)
* Account required: Yes — an active CookieFort subscription and Property ID
* Terms of Use: https://cookiefort.com/terms
* Privacy Policy: https://cookiefort.com/privacy

= Google Tag Manager / Google tag =

* URL: https://www.googletagmanager.com
* Purpose: Loads `gtag.js` only when the CookieFort property is configured in GA4 mode with a valid Measurement ID (`G-…`). Before the tag loads, the plugin sets a denied Consent Mode default. Consent updates are handled by the CookieFort widget.
* Account required: Configured via your CookieFort dashboard (Google Analytics measurement ID)
* Terms of Service: https://policies.google.com/terms
* Privacy Policy: https://policies.google.com/privacy

No remote calls are made until an administrator saves a Property ID.

== Privacy ==

This plugin connects to `cookiefort.com` to fetch your property configuration and load the consent widget script. When GA4 mode is active, it may also load scripts from `googletagmanager.com`. Your Property ID is stored in the WordPress database. No data is sent to external services until you save a Property ID.

When the WP Consent API plugin is also active, CookieFort writes that API's first-party consent cookies in the visitor's browser from the choice stored by the CookieFort widget. Those cookies stay on your site.

== Changelog ==

= 1.0.4 =
* Register with the WP Consent API and copy the visitor's CookieFort choice into its categories when that plugin is active

= 1.0.3 =
* Set a denied Google Consent Mode default before gtag.js loads in GA4 mode, so the first page view stays cookieless until the visitor chooses

= 1.0.2 =
* Fix fatal error on activation when CookieFort_Config::ACTIVATION_REDIRECT_KEY is missing

= 1.0.1 =
* Fix admin notices rendering inside the branded header
* Redirect to settings after plugin activation
* Add Settings link on the Plugins screen

= 1.0.0 =
* Initial release
