=== Legibright – AI Act Compliance ===
Contributors: aiactready
Tags: eu ai act, compliance, ai transparency, chatbot disclosure, gdpr
Requires at least: 6.0
Tested up to: 7.0.2
Stable tag: 1.4.2
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

EU AI Act compliance for WordPress — AI chatbot disclosure, AI content & image labelling, an AI transparency page, and a risk assessment wizard.

== Description ==

**Legibright – AI Act Compliance** helps WordPress site owners meet their obligations under the **EU AI Act** — the Artificial Intelligence Act (Regulation 2024/1689) — automatically and without legal expertise.

Developed by **[Legibright](https://legibright.eu)** — EU AI Act compliance tools for businesses.

The EU AI Act applies to **any organisation in the EU** (or targeting EU users) that uses AI systems on their website. Transparency obligations begin **2 August 2026**.

Legibright is a free **AI Act compliance plugin** that adds the AI transparency measures the law expects — an AI chatbot disclosure ("you are talking to an AI" notice), AI-generated content and image (deepfake) labelling, and an AI transparency statement page — backed by an honest compliance dashboard that flags only what genuinely applies to your site. No fear-selling, no vanity scores.

= What the plugin does =

**Chatbot Disclosure (Art. 50)**
Detects chatbots on your site (Intercom, Tidio, Crisp, Drift, Zendesk, LiveChat, Tawk.to, Voiceflow, and 30+ more) via homepage scan and plugin detection. Displays a clear, multilingual "You are talking to an AI" notice to visitors.

**AI Content Labelling (Art. 50)**
Adds an "AI-generated" checkbox to the post and page editor. Automatically detects AI content plugins (AI Engine, Bertha AI, ContentBot, ClassifAI, and more). Displays a visible label on published content.

**AI Image & Synthetic Media Disclosure (Art. 50)**
Adds an "AI-generated / deepfake" flag to each image in the Media Library. Auto-detects AI-generated images from C2PA metadata, EXIF Software field (DALL·E, Adobe Firefly, Midjourney, Stable Diffusion), and XMP signals. Labeled images display a discreet front-end badge.

**Transparency Statement Page**
One-click generator for an AI transparency page (EN / NL / DE). Publishes directly to WordPress and is detected by the compliance scanner.

**Compliance Dashboard**
An honest, real-time status card scanned from your live site. Each check — chatbot disclosure, AI content labelling, transparency page, AI image disclosure — clearly shows whether it applies to your site (Compliant, Partial, or N/A), with quick-fix buttons only where action is genuinely needed. No fear-selling, no vanity scores.

**Risk Assessment Wizard (Arts. 5 & 6)**
Guided questionnaire maps your AI use cases to EU AI Act risk levels: Prohibited (Art. 5), High-Risk (Annex III), Limited Risk (Art. 50), and Minimal Risk. Your result is saved so you can revisit it any time.

= Supported languages =

All front-end notices and admin interfaces support: **English (EN), Dutch (NL), German (DE), French (FR), Spanish (ES)**.

= WooCommerce support =

Full support for WooCommerce product listings: AI-generated products are labelled alongside posts and pages.

= Privacy =

All data is stored in your own WordPress database (wp_options and wp_postmeta). The plugin does not collect, transmit, or store any personal data on external servers.

The compliance scan works by fetching your own site's public pages — an ordinary HTTP request to your own URL, the same way any visitor loads them — to look for chatbot and AI signals. Nothing is sent to Legibright or any third-party service; the scan runs entirely between your server and your own site.

= Disclaimer =

This plugin provides indicative compliance guidance only — it is **not legal advice**. Consult a qualified lawyer for compliance decisions specific to your organisation.

== External services ==

This plugin does not connect to, send data to, or receive data from any third-party external service. It has no external dependencies and makes no outbound calls to Legibright or any other party.

The Compliance Dashboard includes a site scanner that performs a self-scan of your own public pages (via `wp_remote_get`) to check whether a chatbot or AI widget is present. Every request is made from your own server to your own site's public URLs (starting from `home_url('/')`), exactly the way any visitor loads your pages. Chatbot detection works purely by pattern-matching known script signatures in your own homepage's HTML — the plugin never contacts those chat vendors, and no data leaves your site.

No visitor data from your site is transmitted anywhere by this plugin.

== Installation ==

1. Upload the `legibright-ai-act-compliance` folder to `/wp-content/plugins/`, or install via the WordPress Plugin Directory.
2. Activate the plugin through **Plugins > Installed Plugins**.
3. Go to **Legibright > Compliance** to see your live compliance score.
4. Visit **Legibright > Settings** to configure chatbot notice, content labelling, and transparency page.
5. Run the **Risk Wizard** to map your AI uses to EU AI Act categories.

== Frequently Asked Questions ==

= Is this an EU AI Act / AI transparency compliance plugin? =

Yes. Legibright is a free EU AI Act (Artificial Intelligence Act) compliance plugin focused on Article 50 transparency: AI chatbot disclosure, AI-generated content and image (deepfake) labelling, and an AI transparency statement page — plus a risk assessment wizard and an honest compliance dashboard.

= Does this plugin make my site fully EU AI Act compliant? =

No. It automates the most common disclosure and documentation requirements, but full compliance depends on how your organisation uses AI, your sector, and your specific risk profile. Consult a qualified lawyer.

= Which chatbot platforms are detected? =

Intercom, Tidio, Crisp, Drift, HubSpot, Zendesk Chat, Tawk.to, LiveChat, Freshchat, Olark, Smartsupp, Chaport, Chatra, Kommunicate, JivoChat, Botpress, Landbot, Voiceflow, ManyChat, Help Scout, HelpCrunch, and more — via both CDN URL matching and inline JavaScript pattern detection.

= Does it work with WooCommerce? =

Yes. AI-generated products are detected, labelled, and included in the AI Usage Register alongside posts and pages.

= What is the EU AI Act and when does it apply? =

Regulation (EU) 2024/1689 creates a risk-based framework for AI systems used in the EU. Transparency obligations for chatbots and AI-generated content (Art. 50) apply from **2 August 2026**.

= What is C2PA and how is image auto-detection used? =

C2PA (Coalition for Content Provenance and Authenticity) is a standard for embedding provenance data into images. DALL·E and Adobe Firefly embed C2PA signals. The plugin also reads EXIF Software fields and XMP metadata to auto-detect AI-generated images on upload.

= Is this plugin free? =

Yes, completely free and open-source (GPL v2 or later).

= Will the plugin slow down my site? =

No. The compliance scan runs once every 6 hours via a transient (cached). Front-end notices are lightweight CSS/HTML — no heavy scripts or external resources.

== Screenshots ==

1. **Compliance Dashboard** — an honest, real-time scan of your live site. It flags a genuine gap (an undisclosed chatbot) as High priority, while marking obligations that do not apply to your site as N/A — no fear-selling.
2. **Visitor-facing disclosures** — the AI-content label, AI-image badge, and "you are talking to an AI" chatbot notice exactly as your visitors see them (five languages).
3. **Honest compliance** — when your site genuinely meets its Art. 50 duties you are told so clearly (100/100, "All transparency checks passed") instead of being pushed to fix things you do not need.

== Changelog ==

= 1.4.2 =
* Improved: The compliance scan now reflects exactly what EU AI Act Article 50 requires of a typical website. Obligations that do not apply to your site — labelling commercial or human-reviewed AI content, or a standalone transparency page (neither is mandatory under Art. 50) — are shown as N/A / optional instead of failures. No fear-selling.
* Improved: The compliance score only drops for a genuine unmet obligation (such as an undisclosed chatbot), never for things that do not apply — so a typical commercial site is correctly shown as compliant.
* Improved: Plain-language, honest copy throughout — the post-editor "AI-generated" help text and the dashboard checks now explain when labelling is (and is not) legally required.
* Changed: AI image disclosure clarified — only deepfakes (realistic AI depictions of real people or events) must be disclosed, not decorative or clearly artistic AI images.
* Changed: Refreshed WordPress.org screenshots, plugin icon, and banner to match the current design.
* Removed: Unused internal scan-findings code path (dead code) for a leaner, faster scan.

= 1.4.1 =
* Fixed: Fatal error on compliance dashboard refresh — `legibright_scan_governance()` (Pro) removed from free site scan; `legibright_check_governance()` card removed from free dashboard.
* Fixed: Dead admin link to governance page (`legibright-ac-governance`) removed from free dashboard.

= 1.4.0 =
* Changed: Free build now contains only free-tier features. Pro modules (monitoring, legal templates, PDF audit report, governance, AI register) moved to Pro build — no dead code or gated stubs in the free zip.
* Added: Admin asset enqueue pipeline (`assets/css/admin.css`, `assets/js/admin.js`) with plugin-page-only `$hook` guard — foundation for Faz 2 UI work.
* Added: `languages/` directory with `.pot` template for future translations.
* Fixed: External services section in readme updated to explicitly confirm the free version makes no third-party API calls.

= 1.3.0 =
* Changed: Plugin fully rebranded to Legibright – AI Act Compliance (slug `legibright-ai-act-compliance`, author URI legibright.eu).
* Changed: All constants, function prefixes, option names, and cron hooks migrated from `qualifai_` to `legibright_`.
* Added: Migration routine — existing user data from `qualifai_` (v1.2.x) and `aar_` (v1.1.x) prefixes is automatically carried over on first activation.
* Fixed: Settings page now shows a "Settings saved." confirmation after saving.
* Fixed: Chatbot disclosure description corrected to accurately reflect when the banner appears.

= 1.2.0 =
* Changed: Plugin renamed to "Qualifai – AI Act Compliance" with new slug `qualifai-ai-act-compliance`.
* Changed: All function, option, and constant prefixes updated from `aar_` to `qualifai_` (WP.org uniqueness requirement).
* Added: Migration routine — existing user data (options, post meta) is automatically carried over from the previous prefix on first activation.
* Fixed: All inline `<style>` and `<script>` blocks converted to properly enqueued files via `wp_enqueue_style` / `wp_enqueue_script`.
* Added: `== External services ==` section documenting third-party chatbot CDN detection.

= 1.1.0 =
* Changed: Plugin now developed and maintained by Legibright (legibright.eu).
* Changed: Author URI and Plugin URI updated to legibright.eu.
* Added: "by Legibright" branding in all plugin admin pages.
* Fixed: All Plugin Check (PCP) errors resolved (WP_Filesystem, wp_unslash, prepare, wp_cache, i18n).

= 1.0.8 =
* Added: E6 — AI Governance Package (Art. 4): internal AI Usage Policy generator (12 sections, EN/NL/DE, HTML export), AI Literacy Checklist (12 items, progress bar, save/export), dashboard governance card.
* Added: Governance compliance check in dashboard with pass/warn/N-A states.
* Added: Governance audit labels (policy_generated, checklist_saved) in EN/NL/DE.
* Fixed: AI Usage Register governance section wired to site scan.

= 1.0.7 =
* Added: E5 — AI Image / Deepfake Labeling (Art. 50): Media Library checkbox per image, C2PA/EXIF/XMP auto-detection on upload, front-end badge overlay.
* Added: Smart scan integration for unlabeled AI images.
* Added: Front-end image badge (CSS positioned, multilingual).
* Added: AI image audit log labels (image_labeled, image_unlabeled, image_auto_labeled).

= 1.0.6 =
* Changed: Default language switched from NL to EN (EU-general default).
* Fixed: Turkish text remnants in NL language strings.
* Fixed: Privacy policy references now use generic national DPA language.
* Fixed: Auto-detect and wizard language preference default from 'nl' to 'en'.

= 1.0.5 =
* Added: E4 — AI Usage Register with auto-compiled inventory, risk class badges, CSV/PDF export.
* Added: Full audit log with timestamps, user tracking, and CSV export.
* Added: Audit action labels in EN, NL, and DE.

= 1.0.4 =
* Added: E3 — Risk Assessment Wizard (Arts. 5 & 6): multi-step questionnaire, risk level classification, action cards, dashboard risk profile widget.

= 1.0.3 =
* Added: E2 — WooCommerce Support: AI-generated product labeling, product detection in scanner and register.

= 1.0.2 =
* Added: E1 — Smart Compliance Scan: homepage chatbot detection (30+ platforms), compliance score ring, quick-fix buttons.
* Added: Compliance Dashboard with real-time scan results.

= 1.0.1 =
* Added: Multilingual transparency page generator (EN/NL/DE/FR/ES).
* Added: AI content labelling meta box for posts, pages.
* Added: Chatbot disclosure notice (front-end banner).

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.4.0 =
Free build cleaned up — Pro modules removed from the free zip. No functional change for free users; all settings and labelled content are preserved.

= 1.3.0 =
Plugin rebranded to Legibright – AI Act Compliance. All existing settings and labelled content are automatically migrated — no data loss.

= 1.2.0 =
Plugin renamed to "Qualifai – AI Act Compliance". Existing settings and labelled content are automatically migrated — no data loss.

= 1.1.0 =
Plugin now published by Legibright. No functional changes — safe to update.
