=== RankWriting ===
Contributors: rankwriting
Tags: ai, seo, content, publishing, automation
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 1.14.1
Requires PHP: 8.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Connect your WordPress site to RankWriting to publish AI-powered SEO content directly.

== Description ==

RankWriting is an AI-powered SEO content platform that researches, writes, and publishes full blog articles to your WordPress site.

This plugin connects your WordPress site to your RankWriting account, enabling:

* **One-click publishing** — Publish AI-generated articles directly from RankWriting to your WordPress site
* **Home website management** — Uses installed native WordPress/WooCommerce REST resources plus bundled SiteGround 1.3.0 extensions through the same resource tools. Requested edits execute immediately, without saved plans, approval or dispatch. Independent operations continue after individual failures. Connection and WordPress role permissions still apply.
* **Writing MCP tools** — Read posts, pages, products and categories; save reviewed article, page and simple-product drafts from RankWriting chat. Requires WooCommerce for products. Existing article publishing continues to work.
* **SEO meta support** — Automatically sets meta title and description for Yoast SEO, Rank Math, and AIOSEO
* **Featured images** — Cover images are automatically uploaded to your WordPress media library
* **Publishing defaults** — Set default author, post status, and category for all imported articles
* **Secure connection** — Automatically creates a dedicated WordPress application password for authenticated API calls. Credentials are encrypted for server-to-server use and never sent to the chat model.

= Coming Soon =

* SEO Audit — scan your pages for missing titles, meta descriptions, and H1 issues
* Page Speed — Core Web Vitals and performance insights
* Link Checker — find broken links and redirect chains
* Rank Tracking — monitor keyword rankings from your dashboard

= Privacy =

This plugin connects to the RankWriting service (rankwriting.com). Content is transferred via authenticated REST requests. A dedicated WordPress application password and username are sent directly to RankWriting over HTTPS and encrypted at rest. WordPress stores the password hash; the plugin also keeps an encrypted copy for provisioning retries. A separate service token authenticates outbound publishing polls. Disconnecting or uninstalling revokes this plugin's application password.

