=== BenchWrite Publisher ===
Contributors: benchwrite
Tags: publishing, seo, content, automation, media
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Publishes finished articles from your BenchWrite account to this site, with images, featured image, slug, categories, tags and SEO fields.

== Description ==

BenchWrite is a paid external service that writes long-form, source-checked
articles. This plugin is the delivery end of it: once you pair this site with
your BenchWrite account, finished articles land here as real WordPress posts.

For each article the plugin:

* imports every image into this site's own media library, with its file name,
  alt text and caption, then rewrites the article to point at your copies — so
  nothing on the published page depends on BenchWrite staying online;
* sets the featured image;
* sets the post slug, excerpt, categories and tags, creating any terms that do
  not exist yet;
* fills the SEO title and meta description for Yoast SEO, Rank Math or
  SEOPress when one of them is active, and falls back to the post excerpt when
  none is;
* publishes immediately or saves as a draft, as you choose in BenchWrite.

**No application password is needed.** Pairing uses a one-time code and the
plugin then authenticates on its own header, so hosts and security layers that
strip the WordPress `Authorization` header do not break publishing.

**Works on locked-down sites.** If your site cannot be reached from the
outside — a firewall, a bot challenge, a private or staging network — the
plugin checks BenchWrite every few minutes and pulls approved articles in
instead. No inbound access has to be opened.

= External service: BenchWrite =

This plugin requires an account with BenchWrite, a paid third-party service
operated at https://benchwrite.com. The plugin is of no use without one. You
do not need an account to install or activate it.

**What is sent to BenchWrite**, when you pair the site and on each check-in:

* this site's address and name;
* its WordPress version and this plugin's version;
* whether pretty permalinks are on, whether the uploads folder is writable,
  whether the site is multisite, and which SEO plugin (if any) is active;
* for each published article, the resulting post ID, permalink and status, so
  BenchWrite can show you where it went.

**What is received from BenchWrite**: article title, body, excerpt, slug,
categories, tags, SEO title and description, and image files with their alt
text and captions.

No visitor, customer, comment, user or order data is read or transmitted. The
plugin stores one option, a site token issued during pairing, which you can
remove at any time with the Disconnect button.

Service terms: https://benchwrite.com/terms
Privacy policy: https://benchwrite.com/privacy

== Installation ==

1. Plugins → Add New → Upload Plugin, choose the zip, then activate.
2. Go to Settings → BenchWrite.
3. In BenchWrite, open Brand Blueprint → Integrations and copy the pairing
   code shown there.
4. Paste the code into the field on the settings screen and click Connect. The
   screen then shows the brand it is connected to and what this site supports.

== Frequently Asked Questions ==

= Do I need a WordPress application password? =

No. Pairing issues the plugin its own token, which it sends on a dedicated
header. This is why it keeps working on hosts where application passwords are
blocked.

= What happens to the images? =

They are downloaded into this site's media library before the post is saved,
and the article is rewritten to use your copies. Alt text, caption and file
name come across with each image.

= Will it work if my site blocks outside requests? =

Yes. When BenchWrite cannot reach the site, the plugin switches to checking
BenchWrite itself every five minutes and publishing what it finds. You can
also press "Check for articles now" on the settings screen.

= Where do the SEO title and description go? =

Into Yoast SEO, Rank Math or SEOPress if one of them is active. If none is,
the description is saved as the post excerpt and the settings screen tells you
so.

= How do I disconnect the site? =

Settings → BenchWrite → Disconnect. That deletes the stored token, and the
site stops accepting or requesting articles immediately. Posts already
published stay exactly as they are.

= Does it change or delete anything I already published? =

Only if BenchWrite asks it to update an article it published before — those
are matched by an ID stored on the post. It never touches posts it did not
create.

= Can I point it at a staging copy of BenchWrite? =

Yes: define `BENCHWRITE_API_BASE` in `wp-config.php` with the alternative
address before pairing.

== Screenshots ==

1. Settings → BenchWrite before pairing: paste the one-time code.
2. A connected site, showing the brand, last check-in and what the site supports.
3. The Integrations panel in BenchWrite where the pairing code is generated.
4. An article published by the plugin, with its featured image in place.

== Changelog ==

= 1.0.0 =
* First release: pairing by one-time code, publishing over a dedicated REST
  namespace, media import with alt text and captions, featured image, slug,
  categories, tags, SEO fields for Yoast/Rank Math/SEOPress, and a scheduled
  pull mode for sites that block inbound requests.

== Upgrade Notice ==

= 1.0.0 =
First public release.
