=== RankWriting ===
Contributors: rankwriting
Tags: ai, seo, content, publishing, automation
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 1.4.0
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.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
* **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** — Uses a token-based handshake with no passwords stored. All API keys are hashed at rest.

= 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). When you publish an article, the article content is sent from RankWriting's servers to your WordPress site via the REST API. No personal data is collected by this plugin beyond what is necessary to authenticate the connection (a hashed API key stored in your WordPress database).

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? =

No. RankWriting uses a token-based connection. A random API key is generated during the connection process and stored as a SHA-256 hash in your WordPress database. Your WordPress login credentials are never used or stored.

= What permissions does the plugin need? =

The plugin only needs the ability to create posts (equivalent to an Editor role). It does not modify theme files, plugins, or site settings.

= How do I disconnect? =

Go to **RankWriting** in the admin menu and click **Disconnect**. This immediately revokes the API key.

= Is the connection secure? =

Yes. All API requests require a valid Bearer token. The token is validated using constant-time comparison to prevent timing attacks. Requests are also rate-limited and origin-checked.

== Changelog ==

= 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.
