=== AnswerOptix Fixer ===
Contributors: answeroptix
Tags: seo, ai, audit, metadata, json-ld, robots-txt, llms-txt, ai-visibility
Requires at least: 6.0
Tested up to: 6.7
Stable tag: 1.0.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Apply AnswerOptix AI-visibility audit fixes inside WordPress — meta tags, JSON-LD, robots.txt, llms.txt, and more.

== Description ==

**AnswerOptix Fixer** connects your [AnswerOptix](https://answeroptix.com) audit to WordPress and lets you apply AI-visibility fixes with one click.

When an AI model like ChatGPT, Perplexity, or Google AI Overview looks for answers, your site's technical setup determines whether it gets cited. AnswerOptix audits six key signals and generates fix cards with ready-to-use code. This plugin applies those fixes automatically.

**What it fixes:**

* **Meta descriptions** — Sets or overrides the meta description for better AI comprehension.
* **Canonical tags** — Ensures self-referencing canonicals so AI models attribute the right page.
* **JSON-LD structured data** — Injects Organization/WebPage schema for machine-readable context.
* **robots.txt rules** — Configures OAI-SearchBot and GPTBot access policies.
* **llms.txt** — Serves a virtual `/llms.txt` endpoint that guides LLMs to your key pages.
* **Meta titles** — Overrides the document title for clarity in AI results.

**Compatibility:**

* Works standalone or alongside **Yoast SEO** and **RankMath** — automatically uses their filters when detected.
* API responses are cached (5 min) to keep your admin fast.
* Clean uninstall — all data is removed when you delete the plugin.

== Installation ==

1. Upload the plugin zip via **Plugins → Add New → Upload Plugin**.
2. Activate the plugin.
3. Go to **AnswerOptix** in the admin menu.
4. Paste your audit link (e.g. `https://answeroptix.com/audit/your-token`) or raw UUID.
5. Tick "Allow external access" and save.
6. Review your fix cards and click **Apply fix** on each one.
7. Once all fixes are live, click **Run re-check** to verify your score improved.

== Frequently Asked Questions ==

= Where do I get an audit token? =
Visit [answeroptix.com](https://answeroptix.com), enter your URL, and complete the audit. Your report URL contains the token.

= Does it work with Yoast or RankMath? =
Yes. The plugin detects both and hooks into their filters automatically.

= What happens when I deactivate/delete? =
Deactivation clears cached data. Deleting the plugin removes all stored options.

= How often does it call the AnswerOptix API? =
Responses are cached for 5 minutes. The API is only called when you view the settings page or apply a fix.

== Screenshots ==

1. Settings page with audit token input.
2. Fix cards with one-click apply/remove.
3. Stats overview showing applied vs remaining fixes.

== Changelog ==

= 1.0.1 =
* Synced stable tag with plugin header version.
* No functional changes.

= 1.0.0 =
* Upgraded to stable release.
* Fixed JSON-LD XSS vulnerability (uses JSON_HEX_TAG encoding).
* Added meta_title fix support.
* Added API response caching (5-minute transient).
* Added uninstall.php — clean data removal on delete.
* Added activation/deactivation hooks.
* Added "Settings" link on Plugins page.
* Added stats overview (total/applied/remaining fixes).
* Proper admin CSS file (no more inline styles).
* Full i18n support with text domain `answeroptix`.
* Version constant and plugin directory constants.
* Updated plugin header (license, author URI, PHP requirement).

= 0.1.0 =
* Initial private beta.
