=== AI Content Engine — SEO Blog Post Generator with Citations ===
Contributors: waypointsoftwareusa
Tags: ai, seo, content, blog, writing
Requires at least: 7.0
Tested up to: 7.0.2
Requires PHP: 8.1
Stable tag: 1.8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate SEO-optimized draft posts from your own site content and expertise, with verified citations. Runs entirely on your host.

== Description ==

AI Content Engine drafts blog posts for your site using the AI provider **you** connect to WordPress. Everything runs on your own hosting. There is no content pipeline through anyone else's servers, no account to create, and this free version sends no data to the plugin author at all.

It is built around a simple position: automated content is only worth publishing if it is grounded in a real business, cites real sources, and is read by a real person before it goes live. The plugin enforces all three mechanically rather than asking you to promise them.

= How it works =

1. **You fill in a site profile** — what your business does, who it serves, and the firsthand experience only you have. This is injected into every prompt. Generation is disabled until it is complete.
2. **The plugin indexes your existing content** so it knows what you have already covered and can link to it.
3. **Topics are planned** from your own content plus, optionally, subtopics your competitors cover and you do not.
4. **Sources are researched and verified.** Every URL is fetched and confirmed live before it is rendered as a link. A URL the model produced that does not resolve is discarded, not published.
5. **The article is written section by section**, measured against a word target and expanded where it comes up short.
6. **A draft is created.** Never a published post.

= What makes this different =

* **No external backend.** All logic runs in the plugin, on your host.
* **No API key handling.** The plugin uses WordPress's built-in AI client and whatever provider you connect under Settings → Connectors. It never asks for, stores, or transmits a provider key.
* **Real citations.** Search → fetch → verify a live 200 response → only then render the link.
* **Near-duplicate prevention.** Every published post gets a similarity fingerprint. A draft that is too close to existing content is blocked before it is created.
* **Draft by default.** Auto-publish is an explicit, off-by-default opt-in.
* **Human review gate.** On by default: a generated post cannot be published until a person has opened and saved it.
* **Review notifications.** Your site emails you when drafts are waiting — immediately, daily, or weekly. A review gate nobody knows about is not a review gate.
* **Real author attribution.** Drafts are attributed to an actual user account. The plugin does not create expert personas or fake bylines.
* **Keyword suggestions from your own content.** Phrases your site keeps mentioning but has never made the subject of a post, with a warning when an existing post already targets one. Read from the local index — no AI call, no cost.
* **Recovery tools from day one.** Bulk noindex and bulk unpublish for all generated content, in one click.

= Free and paid =

The version on WordPress.org is free and complete for anyone publishing at a steady, careful pace. It generates **one blog post every seven days**, started by hand from the dashboard, and every safeguard, recovery tool, and SEO integration is included. It writes blog posts only — pages need a license.

A paid license — $39 a month or $299 a year, with a 7-day free trial on either — adds:

* More than one article a week
* Pages, not only blog posts
* Unattended scheduling, so drafts arrive without anyone clicking
* Topic planning in batches from your content index
* Competitor topic-gap analysis
* Researched citations, fetched and verified before they are rendered
* Automatic plugin updates

The free version contains no license key field and contacts no server of ours. Nothing you generate is ever locked, watermarked, or removed, and the bulk noindex and unpublish recovery tools stay available whether you hold a license or not — if you ever need to undo what this plugin published, you should not have to pay to do it.

= Please read this before you use it =

Google's spam policies on scaled content abuse apply to your **whole site**, not just to generated pages. Publishing large volumes of unhelpful content can affect how your entire domain is treated in search.

This plugin gives you tools to publish content that is genuinely useful. It cannot judge whether any particular article is. That judgement is yours, and it is why the review gate is on by default and the shipped frequency is two posts per week rather than one a day.

The honest advice: publish fewer, better articles. Read every draft. Add what only you know. If a draft does not deserve to exist, delete it.

= External services =

**AI provider (required).** Generated text and images come from whichever AI provider you have connected to WordPress under Settings → Connectors. Article topics, your site profile, your existing post titles, and verified research extracts are sent to that provider to produce the content. This plugin does not choose the provider, does not store its credentials, and has no relationship with it. Review your chosen provider's terms and privacy policy before use.

