=== AI Content Bridge ===
Contributors: aicontentbridge
Tags: ai, content generator, ai writer, seo, copywriting
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate publish-ready content — articles, SEO metadata and images — for WordPress, WooCommerce, your LMS and more. No AI API keys required.

== Description ==

AI Content Bridge generates complete, publish-ready content from a short brief — a full article or page, SEO metadata, an optional featured image and relevant video embeds — and publishes it to your site. You don't need any AI API keys of your own: generation runs on the AI Content Bridge service.

It includes 24 purpose-built content types across marketing, commerce, business and learning & development, a built-in SEO score on every piece, an editable, search-grounded outline step for keyword-led pages, and reusable writing-style profiles so your content stays on-brand.

It works with the plugins you already run: Yoast, Rank Math and SEOPress for SEO metadata; WooCommerce for products; LearnPress and LifterLMS for lessons and courses — including knowledge-check quizzes built and linked automatically, so a training module ships ready to test; MailPoet and Newsletter for email; and The Events Calendar for events. Each is detected automatically — there's nothing to connect.

A free plan is available, with paid plans unlocking more content types, features and credits.

== External services ==

This plugin relies on the AI Content Bridge service to generate content, and that service uses several third-party APIs to do so. When you generate a piece of content, the plugin sends data from your site to the AI Content Bridge service, which then calls the providers below as needed. No content is generated, and no data is sent, unless you start a generation (or the plugin validates your licence key).

**AI Content Bridge service** (the service this plugin connects to)
Used to validate your licence, manage your credits, and orchestrate generation. Data sent: your licence key, your site's domain, and the inputs you provide for a piece of content (such as the title, keyword and brief fields). Sent whenever you generate content or your licence is validated.
Terms: https://aicontentbridge.com/terms — Privacy: https://aicontentbridge.com/privacy

**Anthropic (Claude API)**
Used by the service to generate the article text and SEO metadata. Data sent: the prompt built from your content inputs. Sent on every generation.
Terms: https://www.anthropic.com/legal/commercial-terms — Privacy: https://www.anthropic.com/legal/privacy

**OpenAI API**
Used by the service to generate a featured image. Data sent: an image prompt derived from your title and chosen style. Sent only when you choose to include an image.
Terms: https://openai.com/policies/terms-of-use — Privacy: https://openai.com/policies/privacy-policy

**Serper.dev**
Used by the service to fetch search-results data so keyword-led content can be grounded in what currently ranks. Data sent: your primary keyword. Sent only for keyword-led content types when search grounding is enabled.
Terms: https://serper.dev/terms — Privacy: https://serper.dev/privacy

**YouTube Data API (Google)**
Used by the service to find relevant videos to embed in your content. Data sent: a search query derived from your topic. Sent only when you choose to include video embeds.
YouTube API Services Terms: https://developers.google.com/youtube/terms/api-services-terms-of-service — Google Privacy: https://policies.google.com/privacy

== Installation ==

1. Upload the plugin to your site and activate it, or install it from the WordPress plugin directory.
2. Go to the AI Content Bridge settings in your WordPress admin.
3. Enter your licence key and save. Your licence locks to this site's domain on first use.
4. Open AI Content Bridge, choose a content type, fill in the brief, and generate.

Pretty permalinks must be enabled and your site's REST API reachable so generated content can be published back to your site.

== Frequently Asked Questions ==

= Do I need my own AI API keys? =
No. Generation runs on the AI Content Bridge service; you don't supply or pay for any AI provider keys.

= Is there a free version? =
Yes. The free plan includes the Blog Post type with an AI image and SEO metadata. Paid plans add more content types, features and credits.

= What happens if a generation fails? =
Credits are deducted just before generation and refunded automatically if it fails, so a failed run doesn't cost you credits.

= Why didn't my content publish? =
The most common cause is the WordPress REST API being blocked by a security plugin, or pretty permalinks being disabled. See the documentation's Troubleshooting page.

= Is my licence tied to one site? =
A licence locks to the first domain it's used on. To move it to another site, contact support.

== Screenshots ==

