=== AI Transparency Label for the EU AI Act ===
Contributors: theseo
Tags: ai, transparency, disclosure, ai act, labels
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Record how much AI was involved per post, show it in a label you write, and publish it machine readable. Nothing leaves your site.

== Description ==

Article 50 of the EU AI Act asks, in some cases, that people are told when
content was made or manipulated by AI. This plugin does the practical part of
that: it lets you record per post or page how much AI was involved, it shows
that to your visitors in a sentence you wrote yourself, and it publishes the
same fact in a form a machine can read.

It is a bookkeeping tool, not a lawyer and not a detector.

= What it does =

* Adds a panel to the block editor, and a box to the classic editor, with
  three choices: no AI used, AI helped and a person edited and checked it, or
  mostly made by AI.
* Two optional fields per item: which model or tool, and who checked it.
* An overview of every published item with the choice it carries, with the
  ones that have no choice at the top, and a bulk action to set many at once.
* A label on the front end with the words you write. Two sets: Dutch for a
  site that runs in Dutch, English for every other site.
* A block and a shortcode, `[theseo_ai_label]`, for placing the label
  yourself instead of above or below the content. The setting that says which
  states get a label counts for these two as well: a state without a tick
  prints nothing anywhere.
* An optional meta element in the head of the page.
* An optional JSON-LD block.
* An optional counter in the admin bar for items without a declaration.

= What it does not do =

* It does not scan your text to guess whether AI wrote it. No plugin can do
  that reliably, so this one does not pretend to.
* It does not declare you compliant with anything. Article 50 puts the
  heaviest duties on providers of AI systems, not on everybody who writes a
  blog post, and the exact reach in your case is legal work. This plugin
  helps you record and show a choice you made yourself.
* It does not call any server. There is no account, no API key, no tracking,
  no phoning home. Search the code for wp_remote_get or curl and you will
  find nothing.

= What it stores =

Four values in the post meta of the item you declare:

* `_theseo_ai_stand`, one of three fixed values
* `_theseo_ai_tool`, the model or tool you typed, at most 200 characters
* `_theseo_ai_controleur`, the person you typed, at most 200 characters
* `_theseo_ai_gewijzigd`, the moment you last changed the choice

Plus one option row with your settings and your label texts. No visitor data,
no cookie, no browser storage, nothing about anybody who reads your site.
Deleting the plugin removes all of it, see uninstall.php.

= Everything on the front end is off until you switch it on =

A fresh install changes nothing about your public pages. The label, the meta
element and the JSON-LD are all off in the defaults. That is on purpose: a
plugin should not start printing sentences on your site because you installed
it.

= About the machine readable part =

Two separate things, each with its own switch.

The meta element looks like this:

`<meta name="ai-content-declaration" content="ai-assisted" />`

That name is a convention of this plugin. It is not a registered standard,
and the readme says so rather than suggesting otherwise.

The JSON-LD block is a schema.org CreativeWork node with its own `@id`,
ending in `#ai-declaration`. It carries your own label text in `creditText`
and, for the two AI states, the matching value from the IPTC digital source
type vocabulary as an `additionalProperty`. Those IPTC values
(`trainedAlgorithmicMedia` and `compositeWithTrainedAlgorithmicMedia`) are
the ones used across the industry for exactly this question. The node stands
next to the structured data of Yoast or Rank Math and never edits theirs.

= Dutch and English =

The plugin interface is translated. The label your visitors read is not a
translation but your own text: you write a Dutch sentence and an English one
on the settings screen, and the site language decides which of the two is
printed.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install the zip
   through Plugins, Add New, Upload Plugin.
2. Activate it.
3. Go to Settings, AI transparency, and open the Settings tab. Pick the post
   types you want, and switch on the label if you want visitors to see it.
4. Write the label sentences you want to use, in Dutch and in English.
5. Open a post. The panel sits in the sidebar of the editor.

== Frequently Asked Questions ==

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

No, and be careful with any plugin that says it does. Article 50 lays the
heaviest transparency duties on providers of AI systems. Whether and how a
publishing duty applies to your content depends on what you publish and on
your role, and that is a legal question. This plugin records your choice and
shows it. That is a useful part of the work, not the whole of it.

= Does it detect AI text? =

No. Detection tools are unreliable and this plugin does not include one. You
make the choice, the plugin remembers it.

= Does it send anything to a server? =

No. There is no outgoing request anywhere in the code.

= Will installing it change my site? =

No. Everything that prints on the front end is off in the defaults.

= Does it work with the classic editor? =

Yes. The block editor gets a sidebar panel, the classic editor gets a box in
the sidebar. Only one of the two appears, never both.

= I already use Yoast or Rank Math. Will the structured data clash? =

No. The JSON-LD block of this plugin is a separate node with its own `@id`
and it never touches what another plugin outputs.

= What happens to my declarations if I delete the plugin? =

They are removed, together with the settings. Deactivating keeps everything.

= Which WordPress versions has this been tested on? =

The header says 6.8. That is the version this release was written against.
The code is checked for syntax on PHP 7.4 through 8.5 and the behaviour of
every function was walked through, but this release has not yet been run
through a full manual test on every WordPress version in that range. The
header will be raised when it has been.

== Changelog ==

= 1.0.0 =
* First release.
* Declaration panel in the block editor and box in the classic editor.
* Overview screen with a counter, a filter for items without a choice and a
  bulk action.
* Optional front end label with your own Dutch and English wording.
* Optional meta element and optional schema.org JSON-LD node with the IPTC
  digital source type.
* Block and shortcode for placing the label by hand.
* No outgoing requests, no visitor data, full cleanup on uninstall.

== Upgrade Notice ==

= 1.0.0 =
First release.
