=== AI Content Generator Lite ===
Contributors: globalwebagency
Tags: ai, openai, content generator, seo, ai writer
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 8.0
Stable tag: 2.0.11
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate SEO articles with OpenAI directly inside WordPress. Free plan: 10 articles/month, drafts only. Same UI as the Pro — Pro-only features are visible but disabled.

== Description ==

**AI Content Generator Lite** is the free edition of AI Content Generator. It plugs straight into your WordPress admin and turns a brief (topic, audience, tone) into a polished, ready-to-edit SEO article draft, in your language and tone.

The Lite ships the **exact same UI** as the Pro plugin so you can see every feature available in the full version. Pro-only fields, metaboxes and actions are visibly present but disabled, with a clear "Upgrade to Pro" call-to-action on each one.

= Lite plan =

* 10 article generations per month (resets on the 1st of every month)
* 1 active campaign at a time
* OpenAI provider (gpt-4o-mini)
* Output saved as Draft (Post type)
* Up to 800 words per article
* Featured image from your Media Library (random selection)
* Italian + English UI

= Pro features (visible but disabled in Lite) =

* Unlimited generations
* Multi-provider: OpenAI + Anthropic Claude + Google Gemini
* OpenAI advanced knobs (temperature, frequency / presence penalty, custom API base URL)
* AI-generated featured images (gpt-image-1)
* Inline AI images per H2 section
* Long-form articles up to 8,000+ words with AI outline
* Live News Mode (RSS + NewsAPI + Tavily + Google News)
* Automatic publishing scheduler (N articles/day, active hours, weekdays)
* Social post auto-generation (X / Instagram / LinkedIn)
* Automatic internal interlinking + SEO meta auto-generation
* Analytics dashboard with API costs (KPI cards, charts, per-provider breakdown)
* Editorial Calendar with month view, list view, bulk actions, drag &amp; drop reschedule
* Bulk AI tag / category suggestions on existing posts
* Import / export titles from CSV / Excel
* Bulk actions on campaigns (pause, resume, duplicate, delete)
* License &amp; priority support

= Upgrade-in-place =

The Lite shares the same campaign CPT, the same settings option and the same meta keys with the Pro. When you install the Pro, the Lite auto-deactivates and all your campaigns, settings and content stay intact — no migration needed.

= OpenAI disclosure =

AI Content Generator Lite uses your own OpenAI API key to generate text via the OpenAI API. By providing your key in the Settings page you authorise the plugin to send prompts (topic, audience, tone, brief) to OpenAI on your behalf. No data is sent anywhere else. You can obtain a key at https://platform.openai.com/api-keys.

