=== LandForge Page Creator ===
Contributors: jimsere
Tags: landing page, ai, woocommerce, seo, generator
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate high-converting SEO landing pages for WordPress & WooCommerce in minutes, using the AI provider you've already connected in WordPress.

== Description ==

LandForge Page Creator takes a keyword (e.g. "women's summer sandals") and, optionally, a WooCommerce category, and generates a complete landing page: hero title & subtitle, benefits, FAQ, call-to-action, and SEO meta title/description — ready to review as a draft before it ever goes live.

**Key features**

* Uses the WordPress core AI Client (WordPress 7.0+) to generate content through whichever AI provider you've connected under Settings → Connectors (OpenAI, Anthropic, or Google). This plugin never handles or stores API keys itself.
* Demand detection: automatically finds which WooCommerce category is selling best over the last 30 days (falls back to product count on stores with no sales yet) and suggests a landing page for it.
* Two selectable page structures — Commercial (products first, short benefit chips) and Editorial (fuller intro text, benefit sections, FAQ) — with a live wireframe preview before you generate.
* Real product data included in the prompt (names, price range) so copy isn't generic boilerplate.
* Customizable brand color (gradient) for the generated pages, so the output matches your store instead of a fixed template look.
* Pages are built with standard Gutenberg blocks, so they stay fully editable after creation — no proprietary page-builder lock-in.
* Automatic SEO meta title/description, plus integration with Yoast SEO and Rank Math if either is active.
* Pages are created as drafts by default (configurable), so you always review before publishing.

**Requirements**

* WordPress 7.0 or newer, with an AI provider connected under Settings → Connectors (OpenAI, Anthropic, or Google — each available as a separate, official provider plugin).
* WooCommerce is optional but recommended — without it you can still generate a landing page from a keyword alone, but category demand detection and automatic product placement are unavailable.

== External services ==

This plugin generates page copy using an AI text-generation model, via the WordPress core AI Client (`wp_ai_client_prompt()`, WordPress 7.0+). The actual AI provider (OpenAI, Anthropic, or Google) is chosen and connected by the site administrator under Settings → Connectors — this plugin does not select a provider, and never sees, stores, or transmits any API key itself; all credentials and provider communication are handled entirely by WordPress core and the installed provider plugin.

**When data is sent:** only when you, an administrator, click "Forge the content" on the LandForge → New Landing Page screen. Nothing is sent automatically, in the background, on a schedule, or to any visitor-facing part of the site.

**What data is sent:** the keyword/description you type, the name of the WooCommerce product category you select (if any), the names of up to 8 products from that category, and that category's price range. No customer, order, visitor, or other personal data is ever transmitted.

**Providers (only the one connected under Settings → Connectors is contacted):**

* **OpenAI** — [Terms of Use](https://openai.com/policies/services-agreement/), [Privacy Policy](https://openai.com/policies/row-privacy-policy/)
* **Anthropic (Claude)** — [Terms & Privacy](https://www.anthropic.com/legal)
* **Google (Gemini)** — [API Terms of Service](https://ai.google.dev/gemini-api/terms), [Privacy Policy](https://policies.google.com/privacy)

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install the .zip via Plugins → Add New → Upload Plugin.
2. Activate "LandForge Page Creator" from the Plugins screen.
3. Go to Settings → Connectors and connect an AI provider (OpenAI, Anthropic, or Google).
4. Go to LandForge → Settings to set optional defaults (language, tone, post status, brand color).
5. Go to LandForge → New Landing Page:
   * Type what you want and/or choose a WooCommerce category.
   * Choose a display template and click "Forge the content" to preview it.
   * Click "Create page" to turn the preview into a real WordPress page (draft by default).

== Frequently Asked Questions ==

= Do I need my own API key? =

You need an AI provider connected under Settings → Connectors (WordPress 7.0+ core feature) — OpenAI, Anthropic, or Google. This plugin itself never handles API keys; WordPress core does. See "External services" above for exactly what gets sent and when.

= Do I need WooCommerce? =

No, but it unlocks more of the plugin: automatic category demand detection, real product names/prices in the generated copy, and a product grid on the page. Without WooCommerce you can still generate a landing page from a plain keyword.

= Where is my API key stored? =

This plugin doesn't store one at all. AI provider credentials are managed entirely by WordPress core's Connectors system (Settings → Connectors).

= Are pages published automatically? =

No. By default new pages are created as drafts so you can review and edit them before publishing. You can change this in LandForge → Settings.

= Can I edit the generated page afterwards? =

Yes — pages are built with standard Gutenberg blocks, so you can edit them like any other WordPress page.

== Screenshots ==

1. Dashboard — demand-by-category heat meter and quick actions.
2. New Landing Page — keyword/category form with live template structure preview.
3. Generated landing page example (Commercial template).

== Changelog ==

= 1.0.0 =
* Initial release: AI-assisted landing page generator using the WordPress core AI Client, WooCommerce category demand detection, two selectable page templates (Commercial, Editorial), customizable brand color, SEO meta output with Yoast SEO / Rank Math integration.