**Search provider (optional).** If you enable research and citations, the plugin sends search queries to one search API of your choosing, using an API key you supply and which is stored on your own site. The search query text is derived from your article topic. Choose one of:

* Brave Search API — terms: https://brave.com/search/api/ — privacy: https://brave.com/privacy/browser/
* Serper — terms: https://serper.dev/terms — privacy: https://serper.dev/privacy
* Exa — terms: https://exa.ai/terms-of-service — privacy: https://exa.ai/privacy-policy

If no search provider is configured, no search request is ever made and articles are written without citations.

**Cited pages.** When research is enabled, the plugin fetches the pages returned by your search provider in order to confirm they are live and to read a short extract. These are ordinary public web requests to whatever sites the search returned.

**Competitor pages (optional, off by default).** If you enable competitor analysis and list domains, the plugin requests `robots.txt`, the sitemap, and a limited number of pages from those domains. It honours `robots.txt`. It reads only page titles, headings, word counts, and structured-data types — competitor body text is never stored and never sent to an AI provider.

**License check (paid version only).** The version distributed here on WordPress.org contacts no server belonging to Waypoint Software USA under any configuration — it contains no licensing code at all.

The separately distributed paid version checks its license once a day against waypointsoftwareusa.com, and checks the same host for new releases. Those requests carry the license key, the site address, and the plugin version, and nothing else — no content, no settings, no AI provider credentials. Generation still runs entirely on your host. Payment is handled by Stripe on our store; the plugin itself never sees a card, and no payment data passes through your site.

* Waypoint Software USA — terms: https://waypointsoftwareusa.com/terms.html — privacy: https://waypointsoftwareusa.com/privacy.html
* Stripe (payment processing on our store only) — terms: https://stripe.com/legal/ssa — privacy: https://stripe.com/privacy

= Bundled libraries =

