=== AlpineConsent ===
Contributors: alpineconsent
Tags: cookie consent, gdpr, privacy, consent management, cookie banner
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lean, EU-native cookie consent and compliance widget for WordPress.

== Description ==

AlpineConsent is a lightweight cookie consent management platform (CMP), built and hosted in Austria/Germany. It helps WordPress sites comply with the GDPR, the Austrian TKG 2021, and the German TDDDG, without the weight of typical enterprise consent plugins.

The plugin enqueues the real AlpineConsent banner — granular consent categories (necessary/preferences/statistics/marketing), prior-blocking of scripts and iframes, Google Consent Mode v2 — and holds any script you assign a category to under its own AlpineConsent menu until a visitor grants it. A script left unassigned loads normally, so activating the plugin never breaks a site by default.

Scripts are found for you automatically — no need to dig through theme or plugin code for a WordPress "handle." As visitors load your pages (or immediately, via the "Scan site now" button), every tracked script is listed with a suggested category already filled in, matched against a real, curated database of thousands of known cookies and providers. You just confirm or change it. That same scan also reads the cookies your pages actually set, showing each one's real description, retention period, and data controller on a separate Cookies tab.

The banner's layout (bar top/bottom, floating, or modal), title/description text, and button set are all configurable on the Banner tab — buttons can be shown as buttons or plain links, reordered, and you can add your own Privacy Policy/Cookie Policy/Imprint links (with a one-click autofill for WordPress's own Privacy Policy page). A small "Powered by AlpineConsent" credit can optionally be shown in the banner — off by default, enabled from Settings, never required for any feature to work. The banner's colors (background, text, accent, accept button), corner roundness, and font are also configurable on the Banner tab, with a live preview of every change before you save — free on every plan.

The banner's language auto-detects: if you run WPML, Polylang, WP Multilang, TranslatePress, or Weglot, it follows that visitor's own detected language dynamically — whatever languages your site is actually configured for, not a fixed list — otherwise it follows your site's own WordPress language setting. Every button, category label, and badge, in every one of your site's languages, is fully editable on the Banner tab's "Button & banner text" section — pre-filled with a suggested translation for 42 languages (all 24 official EU languages, the rest of the EEA, and major world languages), or plain English as a starting point for anything else. Right-to-left languages (Arabic, Hebrew, Persian, and others) render with a correctly mirrored layout, both in the banner itself and while editing their text.

== External services ==

