=== AnchorMind — AI Internal Linking ===
Contributors: saistudios
Tags: internal linking, seo, ai, orphan posts, link building
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 0.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Weaves contextual internal links into your posts using your own AI API key. Finds orphans, suggests anchors, one-click insert with undo.

== Description ==

AnchorMind scans your site, finds orphaned posts (nothing links to them), and asks your own AI model for contextual internal-link suggestions — anchor phrases quoted verbatim from your content, targets chosen from real posts (orphans prioritized).

Every suggestion is human-approved before insertion. Insertion is DOM-safe: it never edits text inside existing links, and every edited post gets a one-click Undo backup.

**Bring your own key (BYOK):**
* OpenAI, OpenRouter, Groq, Together — any OpenAI-compatible endpoint
* LM Studio (`http://localhost:1234/v1`) and Ollama (`http://localhost:11434/v1`) — fully local, zero cost, content never leaves your machine

= The flow =
1. Scan site → link graph + orphans listed (orphans first)
2. "AI: Suggest links" on any post → suggestions with reasons
3. Insert (or Dismiss) each one; Undo restores the pre-AnchorMind version

== Installation ==

1. Upload the `anchormind` folder to `/wp-content/plugins/`
2. Activate the plugin
3. AnchorMind → Settings: paste your API key (or point Base URL at LM Studio/Ollama)
4. AnchorMind → Scan site, then suggest away

== Frequently Asked Questions ==

= What does it cost? =
Whatever your provider charges — typically well under a cent per post analyzed. Local models cost nothing.

= Does it ever edit content without approval? =
No. Every link is inserted only when you click Insert, and every post has a one-level Undo.

== Changelog ==

= 0.2.0 =
* Pro license gate (free tier: 3 links/post; Pro: 10)
* URL resolver slug fallback for sites with stale rewrite rules
* API retry with backoff for transient upstream 5xx

= 0.1.0 =
* First release: scan/graph, orphan detection, BYOK suggestions, DOM-safe insert, undo.
