=== ContentAI ===
Contributors: phatfitchy
Tags: ai, content, gutenberg, seo, openai, content-writer
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered content writer integrated directly into the Gutenberg block editor. Generate full articles, rewrite paragraphs, and schedule posts.

== Description ==

ContentAI is a WordPress plugin that brings AI-powered content writing into the Gutenberg block editor.

**Key features:**

* Generate full articles directly from a keyword inside the editor
* Rewrite selected text (rewrite, shorter, longer, simpler) via floating toolbar
* AI image generation with content-aware prompts
* Calendar view with drag-and-drop scheduling
* Free tier with 5 articles + 5 images per month, no signup required for trial
* Pro tier with 50 articles + 30 images per month, plus add-on packs

**How it works:**

The plugin talks to the ContentAI cloud API (or your self-hosted backend). You connect a domain at [ai.fitchy.shop](https://ai.fitchy.shop) and optionally activate a Pro license key from the Settings page.

== Installation ==

1. Upload the plugin zip via Plugins → Add New → Upload Plugin, or copy the folder to `/wp-content/plugins/contentai-plugin/`.
2. Activate the plugin through the Plugins menu in WordPress.
3. Go to Settings → ContentAI → Cài đặt to enter your license key (optional, Free tier works without one).
4. Open any post in the block editor — the ContentAI sidebar appears automatically.

**Self-hosted backend (optional):**

Define a constant in `wp-config.php` to override the default API URL:

`define('CONTENTAI_API_URL_OVERRIDE', 'https://your-backend.example.com/api');`

== Frequently Asked Questions ==

= Do I need an account to try the plugin? =

No. Free tier works without a license key — quota is tracked by domain. Add your domain at [ai.fitchy.shop](https://ai.fitchy.shop) when ready to upgrade.

= Where is the data sent? =

Content generation requests go to the ContentAI backend (`ai.fitchy.shop` by default) which forwards them to OpenRouter / Tavily. No content is stored permanently on the ContentAI backend beyond logging metadata.

= How is quota tracked? =

By domain (`home_url()`) and month. Backend is the source of truth — the plugin only displays cached counts.

= Can I use this offline? =

No. The plugin requires internet access to reach the AI backend.

= How do I uninstall cleanly? =

Click "Delete" on the plugin row. The plugin runs `uninstall.php` to remove all `contentai_*` options from the database.

== Third-Party Services ==

This plugin connects to the **ContentAI cloud API** to generate content and images. Data is transmitted when a user requests content generation, text rewriting, image generation, or license verification.

* **ContentAI API** — `https://contentai.vn` — [Privacy Policy](https://contentai.vn/privacy)
* **OpenRouter** — routes AI requests to models such as Google Gemini and OpenAI GPT. Used by the ContentAI backend, not called directly by this plugin. [Terms](https://openrouter.ai/terms) · [Privacy](https://openrouter.ai/privacy)
* **Tavily** — optional web search used during content research. Used by the ContentAI backend only. [Privacy](https://tavily.com/privacy)
* **Stripe** — payment processing for Pro license purchases, handled entirely via the ContentAI website. The plugin itself does not send payment data. [Privacy](https://stripe.com/privacy)

No content is stored permanently on the ContentAI backend beyond request metadata and usage counts.

== Screenshots ==

1. Block editor sidebar — generate a full article from a keyword.
2. Floating rewrite toolbar — rewrite selected text without leaving the editor.
3. Calendar view — drag drafts onto a date to schedule.
4. AI image generation — content-aware prompts.

== Changelog ==

= 1.0.0 =
* Initial release.
* Gutenberg sidebar with full article generation, streaming output.
* Floating rewrite toolbar (rewrite / shorter / longer / simpler).
* Calendar with drag-and-drop scheduling.
* AI image generation with content-aware prompts.
* Free tier (5 articles + 5 images/month) and Pro license activation.

== Upgrade Notice ==

= 1.0.0 =
First public release.
