=== Kennedy AI Prompt Vault ===
Contributors: anthonyacosta
Donate link: https://buymeacoffee.com/theamericanczar
Tags: ai, prompts, chatgpt, claude, productivity
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 4.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Save and reuse your best AI prompts inside WordPress. Dashboard widget + shortcode. Pro unlocks search, sort, favorites, and JSON export.

== Description ==

**Kennedy AI Prompt Vault** is your personal AI prompt library inside WordPress — perfect for prompt engineers, content creators, developers, and anyone who uses ChatGPT, Claude, Grok, Midjourney, or similar tools regularly.

**Free Features (no limits, no restrictions):**

* Unlimited prompt storage — no cap
* Dashboard widget — add, edit, delete prompts via AJAX with no page reloads
* Inline edit — click ✏️ Edit to pre-fill the form; no retyping
* Image attachment — attach a screenshot or reference image from the Media Library
* Copy-to-clipboard — one click to copy any prompt
* Front-end shortcode `[kennedy_ai_prompt_vault]` — responsive card grid
* Theme-aware styling — inherits your active theme's colors and fonts (including Divi)

**Pro Features (license required):**

* Search prompts by title, text, or category
* Sort by newest / oldest / A–Z / favorites first
* Favorite / pin your most-used prompts
* Visibility controls — set each prompt to Public, Members Only, or Admin Only
* JSON Export — download your entire library as a portable file
* JSON Import — restore or merge from an export
* Category filter shortcode: `[kennedy_ai_prompt_vault category="seo"]`
* Priority support

[Purchase Pro at kennedymedia.com](https://kennedymedia.com/aipromptvault/)

== External Services ==

This plugin connects to **kennedymedia.com** to validate Pro license keys.

* **When:** Only when a Pro license key is activated, deactivated, or revalidated (daily cron, Pro users only)
* **What is sent:** License key, site URL, plugin slug. No personal user data is transmitted.
* **Why:** To verify the license is valid and not in use on more sites than permitted.
* **Privacy policy:** https://kennedymedia.com/privacy-2/
* **Terms of service:** https://kennedymedia.com/terms/

If the license server is unreachable, the plugin enters a grace period and retains the current license status for up to 6 hours.

== Installation ==

1. Upload the `kennedy-ai-prompt-vault` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu
3. The **🔒 Kennedy AI Prompt Vault** widget appears on your dashboard immediately
4. To activate Pro: **Settings → Kennedy AI Prompt Vault** → enter your license key

No configuration required for the free version.

== Frequently Asked Questions ==

= Is there a limit on the free plan? =

No. The free plan supports unlimited prompts with no artificial cap. All core features are fully functional.

= What do I get with Pro? =

Pro adds: search & filter, sort options, favorites, per-prompt visibility controls (public/members/admin), JSON export/import, and the category shortcode filter attribute.

= How do I get a Pro license? =

Purchase at [kennedymedia.com/aipromptvault](https://kennedymedia.com/aipromptvault/). You will receive a license key by email. Enter it under **Settings → Kennedy AI Prompt Vault**.

= Can I use my license on multiple sites? =

Each license covers one site. Deactivate it under Settings to move it to another site — no re-purchase needed.

= Does it work with Divi? =

Yes. The front-end shortcode uses Divi CSS custom properties (`--et_primary`, `--et_body_font_family`) so cards automatically match your Divi color scheme and fonts.

= Where is my data stored? =

All prompts are stored locally in `wp_options` as a serialized array. No prompt data is ever sent to external servers.

= What AI tools does it work with? =

It's AI-agnostic — the plugin stores and copies text. Use your prompts with ChatGPT, Claude, Grok, Gemini, Midjourney, DALL·E, or any other tool.

= How do I display prompts on the front end? =

Use `[kennedy_ai_prompt_vault]` on any page or post.

Available attributes:

**Free:**
* `limit="10"` — show only the first 10 prompts (0 = no limit)
* `cols="2"` — number of columns: 1, 2, 3 (default), or 4
* `show_images="false"` — hide attached images

**Pro:**
* `category="seo"` — filter by category
* `sort="alpha"` — sort order: newest (default), oldest, alpha, favorites
* `favorites_only="true"` — show only favorited prompts
* `ids="1234,5678"` — show specific prompts by ID

= What are the variable placeholders? =

If your prompt contains `[TOPIC]`, `{keyword}`, or `{{product}}` style placeholders, the Copy button automatically becomes a **✏️ Fill & Copy** button. Clicking it opens a clean form where you fill in each variable — the completed prompt is then copied to your clipboard. No more manual find-and-replace.

== Screenshots ==

1. Dashboard widget — add/edit form, saved prompts list with collapse toggle
2. Dashboard widget (Pro) — search bar, sort dropdown, visibility badges, favorites, export/import
3. Settings page — license activation, feature comparison table
4. Front-end shortcode — responsive card grid with theme-matched colors and copy button

== Changelog ==

= 4.1.0 =
* NEW: Variable/placeholder fill modal — prompts containing [TOPIC], {keyword}, or {{product}} patterns now show a ✏️ Fill & Copy button instead of plain Copy. A modal lets users fill in each variable and copies the completed prompt.
* NEW: Shortcode `limit=""` attribute (free) — show only N prompts
* NEW: Shortcode `cols=""` attribute (free) — control column count 1–4
* NEW: Shortcode `show_images="false"` attribute (free) — hide card images
* NEW: Shortcode `favorites_only="true"` attribute (Pro) — show only favorited prompts
* NEW: Shortcode `ids="1234,5678"` attribute (Pro) — show specific prompts by ID
* IMPROVED: Grid column count now uses fixed `repeat(N, minmax(...))` instead of auto-fit for predictable layouts when cols is specified

= 4.0.0 =
* MAJOR: Restructured as genuine free/Pro split — free plan now has NO prompt limit and NO locked features
* Free: unlimited prompts, full CRUD, images, copy, shortcode, theme styling
* Pro: search, sort, favorites, visibility controls, JSON export/import, category shortcode filter
* NEW: All functions, classes, hooks, and option keys prefixed with `kennedy_apv_` / `KAPV_`
* NEW: External service disclosure in plugin header, readme, and settings page
* NEW: Same-server loopback bypass — direct function call when license server is co-located
* NEW: License server updated to handle `kennedy-ai-prompt-vault` slug with backwards compat for `ai-prompt-vault`
* IMPROVED: Settings page shows external service notice inline near license form
* IMPROVED: Shortcode renamed to `[kennedy_ai_prompt_vault]` to match plugin slug
* FIXED: Collapse toggle works correctly (lazy jQuery selector lookup)
* FIXED: Slug mismatch between plugin and license server resolved

= 3.1.0 =
* Renamed to Kennedy AI Prompt Vault, slug kennedy-ai-prompt-vault
* Plugin Check compliance fixes — text domain, escaping, unslash

= 3.0.0 =
* Pro licensing system, search, sort, favorites, JSON import/export

= 2.0 =
* Inline editing, visibility controls, image attachments, copy-to-clipboard

= 1.0 =
* Initial release

== Upgrade Notice ==

= 4.0.0 =
Major restructure. Free plan prompt limit removed entirely. All features are fully functional on free. Pro adds search, sort, favorites, visibility, and import/export. Existing prompts migrate automatically — no data loss.

== Additional Information ==

- Plugin URI: https://kennedymedia.com/aipromptvault/
- Author: Anthony Acosta — Kennedy Media Group, McAllen TX
- Author URI: https://anthonyacosta.me
- Support: anthony@kennedymedia.com
