=== zeitwert | labs Content-Engine Connector ===
Contributors: zeitwertlabs
Tags: content, automation, ai, blog, rest-api
Requires at least: 5.9
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.9.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WordPress to the zeitwert | labs Content Engine — researched draft articles you review and approve before anything goes live.

== Description ==

The zeitwert | labs Content-Engine Connector links your WordPress site to the zeitwert | labs Content Engine over a small, dedicated REST endpoint — independent of your normal WordPress login system.

**What it does**

* Creates new blog post drafts researched and written by the Content Engine
* Never publishes anything automatically — every draft waits for you (or an authorised person) to approve it
* Lets you pick which existing WordPress user account appears as the author
* Manages draft revisions (corrections, image embedding) before you approve them
* Optionally duplicates an existing page as a starting layout for new landing pages, keeping your theme/page-builder data intact
* Lists recent published posts so the Content Engine can match your existing tone of voice
* Can retract (move to trash) an article the Connector itself created. Trashed articles can be restored from the WordPress trash
* Adds the machine-readable note `<meta name="ai-assisted" content="true">` to the head of posts created through the Connector, stating that AI was involved in writing them. Switch it off with `add_filter( 'zeitwert_connector_ai_meta', '__return_false' );`

**Security model**

* No WordPress password, no new user account, no changes to existing plugins or permissions
* Access is protected by a single, randomly generated security key ("Secret"), 64 hexadecimal characters, shown only on the plugin's own settings screen
* You can regenerate the Secret at any time — the previous one stops working immediately
* Every draft the Connector creates is tagged internally; the Connector can only ever modify or approve drafts it created itself, never arbitrary existing content
* Uploaded images are validated against their actual file content (not just the declared file type) before being accepted
* The plugin only ever touches the media library and post/page drafts — it never touches orders, customer data, or other plugins' data
* The Secret is sent with every request, so use the plugin only on a site served over HTTPS
* Deleting the plugin removes everything it stored in your database options (Secret, chosen author, contact details, record of accepted terms)

**Who this is for**

This plugin is intended for customers of the zeitwert | labs Content Engine (https://zeitwert-labs.de/content-engine/). The plugin itself is free, but the Content Engine it connects to is a commercial service offered by the plugin author. Installing the plugin without an active Content Engine engagement will not do anything on its own — it only provides the connection point.

== External services ==

This plugin connects to one external service, operated by the plugin author (zeitwert, Marketing Experts, Germany): the zeitwert | labs connection endpoint at https://zeitwert-labs.de/connector-intake/.

**What it is used for:** activating the connection between your site and the zeitwert | labs Content Engine for customers of that service.

**What data is sent, and when:** only when you click the submit button of the connection form under Settings → zeitwert Content-Engine, and only after you have ticked the checkbox accepting the Terms of Use and the Data Processing Agreement. The data sent is the Secret generated by the plugin, your site address, the plugin version, and the phone number and email address you entered in that form. The plugin sends nothing in the background, on activation, or on a schedule.

**Connections to your site:** once the connection is active, the Content Engine calls the dedicated REST endpoint of this plugin on your site to create and manage drafts. You can cut this connection at any time by regenerating the Secret or deactivating the plugin.

Service provider: zeitwert, Marketing Experts. Terms of Use (German): https://zeitwert-labs.de/connector-nutzungsbedingungen/ — Data Processing Agreement (German): https://zeitwert-labs.de/connector-avv/ — Privacy Policy (German): https://zeitwert-labs.de/datenschutz/

== Installation ==

1. Upload the plugin ZIP through Plugins → Add New → Upload Plugin, or extract it into `/wp-content/plugins/zeitwert-labs-connector/`.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to Settings → zeitwert Content-Engine.
4. Choose the WordPress user account that should appear as the author of new articles. Use an account with a neutral display name (e.g. "Editorial Team"), not your administrator account, since the author name and author link are public.
5. Enter a phone number and email address, confirm the checkbox for the Terms of Use and Data Processing Agreement, and submit — this sends your Secret and site address to zeitwert | labs so the connection can be activated.

== Frequently Asked Questions ==

= Does this plugin publish content automatically? =

No. Every article is created as a draft only. Publishing requires a separate, explicit approval step by a human.

= Does zeitwert | labs get my WordPress password? =

No. The Connector never asks for or uses your WordPress login. Access is limited to a single-purpose security key that only allows the specific actions listed above.

= What happens if I deactivate or delete the plugin? =

The connection is immediately cut. No further drafts can be created or approved through it. When you delete the plugin, the Secret and the contact details it stored are removed from your database; articles and images created through it stay on your site.

= Where can I read the full Terms of Use and Data Processing Agreement? =

https://zeitwert-labs.de/connector-nutzungsbedingungen/ and https://zeitwert-labs.de/connector-avv/ (German only).

== Screenshots ==

1. Settings screen: choose the author account, view/regenerate the Secret, submit connection details.

== Changelog ==

= 1.9.2 =
* Deleting the plugin now removes the Secret, chosen author, contact details and accepted-terms record from the database (new uninstall routine)
* Minimum WordPress version corrected to 5.9
* Readme: the AI meta note and the commercial nature of the connected service are now stated explicitly
* Plugin header and code documentation rewritten in English

= 1.9.1 =
* Settings screen: status flags in the URL are now unslashed and sanitized before use; one internal loop variable renamed to carry the plugin prefix. No change in behaviour. Tested up to WordPress 7.1.

= 1.9.0 =
* New articles, updates and retractions made through the Connector are now visible on category, tag and archive pages immediately: the page cache is flushed once after each change (supported: W3 Total Cache, WP Rocket, WP Super Cache, WP Fastest Cache, LiteSpeed Cache, SiteGround Optimizer, Breeze, Hummingbird, Cache Enabler). Can be switched off with the filter zeitwert_connector_purge_caches

= 1.8.0 =
* Articles created by the Connector now carry a machine-readable note in the page head (meta name "ai-assisted") stating that AI was involved in creating them. Applies to existing Connector articles as well; can be switched off with the filter zeitwert_connector_ai_meta

= 1.7.0 =
* One-click submission of Secret and site address to zeitwert | labs (previously required a manual email)
* Mandatory, server-enforced consent to Terms of Use and Data Processing Agreement before submission
* Real image-content validation on upload, independent of the declared file type
* Media list no longer exposes original file titles/filenames

= 1.6.0 =
* Added page duplication (`/clone-page`) to use an existing, approved page as a layout template for new drafts

= 1.3.0 =
* Initial public release: draft creation, approval, updates, media handling, style-matching from published posts

== Upgrade Notice ==

= 1.8.0 =
Adds a machine-readable AI-involvement note to Connector articles. No change to the connection or the approval flow.

= 1.7.0 =
Adds required consent to Terms of Use/DPA before the one-click submission works. Existing connections are not affected.
