=== AI Snippet SEO Helper ===
Contributors: rankpilotai
Tags: rank math, seo, snippets, meta description, title
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI assistant for Rank Math: generate SEO titles, meta descriptions, focus keywords and optional slugs in one click.

== Description ==
AI Snippet SEO Helper adds AI generation to the Rank Math SEO snippet editor. It creates SEO friendly titles, meta descriptions, focus keywords and optional slugs directly inside the Rank Math meta box with a single click. The plugin works natively with Rank Math and supports scoring, bulk tools and optional auto slug.

**Highlights**
- One-click AI generation in the post editor (Rank Math)
- Live score & SERP-style preview; optional custom prompt
- Optional **Auto-Slug** replacement (WordPress keeps a 301 via `_wp_old_slug`)
- Usage overview card (plan limit, remaining, progress)
- Model selection based on plan (GPT-4 Turbo / GPT-4.1 / GPT-4o)

**Requires Rank Math SEO**

AI Snippet SEO Helper only works when the Rank Math SEO plugin is installed and active.  
This helper writes into Rank Math’s meta fields and relies on Rank Math to render meta tags on the front end.  
It will not generate or output any SEO tags by itself.

**Cloud Service Notice**  
The plugin connects to `https://rankpilotai.com/wp-json/rankpilotai/v1/*` to generate snippets and manage tokens. Minimal context is sent: post title/excerpt/slug, site URL & domain, selected model, and your Site Key. See our website for Privacy & Terms.

== Installation ==
1. Install and activate the **Rank Math SEO** plugin (slug: `seo-by-rank-math`).
2. Upload and activate **AI Snippet SEO Helper**.
3. Go to **AI Snippet SEO Helper → Site Key Management** and paste your Site Key.
4. (Optional) Choose a model, add a custom prompt and enable **Auto Slug**.
5. Open any Rank Math enabled post or page and click **Generate with AI** from the helper panel.

== Frequently Asked Questions ==
= Do I need Rank Math? =
Yes. AI Snippet SEO Helper is built as an integration for the Rank Math SEO plugin and will not work without it.  
It targets Rank Math fields only and relies on Rank Math to output meta tags on the front end.

= Is there a free tier? =
Yes. A limited free tier is available. Higher tiers offer more tokens and additional models.

= Which models are supported? =
Availability depends on your RankPilotAI plan. Typically: **GPT-4 Turbo**, **GPT-4.1**, **GPT-4o**.

= What exactly is sent to the API? =
Only minimal context: post title, excerpt, current slug, site URL/domain, selected model, and your Site Key.

= Will Auto-Slug break existing URLs? =
When enabled, the new slug replaces the old one and WordPress stores the previous slug in `_wp_old_slug`, serving an automatic **301**.

= Does it work with both Classic and Block Editor? =
Yes. The helper supports both editors and refreshes Rank Math’s snippet preview accordingly.

== External services ==

This plugin uses the RankPilotAI cloud API hosted on `rankpilotai.com` for all AI operations.

The following endpoints may be called from your site:

- `https://rankpilotai.com/wp-json/rankpilotai/v1/snippet` and `/snippet-bulk` to generate AI SEO titles and descriptions.
- `https://rankpilotai.com/wp-json/rankpilotai/v1/token-info` to read your current token balance and limits.
- `https://rankpilotai.com/wp-json/rankpilotai/v1/token-reduce` to reduce your token balance after a successful generation.

Each request sends only minimal context, for example:

- Site URL and domain
- Plugin slug (`ai-snippet-seo-helper`)
- Your Site Key
- Selected model and custom prompt (if any)
- For snippet generation: post title, excerpt, post type, current slug and focus keyword

For details, including data handling and retention, please see:

- Privacy Policy: https://rankpilotai.com/privacy-policy/
- Terms of Service: https://rankpilotai.com/terms-and-conditions/

== Screenshots ==
1. Post editor — helper panel
2. Settings — site key, usage overview, model & prompt

== Changelog ==

= 1.0.9 =
* UI: Settings header now displays the official AI Snippet SEO Helper logo.
* Fix: Restored animated GIF plugin icons on WordPress.org listing.

= 1.0.8 =
* UI: Redesigned settings page with modern card-based layout, gradient header, improved navigation and responsive design.
* UI: Modernized admin CSS for metabox, generate button and score badges.
* Tweak: Changed token CTA button label to "Buy Tokens" for clarity.

= 1.0.7 =
* Maintenance: minor version consistency updates and small documentation/copy cleanup. No functional changes.

= 1.0.6 =
* Maintenance: minor version consistency updates and small documentation/copy cleanup. No functional changes.

= 1.0.5 =
* Settings page: token usage normalization + CTA button labels

= 1.0.4 =
* Fix: Adjusted plugin file structure so activation from the Add Plugins screen works without errors.

= 1.0.3 =
* Tweak: Removed the custom “View details” link from the plugin row. WordPress now shows the standard link to the WordPress.org plugin page.
* Tweak: Removed the extra sidebar intro text from the settings UI.

= 1.0.2 =
* Tweak: Added WordPress.org style “View details” link to the Plugins screen.

= 1.0.1 =
* Tweak: Updated plugin banner and wording on the WordPress.org listing.
* Tweak: Small wording improvements inside the admin UI.

= 1.0.0 =
* Initial public release: Rank Math panel integration, token usage overview, Auto-Slug option, model gating by plan, hardened connection & retries.

== Upgrade Notice ==
= 1.0.0 =
First public release.
