=== NextBrill Autopost ===
Contributors: nextbrill
Tags: blog automation, ai content, auto publish, blogs with seo, autopost
Requires at least: 5.0
Tested up to: 6.9
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered WordPress plugin that generates and publishes SEO-optimized blog posts using OpenAI. Add one post at a time, process it, then add the next.

== Description ==

NextBrill Autopost uses OpenAI (GPT-4) to generate full blog posts from a topic and focus keyword. Add a post to the queue, run "Process Queue Now," and the plugin creates an SEO-optimized post and publishes it. Add the next post only after the current one is completed — simple, one-at-a-time workflow with no scheduling.

**Key Features:**

* AI-powered content generation using OpenAI GPT-4 (or GPT-3.5 Turbo)
* One post at a time — add, process, publish, then add the next (no bulk queue or scheduling)
* SEO optimization for Yoast SEO and Rank Math (meta description, focus keyword, slug)
* Optional automatic FAQ section (accordion-style, 6 FAQs)
* Optional DALL-E featured image generation
* Internal and external link suggestions (you provide URLs; AI weaves them in)
* Category and tag assignment, meta description, heading structure, schema markup
* Standards-compliant: all CSS/JS enqueued (no inline scripts or styles)

**Requirements:**

* WordPress 5.0 or higher
* PHP 7.4 or later
* Your own OpenAI API key (https://platform.openai.com/api-keys)
* Active internet connection

**External services**

This plugin uses the following third-party service. Use is subject to the service’s terms and privacy policy.

* **OpenAI API** — Used to generate blog post content, meta descriptions, FAQ text, and (optionally) featured images via DALL·E. The plugin cannot perform AI generation without this service.
* **What data is sent and when:** When you add a post to the queue and run “Process Queue Now,” the plugin sends to OpenAI’s servers: the topic title, focus keyword, and any optional fields you entered (secondary keywords, internal/external links, desired word count, FAQ request). If DALL·E is enabled in Settings, a prompt derived from the topic is also sent to generate a featured image. Your OpenAI API key is sent with each request for authentication. No data is sent until you explicitly process a queue item (or the scheduled cron runs).
* **OpenAI** — Terms of use: https://openai.com/policies/terms-of-use — Privacy policy: https://openai.com/policies/privacy-policy

**How It Works:**

1. Go to **Autopost > Add to Queue** and enter one post (topic title, focus keyword, optional links, FAQs, word count, category, tags).
2. Go to **Autopost > Queue** and click **Process Queue Now**. The plugin generates the post with OpenAI and publishes it.
3. After the post is completed (or removed), add the next post from **Add to Queue** and repeat.

**NextBrill Autopost Pro:**

A separate product with bulk entry, scheduling, and priority support is available at:
https://nextbrill.com/product/nextbrill-autopost/

This plugin is fully functional with no usage limits, license checks, or locked features. All code hosted here is free to use.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/nextbrill-autopost` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **Autopost > Settings** and enter your OpenAI API key.
4. Go to **Autopost > Add to Queue** to add your first post, then **Autopost > Queue** to process it.

== Frequently Asked Questions ==

= Do I need an OpenAI API key? =

Yes. You need your own API key from https://platform.openai.com/api-keys. Usage is billed by OpenAI based on tokens.

= How much does the OpenAI API cost? =

OpenAI charges by usage. GPT-4 is roughly $0.03 per 1,000 input tokens and $0.06 per 1,000 output tokens. A typical 1,500-word post may cost about $0.10–$0.30 to generate.

= Can I add more than one post at once? =

This version adds one post at a time. After the current post is generated and published (or deleted from the queue), you can add the next. For bulk entry and scheduling, see NextBrill Autopost Pro.

= Does it work with Yoast SEO and Rank Math? =

Yes. The plugin sets focus keyword, meta description, and slug in a way that works with both Yoast SEO and Rank Math.

= Can I edit posts before or after they're published? =

Generated posts are normal WordPress posts. You can edit them in the post editor; you can also delete a queue item before processing if you change your mind.

= Can I use DALL-E for featured images? =

Yes. In **Autopost > Settings** you can enable "Use DALL-E for Images" to have the plugin generate a featured image for each post (uses your OpenAI API usage).

== Screenshots ==

1. Dashboard with stats (total, pending, completed, failed) and quick actions
2. Add to Queue — single post form (topic, keyword, links, FAQs, word count, category, tags)
3. Queue page — view status and run "Process Queue Now"
4. Settings — OpenAI API key, model (GPT-4 / GPT-3.5 Turbo), DALL-E option

== Changelog ==

= 1.0.0 =
* Initial release
* One-post-at-a-time queue: add one post, process it, then add the next
* No scheduling — process when you're ready
* AI content generation with OpenAI GPT-4 / GPT-3.5 Turbo
* SEO support for Yoast SEO and Rank Math
* Optional FAQ section and DALL-E featured images

== Upgrade Notice ==

= 1.0.0 =
Initial release. Fully functional; add and process posts one at a time. Pro version (separate product) adds bulk entry and scheduling.
