=== AIActify Compliance ===
Contributors: chrisain
Tags: ai act, eu ai act, compliance, artificial intelligence, transparency
Requires at least: 5.0
Tested up to: 7.0
Stable tag: 2.0.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Label AI-generated content with the EU AI pictogram and machine-readable metadata, and disclose AI chatbots — free, local, no account required.

== Description ==

The EU AI Act's transparency obligations (Article 50) apply from **2 August 2026**. This plugin helps website operators implement them — the core features work entirely locally, **without any account**:

### Free Features (local, no account needed):

* **AI Content Labels:** Mark any post or page as "AI-generated" or "AI-assisted" in the editor. The plugin renders a visible label with the standardised **EU AI pictogram** (Code of Practice on Transparency of AI-Generated Content, June 2026).
* **Machine-Readable Metadata:** Automatically adds Schema.org JSON-LD with the **IPTC Digital Source Type** (`trainedAlgorithmicMedia` / `compositeWithTrainedAlgorithmicMedia`) to labeled posts.
* **Chatbot Disclosure (Art. 50(1)):** Optional site-wide notice informing visitors that your site uses an AI chat assistant.
* **Translation-ready** (text domain `aiactify-compliance`).

### Optional: Connect the AIActify Platform

If you also want automation at scale, you can connect the [AIActify](https://aiactify.eu) platform (paid service with free trial). The connection adds:

* **Automated content detection** and a validation workflow across your whole site.
* **Art. 5 Risk Detection:** Detects scripts and network calls associated with prohibited AI practices (e.g., emotion recognition in prohibited contexts) and reports them to your dashboard. Blocking is opt-in per finding.
* **Visual On-Site Editor:** Classify texts and images with one click on your live website.
* **Tamper-evident audit trail** and PDF compliance reports.

Note: AIActify is a technical compliance tool and does not constitute legal advice.

== External services ==

The free features of this plugin (AI content labels, EU pictogram, Schema.org/IPTC metadata and the chatbot disclosure notice) run entirely on your own server and do not connect to any external service.

The plugin only connects to an external service if you actively opt in by entering an AIActify Site ID (and optionally an API Key) on the settings page. This connection is required for the optional AIActify platform features (automated content detection, Art. 5 script monitoring, the Visual On-Site Editor and audit trails).

* **Service:** AIActify, a compliance platform operated by AIActify (https://aiactify.eu), reachable at `https://aiactify-backend.vercel.app`.
* **What is sent and when:** When the platform connection is enabled, your Site ID is sent on each front-end page load to load your site-specific compliance configuration and the `enforcer.js` script. When you launch the Visual Editor from the admin, your API Key is sent once to authenticate the editor session. No website-visitor personal data is collected or sent.
* **Terms and privacy:** Terms of Service: https://aiactify.eu/terms — Privacy Policy: https://aiactify.eu/privacy

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/aiactify-compliance` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Open a post and set the "AI Content Label" in the editor sidebar — done.
4. (Optional) Navigate to **AIActify** in the admin menu to enable the chatbot disclosure or connect your AIActify account (Site ID / API Key).

== Frequently Asked Questions ==

= Do I need an AIActify account? =

No. The core features — AI content labels with the EU pictogram, machine-readable Schema.org/IPTC metadata, and the chatbot disclosure — work entirely locally without any account. An AIActify account (paid, with free trial) is only needed for the optional platform features: automated detection, validation workflow, Art. 5 monitoring and audit trails.

= Does this slow down my website? =

No. The AIActify compliance script is lightweight and operates entirely in the browser using optimized interception rules.

= What does the plugin do on the frontend? =

For locally labeled posts it renders a small badge with the EU AI pictogram and injects Schema.org JSON-LD — no external requests. Only if you connect the AIActify platform, it additionally loads `enforcer.js` from the AIActify service, which performs automated detection, renders disclosures, and reports Art.-5-relevant scripts to your dashboard (blocking is opt-in).

= Can I use the plugin without the Visual Editor? =

Yes. The Visual Editor is an optional platform feature. Local labeling and the chatbot disclosure need neither a Site ID nor an API Key.

= Is my data safe? =

The free features send no data anywhere. With an active platform connection, only your Site ID and (optionally) your API Key are transmitted. No visitor data is collected or sent to AIActify servers; all checks happen client-side in the visitor's browser.

== Screenshots ==

1. AI Content Label meta box in the post editor.
2. Frontend label with the EU AI pictogram and machine-readable metadata.
3. AIActify settings page (free features + optional platform connection).
4. Visual On-Site Editor for content classification (platform feature).

== Changelog ==

= 2.0.1 =
* Enqueue the chatbot-disclosure script via wp_enqueue_script instead of inline output.
* Documented the optional external AIActify service in an "External services" section.
* Removed load_plugin_textdomain() (not needed for wordpress.org-hosted plugins since WP 4.6).
* readme: corrected contributor username.

= 2.0.0 =
* NEW: Free local labeling — mark posts as AI-generated/AI-assisted, visible badge with the standardised EU AI pictogram (Code of Practice, June 2026), no account required.
* NEW: Machine-readable Schema.org JSON-LD with IPTC Digital Source Type for labeled posts.
* NEW: Optional site-wide AI chatbot disclosure notice (Art. 50(1)).
* The AIActify platform connection (Site ID/API Key) is now clearly optional.
* Internationalization: all strings are translation-ready.
* Removed the self-hosted update mechanism from the wordpress.org build (updates via the plugin directory).

= 1.1.0 =
* Settings quick-link added to the plugins list.
* Improved wording for transparency-first messaging.

= 1.0.0 =
* Initial Release.
* Enforcer snippet injection for Art. 5 and Art. 50 compliance.
* Visual On-Site Editor integration via API Key.
* Admin settings page with connection status toggle.
* Clean uninstall — removes all plugin data from database.

== Upgrade Notice ==

= 2.0.0 =
Major update: free local AI-content labeling with the EU pictogram — no account required. Platform connection is now optional.

= 1.0.0 =
Initial release. Install to begin EU AI Act compliance monitoring.
