=== BlueSoup AI Auto Schema ===
Contributors: modemmike
Tags: schema, json-ld, structured data, seo, rich snippets
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered JSON-LD schema markup for WordPress. Generate, validate, and manage structured data on any page or post.

== Description ==

**BlueSoup AI Auto Schema** makes it easy to add valid JSON-LD structured data to any WordPress page or post — with AI generation, live validation, and a clean visual manager built right into the admin.

Instead of writing schema markup by hand or relying on guesswork, the plugin uses OpenAI to generate accurate, context-aware JSON-LD schemas based on your actual page content and business details.

> **Note:** AI generation requires your own OpenAI API key. Tokens are not included — you pay OpenAI directly. Using gpt-4.1-mini, generating a schema costs a fraction of a cent.

= How it works =

1. Open **BlueSoup AI Auto Schema** from the WordPress admin menu.
2. Select a page or post to manage.
3. Click **+ Add New Schema** and choose a schema type (Article, Organization, FAQ, Product, and more).
4. Click **✨ Generate with AI** to generate a filled-in schema — or write your own JSON-LD.
5. The live validator highlights errors instantly.
6. Save, and the schema is injected as clean `<script type="application/ld+json">` output on that page.

= Free features =

* AI-powered JSON-LD schema generation (bring your own OpenAI key)
* Live validation with instant error feedback
* Per-page schema manager — add, edit, and delete schemas on any page or post
* Supports Article, BlogPosting, Organization, WebSite, BreadcrumbList, FAQPage, HowTo, Product, LocalBusiness, Review, Event, and more
* Business / site information settings (name, address, phone, socials) injected into every AI prompt
* Multiple schemas per page supported
* Clean `<script type="application/ld+json">` output — no theme modifications required

= Pro features (separate download at bluesoup.biz) =

* **Global Schemas** — inject Organization, WebSite, or any schema on every page site-wide
* **✨ Generate All Recommended** — one click generates all suggested schema types for a page automatically
* **URL Targeting** — attach schemas to any URL, including external pages and custom paths
* Multi-site license support
* Priority support

A Pro license is available at [bluesoup.biz](https://bluesoup.biz/ai-auto-schema/).

= Why structured data matters =

Search engines use JSON-LD schema to power rich results — star ratings, FAQs, breadcrumbs, product prices, event dates, and more — directly in search listings. Well-implemented structured data improves click-through rates and helps Google understand your content.

BlueSoup AI Auto Schema removes the technical barrier so any WordPress user can implement correct, validated schema markup without learning the Schema.org specification.

= Requirements =

* An OpenAI API key (for AI generation — validation and manual editing work without one)
* WordPress 5.8+
* PHP 7.4+

== External Services ==

This plugin connects to external services:

**OpenAI API** (api.openai.com)

Used to generate JSON-LD schema markup. Your page label, schema type, and business information from Settings are sent to OpenAI when you click "Generate with AI." This only happens when you explicitly trigger generation. You must provide your own OpenAI API key.

* OpenAI Privacy Policy: https://openai.com/privacy
* OpenAI Terms of Use: https://openai.com/terms

**BlueSoup Promotional Content** (bluesoup.biz/plugin-promos.json)

Used to display information about other BlueSoup plugins on the admin page. A small JSON file is fetched via a GET request and cached for 7 days. No data is sent. This request only occurs within the WordPress admin dashboard and never on the public front end.

* BlueSoup Privacy Policy: https://bluesoup.biz/privacy/

== Installation ==

1. Upload the `bluesoup-ai-auto-schema` folder to `/wp-content/plugins/` or install through the WordPress Plugins screen.
2. Activate the plugin.
3. Open **BlueSoup AI Auto Schema** from the WordPress admin menu.
4. Go to **Settings** and fill in your business information and OpenAI API key.
5. Go to **Schema Manager**, select a page or post, and click **Load Schemas**.
6. Click **+ Add New Schema** to get started.

== Frequently Asked Questions ==

= Do I need an OpenAI account? =

Only for AI generation. You can write and validate JSON-LD manually without an API key. AI generation requires a key from platform.openai.com.

= How much does AI generation cost? =

Most schema generations cost fractions of a cent using gpt-4.1-mini. A single schema typically uses 300–600 tokens.

= Does this affect page performance? =

No. JSON-LD is output in the `<head>` as a static script block. There is no front-end JavaScript and no layout impact.

= Can I add multiple schemas to one page? =

Yes. You can add as many schemas as needed per page — the plugin outputs each one as a separate `<script type="application/ld+json">` block.

= What schema types are supported? =

Article, BlogPosting, NewsArticle, Review, FAQPage, HowTo, Recipe, Product, Offer, Organization, LocalBusiness, Person, WebSite, WebPage, BreadcrumbList, SiteNavigationElement, Event, VideoObject, ImageObject, and more.

= What is the Global Schemas feature? =

Global Schemas (Pro) inject a schema on every page of your site — ideal for Organization and WebSite schemas that apply site-wide rather than to a specific page.

= Where is my data stored? =

Settings and schemas are stored in your WordPress database (wp_options). Content is only sent to OpenAI during AI generation that you manually trigger.

= What happens if I deactivate the plugin? =

Your settings and saved schemas remain in the database unless you uninstall the plugin.

== Screenshots ==

1. Schema Manager — select any page or post and view its attached schemas.
2. AI schema generation — fill in a schema with one click, with live validation and a green "Valid" indicator.
3. Settings — enter your business details and OpenAI API key so the AI always uses your real data.
4. Free vs Pro feature comparison — upgrade for site-wide global schemas and one-click bulk generation.

== Changelog ==

= 2.0.1 =

* Confirmed compatibility with WordPress 7.0

= 2.0.0 =

* Complete rewrite — new plugin name and slug (bluesoup-ai-auto-schema)
* AI-powered JSON-LD generation with OpenAI (bring your own key)
* Live validation with instant error highlighting
* Per-page schema manager with add, edit, and delete
* Business / site information settings injected into AI prompts
* Pro: Global Schemas, Generate All Recommended, URL targeting
* Clean output via wp_head — no theme modifications required
