=== WritingTools ===
Contributors: writingtools
Tags: ai writer, seo, content, publish, blog
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Publish articles from WritingTools to WordPress with one connection key. No application passwords.

== Description ==

[WritingTools](https://writingtools.ai) connects to this site with a connection key. From the WritingTools editor you can save a draft or publish a post or page. Nothing is scheduled.

**What you get**

* **One-key setup.** Copy the site URL and connection key from this plugin into WritingTools.
* **Posts or pages.** The editor can target Posts or Pages, as a draft or published now.
* **Featured images.** Images are uploaded to the Media Library and set as the featured image when the publishing account can upload files.
* **SEO fields.** SEO titles and meta descriptions are saved to Yoast SEO, Rank Math, All in One SEO, SEOPress, or The SEO Framework when one of those plugins is active.
* **Activity list.** Posts and pages received through this connection are listed on the plugin screen.

**How it works**

WritingTools calls the standard WordPress REST API. Requests that carry this site's connection key in `X-WritingTools-Key` run as the publishing account you choose. The plugin also exposes `GET /wp-json/writingtools/v1/status` so WritingTools can confirm the key. This plugin does not make outbound requests.

== Installation ==

1. In WordPress, go to **Plugins → Add New → Upload Plugin** and upload `writingtools-ai.zip`, or copy the `writingtools-ai` folder to `/wp-content/plugins/`.
2. Click **Install Now**, then **Activate**. You are taken to the **WritingTools** screen.
3. Open **Settings → Permalinks**, choose any structure except **Plain**, and save.
4. Check **Publish as**. That account must be able to publish posts.
5. In WritingTools, open **Integrations**, click **Connect** on **WordPress**, and paste the site URL and connection key from this screen.

== Frequently Asked Questions ==

= Where is the connection key generated? =

In this plugin, the first time it is activated. It starts with `writingtools_`. WritingTools does not generate the key.

= Which account do articles get published as? =

The **Publish as** account on the WritingTools screen, unless a different author is sent with a publish request and that user can publish.

= What if my key leaks? =

Click **Generate a new key**. The old key stops working immediately. Paste the new key into the WritingTools connection.

= WritingTools says it can't reach my site =

Permalinks must not be Plain (**Settings → Permalinks**). A firewall must not block `/wp-json/` or the `X-WritingTools-Key` header. The plugin must be activated.

= A wrong key =

The site responds with `writingtools_invalid_key`. Copy the key from this screen again.

== Changelog ==

= 1.0.0 =
* Initial WritingTools release. No scheduling.