See our [Privacy Policy](https://rankwriting.com/privacy-policy) for full details.

== Installation ==

1. Upload the `rankwriting` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to **RankWriting** in the admin menu
4. Click **Connect to RankWriting** and authorize your account
5. That's it — you can now publish articles from rankwriting.com directly to this site

== Frequently Asked Questions ==

= Does this plugin store my WordPress password? =

Your normal login password is never used. RankWriting creates its own revocable WordPress application password automatically. You do not need to copy a password into chat or configure a separate application manually.

= What permissions does the plugin need? =

Basic publishing works with an Editor role. Home management uses the permissions of the WordPress user who enables it, and every read and write checks that user's current capability. Administrator-only work such as users, software updates, themes, plugins and settings therefore requires an Administrator connection.

= How do I disconnect? =

Go to **RankWriting** in the admin menu and click **Disconnect**. This revokes the dedicated application password and the service connection token.

= Is the connection secure? =

WordPress validates the username and application password using HTTP Basic authentication over HTTPS. Plugin requests additionally require the connected application UUID and user, with existing role permissions, rate limits and origin checks. Older connections retain Bearer compatibility only until their application credentials have been synchronized.

== Changelog ==

= 1.14.1 =
* Verify persisted variation fields without parent SKU/image fallbacks. Release retired managed SKUs before applying renamed or swapped draft combinations.

= 1.14.0 =
* Add a separate owned variable-product draft tool with durable child identities, optional image matching, attribute reuse, and bounded retry recovery. Existing simple-product tools retain their restrictions.

= 1.13.0 =
* Provision a dedicated WordPress application password automatically and use Basic authentication for inbound RankWriting requests.
* Synchronize existing enabled connections through the publishing poll; respect manual revocation and revoke owned credentials on disconnect/uninstall.
* Requires the SaaS application-password migration and credential-sync endpoint before plugin upgrade.

= 1.12.3 =
* Show Connected after authorization and remove instructions for a separate manual health check.

= 1.12.2 =
* Verify the new Bearer credentials from WordPress before completing a reconnect, without requiring inbound website access or claiming publishing jobs.
* Rotate abandoned candidate keys on new authorization and reject mismatched concurrent key commits.
* Display outbound authentication failures and preserve actionable handshake errors; clear old polling diagnostics after verified reconnect.
* Requires the RankWriting service with /api/connect/verify deployed before upgrading.

= 1.12.1 =
* Preserve the selected SaaS workspace when reconnecting after a domain change.
* Confirm the claim response before committing credentials; show connection errors on reconnect.
* Distinguish locally saved connection state from verified SaaS access.

= 1.12.0 =
* Existing resource tools now discover and dispatch installed native WordPress and WooCommerce REST resources through the connected user, without application passwords or extra HTTP calls.
* Native product metadata, original search/field schemas, explicit pagination and optional rw_meta_keys projection support complete audits. Credentials are redacted and credential writes blocked.
* Native batch partial failures remain visible; large responses retain actionable recovery instructions and write receipts.

= 1.11.1 =
* Name the connected integration RankWriting/WordPress in resource tool descriptions and capability responses.

= 1.11.0 =
* Reuse SiteGround resource controllers directly; original argument schemas, reads, writes and batch errors.
* New resource catalog/read/write tools require no plan, approval or deferred dispatch.
* Independent edits continue after failures; uncertain transport results are not automatically replayed.
* Preserve all Yoast term metadata when saving SEO title and description.
* Bundled SiteGround source, provenance hashes and GPLv3 license included.

= 1.10.2 =
* User-requested operations execute without a human review step. Unverified writes are reported as execution errors, not approval requests.

= 1.10.0 =
* Compact resource lists with SiteGround-style top-level _fields selection, explicit detail reads and optional edit fingerprints/schema.
* Native controller filters for content, taxonomies, products, media, orders, comments and users; missing-field checks and count-only results without returning unrelated records.
* Preserve authoritative fingerprints and per-resource permissions; distinguish unavailable fields from missing values and retain source pagination after filtering.

= 1.9.0 =
* Direct authenticated REST operations, batch SEO reads and complete collection pagination. Existing approval, permission and idempotency checks remain in force.

= 1.8.0 =
* Expand Home management to full WordPress user CRUD, roles and passwords, complete WooCommerce product/variation/order fields, and registered metadata exposed by installed REST controllers.
* Add precise Gutenberg block insert, replace, move, delete and attribute operations plus post/page revision restore and deletion.
* Add repository theme installation, activation, upgrade and deletion; plugin upgrade; WordPress core and language-pack updates.
* Execute ordinary reversible Home edits directly while reserving one grouped confirmation for destructive, public, financial, credential and system-software work.

= 1.7.0 =
* Add live resource discovery and reviewed sequential management plans with creation references.
* Support taxonomy creation and membership, Yoast/Rank Math term SEO, content and Gutenberg resources, image import, menus, comments, profile fields, settings, simple products, coupons and order status/notes.
* Support repository plugin installation, activation/deactivation and deletion, installed theme activation and object-cache clearing.
* Retain approval proofs, actor/connection binding and conflict checks; persist individual receipts and stop on uncertain outcomes.
* Product creation remains draft-only; variable products, arbitrary code, Elementor internals and automatic software upgrades are not supported.

= 1.6.1 =
* Review and apply multiple supported edits to the same object as one immutable plan.

= 1.6.0 =
* Opt-in Home website edits through WordPress 6.9+ core Abilities API. No additional plugin required.
* Immutable before/after plans, server approval proof, permission checks, conflict detection, field verification and reviewed reversal.
* Supports existing content fields, simple prices, Yoast/Rank Math metadata, media ALT and core block plain text.
* Older WordPress versions retain existing publishing; new operations require core 6.9+.

= 1.5.2 =
* Preserve styled blog content marked rw-custom-block as individual Custom HTML blocks.

= 1.5.0 =
* Product page draft saving with commerce details, ordered gallery and image metadata.
* Reuses imported image attachments on retries. Supports AVIF where WordPress supports it.

= 1.4.0 =
* Adds authenticated, stateless MCP writing tools at /wp-json/rankwriting/v1/mcp.
* Supports draft-only posts, pages and simple products with SEO, categories and a featured image.
* Uses source identity and database locking for retry-safe draft updates; refuses to overwrite published content.
* Keeps the existing article publishing and polling protocol unchanged.

= 1.3.1 =
* Published articles now use native Gutenberg blocks instead of one Classic block
* Converts headings, paragraphs, lists, images, tables, quotes, and video embeds

= 1.3.0 =
* Reliable publishing: immediate push with pull fallback
* Idempotent article upserts prevent duplicate WordPress posts
* Added claim leases, durable result confirmation retries, and Sync now
* Added publishing diagnostics and featured-image warnings
* Improved connection retry behavior and WordPress subdirectory support
* Added focus keyword support for Yoast SEO, Rank Math, and AIOSEO

= 1.2.6 =
* Added outbound queue polling for hosts that block inbound publishing requests

= 1.2.3 =
* Security: removed unused validate-token endpoint
* Settings: added wp_unslash to POST data handling
* Cleanup: removed debug error_log calls from revoke()
* Added uninstall.php to clean up options on plugin deletion

= 1.0.0 =
* Initial release
* Token-based connection with rankwriting.com
* Article publishing with SEO meta support (Yoast, Rank Math, AIOSEO)
* Featured image upload
* Publishing defaults (author, status, category)
* Coming soon: SEO audit, page speed, link checker, rank tracking

== Upgrade Notice ==

= 1.0.0 =
Initial release.
