=== Disclosio – EU AI Act Image Labels & Disclosure ===
Contributors: gimondi
Tags: ai, eu-ai-act, images, compliance, transparency
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Label AI-generated images and videos in line with the EU AI Act (Art. 50): per-file flags, a visitor disclosure popup and EU-style badges.

== Description ==

**Disclosio helps your WordPress site meet the transparency obligations of the EU AI Act (Regulation (EU) 2024/1689, Article 50), applicable from 2 August 2026.**

Since not every site is either "all AI" or "no AI", Disclosio works at the level of the **single image**: you classify each image in your Media Library as *AI generated* or *AI modified*, and Disclosio takes care of disclosing that information to your visitors — clearly, elegantly and in their language.

= How it works =

1. Classify images in your Media Library (a simple dropdown on each image, plus bulk actions and filters for existing archives).
2. On every page that contains flagged images, Disclosio automatically shows a **discreet floating button**.
3. Visitors click it to open an **accessible popup** listing exactly which images on that page are AI generated or AI modified, using the official EU label taxonomy. Clicking an entry scrolls to the image and highlights it.

= Key features =

* **Per-image classification**: *AI generated* / *AI modified* / *Not AI*, managed from the Media Library with a sortable column, quick filters and bulk actions.
* **Floating disclosure button + popup**: appears only on pages that actually contain flagged images. Dark and light button styles for light and dark themes.
* **EU-style labels**: the popup and the optional image badges use the label taxonomy published by the European Commission ("AI generated" / "AI modified").
* **Optional on-image badges**: show a small "AI" badge directly on flagged images that expands on hover — recommended for photorealistic AI content, where the label should appear next to the image itself.
* **Page-builder backgrounds covered**: images used as CSS backgrounds (e.g. in Elementor sections) are detected too, via an internal REST endpoint with caching.
* **"Everything is AI" mode**: if all images on your site are AI generated, switch to a simple footer disclaimer instead.
* **Multilingual out of the box**: English, Italian, German, French and Spanish included. The visitor-facing disclosure follows the language of the page, and custom texts are translatable with WPML and Polylang (wpml-config.xml included).
* **Works with any theme and page builder**: Disclosio hooks into the final rendering of the page, not into any specific builder.
* **Admin dashboard**: see at a glance how many images are flagged, unclassified, and jump straight to the right Media Library view.
* **Privacy-friendly**: no external services, no tracking, no data leaves your site.

= Legal note =

Disclosio is a technical tool that helps you disclose AI-generated content to your visitors. It does not constitute legal advice. Which images require labelling under Article 50 of the AI Act (in particular the distinction between photorealistic/deep-fake-like content and clearly artistic or stylised content) depends on your specific content and on the applicable guidelines — when in doubt, consult a legal professional.

== Frequently Asked Questions ==

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

Disclosio gives you the technical means to disclose AI-generated and AI-modified images to your visitors, following the transparency approach of Article 50. Whether a specific image must be labelled is a legal assessment that depends on your content; the plugin cannot make that assessment for you.

= Which images should I flag? =

The transparency obligations focus primarily on realistic content (images that could be mistaken for authentic photographs, so-called deep-fake-like content). Clearly artistic, stylised or obviously synthetic illustrations are generally treated differently. See the official Commission guidelines for details.

= Does it work with Elementor / my page builder? =

Yes. Disclosio marks images in the rendered page, so it works with any builder that outputs standard images. Background images set on Elementor sections and containers are detected as well.

= Does it work with WPML or Polylang? =

Yes. The visitor-facing texts follow the language of the page automatically. Your custom button label, popup intro and footer disclaimer are registered for translation via the included wpml-config.xml.

= Where does the image data go? Is any external service involved? =

Nowhere. All classification data is stored as regular post meta in your own WordPress database. The plugin performs no external requests. The only endpoint it uses is an internal REST route on your own site (`disclosio/v1/check` namespace, used by the frontend script to identify flagged CSS background images); it only ever returns whether images already published on the current page are flagged, i.e. information the plugin discloses publicly by design.

= What happens to my data if I uninstall the plugin? =

The uninstaller removes all plugin data: settings, per-image flags and cached values. If you only deactivate the plugin, your classifications are kept.

= I flagged an image but the button does not appear =

The button only appears on pages that contain flagged images. If the image is embedded in an unusual way (some sliders and lazy-loaders), check that it is rendered as a standard `<img>` tag or a CSS background image. Feel free to open a support thread with details.

== Screenshots ==

1. The floating disclosure button on a page containing AI images (dark style).
2. The visitor popup listing the AI images on the current page, with EU-style labels.
3. Optional on-image badge, expanding on hover.
4. Media Library: AI column, quick filter and per-image classification dropdown.
5. Bulk actions to classify existing image archives quickly.
6. Settings: site mode, button position and style, image badges, custom texts.
7. The Disclosio dashboard with classification stats.

== Changelog ==

= 1.2.0 =
* Added: option to hide the floating button (badges alone can provide the disclosure).
* Added: warning in the dashboard when no disclosure method is active.
* Fixed: badges were not displayed on video elements.

= 1.1.0 =
* Added: local video support — videos uploaded to the Media Library can now be classified as AI generated or AI modified, and are disclosed like images.
* Changed: image badges are now enabled by default on new installations (existing sites keep their current setting).

= 1.0.3 =
* Changed: the floating button now uses the "AI" round marker instead of a decorative icon, in pure black or white.
* Changed: plugin settings moved to a top-level "Disclosio EU" menu.
* Added: Settings link on the plugins list row.

= 1.0.2 =
* Fixed: image badges showed a duplicated "AI" prefix (e.g. "AI AI GENERATED").
* Added: clicking an image badge now opens the disclosure popup.
* Fixed: badges on page-builder sections with background images were not hoverable or clickable.

= 1.0.1 =
* Fixed: the hidden popup overlay could intercept clicks, making the floating button and image badges unclickable.
* Fixed: badge stacking order inside page-builder sections with background images.
* Fixed: label alignment inside the collapsed image badge.

= 1.0.0 =
* Initial public release.
* Per-image AI classification: AI generated / AI modified / Not AI.
* Floating disclosure button with accessible popup, dark and light styles.
* EU-style label taxonomy in the popup and optional on-image badges.
* CSS background image detection (page builders) via internal REST endpoint with caching.
* Footer disclaimer mode for all-AI sites.
* Media Library column, filters and bulk actions.
* Admin dashboard with classification stats.
* Translations: English, Italian, German, French, Spanish. WPML/Polylang support for custom texts.

== Upgrade Notice ==

= 1.2.0 =
Adds a floating button toggle and fixes badges on videos.

= 1.1.0 =
Adds support for locally hosted videos.

= 1.0.3 =
New button design and a dedicated top-level admin menu.

= 1.0.2 =
Fixes badge labels and makes image badges clickable.

= 1.0.1 =
Important fix: the floating button and image badges are now clickable on all themes.

= 1.0.0 =
First public release.
