=== PostNext ===
Contributors: postnext
Tags: blog automation, ai content, auto publish, seo blog, content sync
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 1.1.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect PostNext to WordPress and auto-publish AI-written blog posts on a planned, daily-cadence schedule.

== Description ==

**PostNext turns your WordPress blog into a hands-off content engine.**

You set up a content plan once in the PostNext app — start date, duration, posting cadence, language, and competitive intent — and the AI researches, writes, and ships articles to your WordPress site for the whole run. No copy-paste, no manual scheduling, no batch-generate-and-pray.

= Plan it once, ship it daily =

* **Multi-day content plans** — choose 7 days, 14 days, 30 days, or "Until I stop". Set a start date and PostNext keeps the pipeline flowing.
* **Publish hour window (UTC)** — pick the hour range when posts should go live (e.g. 08–19 UTC). Each article publishes at a random minute inside the window, so your blog cadence reads as human, not bot.
* **Content language** — write natively in your audience's language; not machine-translated from English.
* **Auto-publish to WordPress** — publish posts automatically when generated, or leave off to land them as drafts for review.
* **Auto-promote on social media** — create social posts to promote each blog post (managed in the PostNext app).
* **Competitor domains (optional)** — enter competitor websites to discover content gaps. One domain per line, max 10. PostNext finds keywords and topics they rank for and you don't, then writes content to close the gap.

= What the plugin does inside WordPress =

* Receives articles from PostNext via a secure REST API
* Downloads and stores all images in your Media Library (deduplicated by source URL)
* Sets SEO metadata for Yoast, Rank Math, AIOSEO, and SEOPress
* Tracks every synced article on a built-in dashboard with status and date
* Supports draft-first or direct-publish workflows
* Works on single sites and WordPress Multisite networks (per-site tracking + settings)

== Installation ==

1. Install from **Plugins > Add New** or upload the zip to `/wp-content/plugins/`.
2. Activate the plugin.
3. Go to **PostNext > Settings** and paste your connection key.
4. Choose draft or publish mode. Done.

Articles will appear in your Posts list as they are created in the PostNext app.

== Screenshots ==

1. Dashboard showing synced articles with status and date.
2. Settings page for connection key and publish mode.

== External services ==

This plugin connects to the PostNext platform ([https://postnext.io](https://postnext.io)) to receive blog post content for publishing to your WordPress site.

**When data is transmitted:**

* When the PostNext backend pushes a new article to your site via the REST API
* When the PostNext backend updates or deletes an existing article
* When PostNext tests the integration connection
* When PostNext queries your site for published posts

**What data is received from PostNext:**

* Article content (title, body HTML, slug, categories, tags)
* Featured image URL (downloaded and stored locally in your Media Library)
* SEO metadata (meta description, focus keyword)
* Author assignment

**What data is sent to PostNext:**

* Your site name and URL (during status checks)
* Post IDs and URLs (as confirmation after publishing)
* Plugin version and capabilities

**No user data, visitor data, or analytics are collected or transmitted.**

* Service: [PostNext](https://postnext.io)
* [Terms of Use](https://postnext.io/terms)
* [Privacy Policy](https://postnext.io/privacy)

== Frequently Asked Questions ==

= Where do I get a connection key? =
Create a WordPress integration in the PostNext app. The key is generated there.

= Can I review articles before they go live? =
Yes. Set the publish mode to "Save as Draft" and articles will land in your Drafts.

= Does this work with Multisite? =
Yes. Network-activate and each site gets its own tracking table and settings.

== Upgrade Notice ==

= 1.1.5 =
Preserves JSON-LD schema (FAQPage, Article) in synced posts. Recommended for SEO rich-result eligibility.

= 1.1.4 =
Refreshed WordPress.org store banner artwork. No code changes.

= 1.1.3 =
Expanded plugin description with full feature coverage — planning cadence, publish hour window, auto-promote, competitor content gaps. No code changes.

= 1.1.2 =
Internal prefix change to avoid potential collisions. Existing keys and tracking data are migrated automatically on activation.

= 1.1.1 =
Submission cleanup: corrected legal page URLs and removed redundant translation loader.

= 1.1.0 =
Redesigned admin UI and improved code quality. No breaking changes.

== Changelog ==

= 1.1.5 =
* Preserve `<script type="application/ld+json">` blocks (FAQPage, Article schema) during content sanitization so structured-data rich-results work end-to-end
* Other `<script>` tags remain blocked

= 1.1.4 =
* Refreshed WordPress.org store banner artwork
* No plugin code changes

= 1.1.3 =
* Expanded plugin description with full feature coverage (planning cadence, publish hour window, auto-promote on social media, competitor content gaps, content language)
* Updated WordPress.org store banner artwork
* No plugin code changes

= 1.1.2 =
* Renamed internal PHP prefix from postnext_ to pnxt_ across constants, classes, options, hooks, transients, cache keys, table name, post meta, JS l10n, and admin menu slugs to avoid common-word collisions
* One-time migration on activation moves existing options, tracking table, and post meta to the new prefix; legacy values are also cleaned up on uninstall
* Text domain remains "postnext" to match the plugin slug

= 1.1.1 =
* Updated Terms of Use and Privacy Policy links to current URLs
* Removed redundant load_plugin_textdomain() call (WordPress.org auto-loads translations since WP 4.6)

= 1.1.0 =
* Redesigned admin dashboard and settings UI
* Refactored to class-based PHP architecture
* New brand icon
* Removed jQuery dependency from settings page
* Internal code quality improvements

= 1.0.0 =
* Initial release with article sync, SEO meta, image handling, and multisite support.