OpenAI's privacy policy: https://openai.com/policies/privacy-policy
OpenAI's terms of use: https://openai.com/policies/terms-of-use

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/ai-content-generator-lite/` or install through the Plugins screen directly.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to "AI Content Generator" → "Settings" and paste your OpenAI API key.
4. Create your first campaign from "AI Content Generator" → "Campaigns".

== Frequently Asked Questions ==

= Why are some fields and metaboxes visibly disabled? =

The Lite intentionally ships the same UI as the Pro plugin. Pro-only controls are present but disabled so you can see exactly what you would unlock by upgrading. Backend enforcement makes sure none of the Pro-only features run on the Lite plan.

= Does the Lite share data with the Pro? =

Yes. They share the CPT (`as_snella_campaign`), the settings option (`as_snella_settings`), all `_as_*` post meta keys and the `{prefix}as_snella_logs` table. When you install the Pro, the Lite self-deactivates and your data continues to be used by the Pro.

= Can I run the Lite and the Pro at the same time? =

No. The Lite has an activation guard + a runtime guard that prevents the two from being active simultaneously. If the Pro is active the Lite self-disables silently.

= What happens when I reach the 10-article monthly quota? =

The Generate button is gated. You can keep creating campaigns and titles but article generation pauses until the next calendar month or until you upgrade to Pro.

= Where is my OpenAI API key stored? =

In your WordPress database under the `as_snella_settings` option. It is never sent anywhere except to OpenAI's API.

== Screenshots ==

1. Dashboard with quota strip and quick actions.
2. Campaign editor showing every Pro metabox visibly available, with Pro-only fields disabled.
3. Settings page with OpenAI section active and Pro multi-provider section disabled.
4. Premium page with the full Lite vs Pro comparison table.
5. Log monitor with INFO / WARN / ERROR levels.

== Changelog ==

= 2.0.3 =
* **Critical lock-bubble fix**: in 2.0.2 the `as_bt[tone_custom]` field was a direct child of `.inside`, causing the JS fallback to lock the ENTIRE Brief SEO Titoli metabox (so users could not edit topic / audience / language / intent / titles_qty). The lock logic now refuses to lock any `.inside` / `.postbox` container and wraps stray fields in a tiny inline span instead.

= 2.0.2 =
* **Critical UI fix**: rewrote the Pro-only lock whitelist with the REAL field names from the Pro engine (the previous list was using guessed names and matched almost nothing). Every Pro-only field across the campaign editor and the Settings page now shows the visible PRO ribbon + locked overlay.
* Campaign editor — newly locked: full scheduler block (10 fields: articles_per_day, time_start/end, gap, active_days, distribution, fixed_times, jitter, blackout_dates, catch_up), author rotation (sequential/random), generation interval, auto-SEO override, end-of-campaign notifications, all title presets (tone_preset, tone_custom, lang_mode, title_length, antidup), CSV import/export titles, AI featured image branch (5 fields), inline images branch (12 fields), content/tone/structure/format preset blocks (32 fields), auto-interlink + manual internal links.
* Settings page — newly locked: API Base URL, Temperature, Frequency Penalty, Presence Penalty, Translation model, Claude API key + model, Gemini API key + model, default provider radios, NewsAPI/Tavily keys, auto-links global toggle, auto-SEO global toggle, the entire Social Media Auto-Post block (Twitter/IG/LinkedIn channels, tone, hashtags, save button).
* Provider selectors: Claude / Gemini options are now disabled in both the campaign provider override AND in the Settings default provider radios.
* Featured-image source radio: the "IA" option is now disabled (only "Media Library" usable in Lite).

= 2.0.1 =
* Hidden the Pro "Limited mode: activate license" admin banner in Lite (the License page is intentionally hidden in Lite, so the banner had no working target).
* Featured-image metabox is now correctly partial in Lite: the "Media Library (random)" section is fully usable; only the Pro-only AI featured image generation and inline images sub-sections are locked.
* Quota strip is now visible also on the campaign editor screens (new + edit + list), not only on the plugin top-level pages.

= 2.0.0 =
* **Architecture rebuild**: the Lite is now a thin Lite-mode layer on top of the Pro engine instead of a separate reimplementation. The UI is now identical to the Pro at every screen, metabox, column and field — Pro-only controls are visibly present but disabled with a clear Upgrade CTA.
* Every Pro metabox is now available (Provider IA, Brief SEO Titoli, Brief SEO Contenuti, Featured image, News Mode, Generation &amp; controls, Article log, Error log, Extra AI instructions).
* Every Pro field is now available in the Base data section (Tag, Generation interval, Auto SEO meta, End-of-campaign notifications, Author rotation) — disabled where Pro-only.
* Campaign list now shows the full Pro layout (status, pause, articles generated/missing, last edit, bulk actions) — bulk actions are visibly disabled.
* Lite-side backend guards still enforce: 5 generations/month, OpenAI gpt-4o-mini only, output forced to Draft Post, 800-word cap, 1 active campaign warning, Pro AJAX endpoints blocked, Pro cron events unscheduled.
* Upgrade-in-place to the Pro is now a true no-op: the Lite is literally running the Pro engine.

= 1.0.1 =
* Realigned the "Pro feature" preview on the Diagnostics page so it accurately reflects what the Pro plugin actually ships.
* Realigned the "Pro feature" preview on the Analytics page (KPI cards, costs over time chart, per-provider distribution, per-campaign breakdown, monthly history).
* Improved casing consi