1. Plan, generate and publish your entire content pipeline — without leaving WordPress.
2. The AI Content Strategist researches your topic and drafts a month of briefs in minutes.
3. Every article is planned against the live search results before a word is written.
4. Brief it your way — 24 content types, from blog posts to product descriptions.
5. Match any brand voice with reusable writing styles.
6. Drafts land straight in the WordPress editor — formatted, with a featured image.
7. A clear SEO score and actionable report on every finished piece.
8. ACB detects the plugins you already run — MailPoet, WooCommerce, LMS and more — and adapts.
9. Schedule a whole month of content at a glance.
10. Track what you've produced and published from one dashboard.
11. Built for LMS too — generate quizzes, lessons and course content.

== Development ==

**Source code.** The admin interface is a React application. The compiled bundle at `build/index.js` is generated from the human-readable source shipped in this plugin's `/src` directory. To rebuild it:

1. `npm ci`
2. `npm run build` (uses `@wordpress/scripts`)

The output is written to `/build`. `src/index.js` is the entry point; every admin component lives under `src/components/`.

**Bundled libraries.**

* Parsedown 1.7.x — Markdown parser by Emanuil Rusev, https://github.com/erusev/parsedown (MIT licence, header preserved in `Parsedown.php`). The bundled copy is renamed `AICOBR_Parsedown` to avoid conflicts with other copies of the library.
* Fraunces, DM Sans, DM Mono, Syne and Instrument Serif fonts — self-hosted in `/fonts`, each licensed under the SIL Open Font License 1.1 (licence texts in `/fonts/OFL-*.txt`). No fonts are loaded from third-party servers.

== Changelog ==

= 2.8.1 =
* New: ACF field targeting now works for standard posts and pages as well as custom post types.
* Changed: every feature implemented locally in the plugin is now available on all plans with no tier conditions — plan tiers apply only to the external generation service. This includes the ACF field selector, the YouTube embed option and Writing Style Profiles.
* Changed: removed the attribution line previously appended to free-plan content.
* Changed: all fonts (admin and front-end) are now self-hosted inside the plugin — no requests to Google Fonts.
* Changed: options, classes, functions, script handles and post meta now use the distinct `aicobr_` prefix; existing data is migrated automatically and legacy option values are retained for one release as a rollback safety net.
* Changed: the REST namespace is now `aicobr/v1`; the previous `ai-content/v1` namespace remains registered as a working alias for the transition.
* Hardened: REST routes that modify the Content Diary or spend credits now require the `manage_options` capability by default (filterable via `aicobr_rest_capability`).
* Changed: the bundled Parsedown library is renamed `AICOBR_Parsedown` so it can never conflict with another plugin's or theme's copy.
* Removed: unnecessary WordPress core admin includes.

= 2.8.0 =
* Hardened: your content records — SEO reports, featured images and newsletter drafts — are now protected against a rare save-timing issue that could briefly blank them immediately after generation. New server-written fields are protected automatically going forward.

= 2.7.0 =
* New: AI Content Strategist — turn your business context and target keywords into a reviewable, dated multi-month content plan that populates your Content Diary as scheduled drafts.
* New: Content Diary grid view and a sort dropdown (recent activity, date added, scheduled date, status, title).
* Improved: per-content-type length profiles for more natural, better-fitting article lengths.
* Improved: large content libraries stay fast — Content Diary entries now load as you scroll, in both list and grid.
* Improved: the credit balance now refreshes instantly after each generation, with much lighter background usage.
* Fixed: featured-image generation tuned for quality and cost (gpt-image-1.5).
* Hardened: generation pipeline resilience so a single failed job can never interrupt others.

= 2.6 =
* New: SEO Intelligence — a built-in SEO score on every generation and an editable, search-grounded outline review for keyword-led content types.


== Upgrade Notice ==

= 2.8.1 =
All locally implemented features are now available on every plan; fonts are self-hosted; internal identifiers move to the aicobr_ prefix with automatic data migration. Recommended for all users.

= 2.8.0 =
A reliability fix that protects freshly generated SEO reports, images and newsletter drafts from a rare save-timing glitch. Recommended for all users.

= 2.7.0 =
Adds the AI Content Strategist, Content Diary grid view and sorting, and much smoother handling of large content libraries. Recommended for all users.

= 2.6 =
Adds the SEO score and the search-grounded outline review. Recommended for all users.