This plugin bundles Action Scheduler (https://actionscheduler.org/), a GPLv3 background-processing
library, to run generation as a chain of small background jobs. Because Action Scheduler is GPLv3,
the combined distributed package is effectively GPLv3. The plugin's own code is licensed
GPL-2.0-or-later, whose "or later" clause makes that combination permitted.

== Installation ==

1. Install and activate AI Content Engine.
2. **Connect an AI provider.** WordPress supplies the AI plumbing but no providers — each one is a separate free plugin. The simplest option is **AI Provider for Google**: one key covers both writing and images, and it has a free tier you can test on without entering card details. Install it, get a key at aistudio.google.com, and paste the key under **Settings → Connectors**.
3. Go to **AI Content → Settings** and complete the site profile. Generation stays disabled until you do.
4. Optionally add a search API key to enable research and citations.
5. Use **Generate one now** on the dashboard to produce your first draft and see what the output looks like before enabling the schedule.

= Choosing a provider =

Any provider WordPress can connect to will work. They differ in what they can produce:

* **AI Provider for Google** — writing and images. Free tier, no card required to start.
* **AI Provider for OpenAI** — writing and images. Billing must be set up first.
* **AI Provider for Anthropic** — writing only. Strong long-form output, but Claude has no image model.

**If you want featured images, pick a provider that generates them.** Anthropic does not — articles will still be written, just without images. You can connect more than one provider at a time: WordPress runs them side by side and this plugin uses whichever supports each job, so pairing Anthropic for writing with Google for images works.

Whatever you choose, the key is entered once in **Settings → Connectors** and belongs to you. This plugin never stores or transmits it, and the provider bills you directly.

**Low-traffic sites:** WordPress only runs scheduled work when someone visits the site. An article is generated as a chain of steps, and those steps continue within a single request wherever there is time for them, so a draft usually finishes in one or two visits rather than waiting on the scheduler for each step. A quiet site can still fall behind, and a real server cron remains the reliable fix. See **Tools → Site Health** — the plugin adds a check that tells you if jobs have stalled, with the exact commands to fix it.

== Frequently Asked Questions ==

= Does this send my content to your servers? =

No. The plugin has no content backend. The only outbound requests are to the AI provider you connected to WordPress, the search API you chose (if you enabled one), and the public pages it verifies as citations.

The paid version adds one more: a daily license check that sends your license key, site address, and plugin version, and nothing else. Your content and settings never leave your host in either version.

= Where do I put my OpenAI/Anthropic/Google API key? =

Not in this plugin. WordPress 7.0 handles AI provider connections itself under Settings → Connectors. This plugin uses whatever is configured there, which means your key is managed by WordPress core, not by us.

= Why does it say image generation is not available? =

Because the provider you connected does not generate images. Anthropic is the common case — Claude writes but has no image model. Articles are still produced, just without a featured image.

Connect a provider that does generate images (Google or OpenAI) and the dashboard will pick it up. You do not have to replace what you already have: WordPress supports several connected providers at once, and this plugin asks for writing and image capability separately.

= Which provider should I choose? =

If you have no preference, **AI Provider for Google** — one key, does both writing and images, and has a free tier you can test on before spending anything. See "Choosing a provider" above for the full comparison.

= Will this get my site penalized? =

That depends on what you publish, not on how it was drafted. Google's guidance is about whether content is helpful, not about how it was produced. Review every draft, add real substance, and publish at a rate you can genuinely stand behind. If something does go wrong, the review queue has one-click bulk noindex and bulk unpublish.

= Can it publish automatically? =

Yes, but it is off by default and it is ignored while the human review gate is on. You have to turn off the gate and turn on auto-publish, deliberately, in two separate settings.

= What happens if a source URL is fake? =

It is dropped. Every candidate URL is fetched before use, and only ones returning a live 200 with readable content are cited. This is checked in code, not requested in a prompt.

= Does it copy competitor content? =

No. The crawler stores page titles, heading labels, word counts, and structured-data types. Body text is measured for a word count and immediately discarded. Nothing from a competitor page is ever sent to an AI provider.

= What happens to my posts if I delete the plugin? =

They stay. Uninstalling removes the plugin's own tables, settings, and scheduled jobs. Generated posts, drafts, and media are left completely untouched.

== Screenshots ==

1. Dashboard with system status, weekly volume, and cost estimates.
2. The site profile, injected into every prompt.
3. Review queue with per-article cost and the bulk recovery tools.

== Changelog ==

= 1.8.0 =
* The free version now generates one blog post every seven days, started by hand, measured over a rolling week.
* The free version writes blog posts only. Pages — and any other post type — need a license. The post type setting is kept as you left it and takes effect the moment a license is active.
* The weekly cap is now enforced on the manual "Generate draft" button and on the run and retry actions in the review queue, not only on scheduled runs. Previously the cap applied to unattended work and could be stepped past by hand.
* Added a paid edition with unattended scheduling, batch topic planning, competitor gap analysis, verified citations, and automatic updates. It is distributed separately; this version contains no licensing code and contacts no server of ours.
* The frequency setting now says what is actually in force rather than only what the field accepts.

= 1.2.1 =
* The search provider dropdown now says what distinguishes each option, so the choice can be made without leaving the page.

= 1.2.0 =
* Added keyword suggestions on the dashboard, drawn from the site's own content index. Ranked by two- and three-word phrases that recur across several posts but that no post is actually about — the coverage gaps, not what you already rank for.
* Suggestions already used as a focus keyword by an existing post are flagged, so you do not accidentally write two articles competing for the same term.
* Database version 2: the content index gains a phrases column. A reindex is queued automatically on upgrade.

= 1.1.0 =
* Added review notification emails: immediate, daily, or weekly, to addresses you choose. Digests are only sent when a new draft has appeared.
* Fixed the dashboard screen rendering its contents twice.
* The "no AI provider connected" notice now links to the provider plugin search, since Settings → Connectors is empty until a provider plugin is installed.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.8.0 =
Introduces free and paid editions. Existing installs keep every setting; sites without a license now produce one blog post a week, and pages need a license. Nothing already generated is changed, and the bulk noindex and unpublish recovery tools remain available to everyone.

= 1.2.1 =
Clarifies the search provider choices in settings. No functional change.

= 1.2.0 =
Adds keyword suggestions from your own content. Includes a database change; the content index is rebuilt automatically in the background after upgrading.

= 1.1.0 =
Adds review notification emails and fixes the dashboard rendering twice. No database changes; your settings carry over.

= 1.0.0 =
Initial release.