This plugin connects to the following external services, both operated by AlpineConsent itself. (Plugin updates themselves are delivered through WordPress.org's own update mechanism, not a service of ours.)

1) **Activate license** (only if you click "Activate license" under Settings)
Links this WordPress site to your AlpineConsent account so the plugin knows your real plan — this only ever happens if you start the flow yourself, and it has nothing to do with your company/legal details (see below). Your site's domain and a one-time authorization code are sent to:
`https://api.alpineconsent.com/connect/exchange`
See [AlpineConsent's Privacy Policy](https://alpineconsent.com/privacy) and [Terms of Service](https://alpineconsent.com/terms).

1) **Consent decisions** (only once this site is Connected to an AlpineConsent account)
A visitor's own browser sends which categories they granted or denied to power your dashboard's Consent data chart — no cookies, page content, or anything else about that visitor. A site you never connect sends nothing here at all; the banner and script-blocking still run entirely in the visitor's own browser either way. Sent from the visitor's browser directly to:
`https://api.alpineconsent.com/consent`
See [AlpineConsent's Privacy Policy](https://alpineconsent.com/privacy).

2) **"Suggest translation (AI)" button** (only if you click it — requires a paid plan, the feature enabled, and its notice accepted under Settings)
Your banner's current English title, description, and button/category labels are sent to AlpineConsent's own backend, which asks an AI model to suggest a translation into the language you clicked — nothing about your site's visitors is included. The suggestion fills that language's fields for you to review; it is never saved automatically. Sent to:
`https://api.alpineconsent.com/translate`
See [AlpineConsent's Privacy Policy](https://alpineconsent.com/privacy) and [Terms of Service](https://alpineconsent.com/terms).

3) **"Back up now" under Settings** (only if you click it, after entering a passphrase)
Encrypts your company/legal details, using a passphrase only you know, entirely in your own browser (Web Crypto, never sent anywhere) before anything leaves this site. AlpineConsent only ever receives and stores the resulting encrypted blob — it cannot decrypt it, has no way to recover a lost passphrase, and never sees your company details in plain text. Sent to:
`https://api.alpineconsent.com/sites/{siteKey}/legal-backup`
See [AlpineConsent's Privacy Policy](https://alpineconsent.com/privacy) and [Terms of Service](https://alpineconsent.com/terms).

Provider logo icons on the Scripts & Categories tab (showing a recognized script's own provider, e.g. Google/Meta) and the "View details" popup's banner image (Plugins list) are both bundled with the plugin itself (`assets/img/`) as of 0.6.78 — previously hotlinked live from `https://api.alpineconsent.com/logos/` and `https://docs.alpineconsent.com/docs/assets/wordpress-plugin/` respectively, now local, static image files with no request to AlpineConsent at all (WordPress.org Plugins Team review, 2026-11-24).

Company/legal details you enter under Settings (name, address, VAT ID, and similar) are stored locally on this site only, in your own WordPress database — never sent to AlpineConsent, regardless of whether you've activated a license, except as an encrypted backup if you explicitly click "Back up now" and provide a passphrase (see #4 above), which AlpineConsent can never decrypt. "Scan site now" fetches your own site's own pages locally (via `wp_remote_get()`) — nothing is sent to AlpineConsent for that either.

== Source Code ==

`assets/js/alpineconsent.js` ships minified (see docs/TECHNICAL.md's 5 KB gzipped budget). Its real, human-readable, fully-commented source is included in this same build as `assets/js/alpineconsent.src.js` — built with [Terser](https://terser.org/) via a plain Node build script, the same source that is actually maintained and edited.

== Frequently Asked Questions ==

= Does this plugin send my visitors' data to AlpineConsent? =

Only once this site has an activated license, and only which categories a visitor granted or denied — never a cookie value, page content, or anything else about them. Script-blocking itself always runs entirely in the visitor's own browser regardless. See "External services" above for everything this plugin does talk to AlpineConsent for.

= Will this break my site if I just activate it? =

No — a script only gets held for consent once you explicitly assign it a category under the AlpineConsent menu. An unassigned script keeps loading exactly as it did before you installed the plugin.

= Do I need an AlpineConsent account to use this? =

No. The plugin is fully functional standalone — activating a license (Settings -> License) is optional and only relevant if you're on a paid plan. It has no bearing on your company/legal details, which always stay local to this site.

= Is my company information ever stored on AlpineConsent's servers? =

Not by default. Your company/legal details are stored only in your own WordPress database and used only to generate this site's own Cookie Policy, Legal Notice, and Privacy Policy cookies section. The one exception: if you explicitly click "Back up now" under Settings and provide a passphrase, an encrypted copy is stored on AlpineConsent as a backup — encrypted in your own browser before it's sent, using a passphrase only you know, which AlpineConsent can never decrypt or use to recover it if lost.

= What happens on the free plan? =

The banner, automatic script/cookie discovery, and manual categorization all work fully. A small "Powered by AlpineConsent" credit can optionally be shown in the banner (Settings -> "Powered-by credit") — off by default, and turning it on has no connection to any plan. The static translation dictionary (42 languages) still pre-fills your banner text either way — only the "Suggest translation (AI)" button itself is a paid-plan feature.

= What is the "Consent setup score"? =

A plain completion score (0-100) shown at the top of the AlpineConsent menu, based only on this plugin's own settings: is the banner on, are your detected scripts/cookies categorized, is your company/legal info filled in, and have you published a Cookie Policy and Legal Notice page. **It is not a legal compliance score** — we only see this plugin's own configuration, not your whole site, and a perfect 100 is not a guarantee you meet the GDPR, TKG, or TDDDG. It's a checklist, not a certificate. It never looks at whether your license is activated — a free-plan site can score 100 just as easily as a paid one.

== Installation ==

1. Upload the `wordpress-plugin` directory to `/wp-content/plugins/alpineconsent`, or install via the WordPress plugin screen once packaged.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to the AlpineConsent menu item — assign a category to any discovered script you want held until consent.

== Changelog ==

= 1.0.0 =
* First stable public release on WordPress.org — version bumped to mark this as the plugin's first production-ready release.
* Removed: the self-hosted update checker (AlpineConsent_Updater) and its accompanying readme parser, both now unused. They were built back when this plugin wasn't yet on the WordPress.org Plugin Directory, so WordPress core had nothing to check against on its own. Now that the plugin is listed there with a matching slug, WordPress core already checks wordpress.org directly — a second, self-managed update channel running alongside it is redundant at best and, for a WordPress.org-hosted plugin, a guideline risk at worst.

= 0.6.80 =
* Fixed: the raw-script-blocking output buffer (Settings → "Block raw scripts"), on WordPress 6.0-6.8 sites still using the manual `ob_start()` path, now pairs that `ob_start()` with an explicit, same-function `shutdown` close — instead of relying on PHP's own implicit end-of-request buffer unwind. The close only ever unwinds down to (and including) our own buffer's level, each one via its own registered callback, so it can't accidentally close a different plugin's buffer the way a bare `ob_end_flush()` could.
* WordPress.org Plugins Team review, 2026-11-30.

= 0.6.79 =
* Fixed: a direct-install site's "Powered-by credit" checkbox (Settings -> "Powered-by credit") did nothing at all for an admin on a paid plan — it only ever affected the WordPress.org build, which this build isn't. A paid admin can now actually check it to keep showing the badge anyway; a free admin still can't remove it this way (that stays a paid-plan perk, unchanged).
* Internal: a follow-up pass against the full WordPress.org Plugins Team guideline (not just the 3 findings from the 2026-11-24 review email) found and fixed 2 more issues before they could become a second review round: the WordPress.org build's own "Powered by AlpineConsent" copy still described paid-plan gating that build no longer actually has (contradicted the already-compliant code), and the bundled Open Cookie Database dataset (`data/open-cookie-database.json`, Apache-2.0) shipped with no license/attribution file.

= 0.6.78 =
* Fixed: provider logo icons on the Scripts & Categories tab, and the "View details" popup's banner image in the Plugins list, are now bundled with the plugin (`assets/img/`) instead of being loaded live from `api.alpineconsent.com`/`docs.alpineconsent.com` — closes a phoning-home finding (no opt-in for a third-party image request). See "External services" above.
* Fixed: the Cookie Policy, Legal Notice, and Privacy Policy cookies-section shortcodes now sanitize a saved per-language translation with `wp_kses_post()` at render time too, not only when it was first saved — defense in depth, not a change in what's actually allowed.
* Fixed: the raw-script-blocking output buffer (Settings → "Block raw scripts") now uses WordPress 6.9's template-enhancement output buffer API on sites running it, which core opens and closes itself — no manual `ob_start()` to pair with a close at all. Sites on WordPress 6.0–6.8 keep the previous `ob_start()` callback, unchanged.
* WordPress.org Plugins Team review, 2026-11-24.

= 0.6.77 =
* Fix: banner button and category labels (Accept all, Reject all, Manage preferences, etc.) now use the curated translation for the visitor's detected language, for every language AlpineConsent already ships a translation for — not just English unless you'd manually re-typed a translation under Banner Settings → "Button & banner text". The title and description text were already doing this correctly; button labels were not.

(Older entries omitted here — WordPress.org truncates this section at 5000 characters. Full history: https://docs.alpineconsent.com/#/CHANGELOG)
