=== Triomize – SEO, AEO & GEO Content Optimization ===
Contributors: madfolks
Tags: seo, aeo, geo, search-optimization, answer-engines
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 6.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Score every page for SEO, AEO and GEO — three independent 100-point readiness checklists for the AI search era, right inside your editor.

== Description ==

As AI answer engines like ChatGPT Search, Perplexity, and Google AI Overviews change how people find information, on-page SEO alone no longer tells the whole story. Triomize scores your content across three separate disciplines and shows the results in a single analysis panel below the editor, in both the Block (Gutenberg) and Classic editors:

1. **SEO (Search Engine Optimization)**: Technical and on-page signals that help search engines index and rank a page.
2. **AEO (Answer Engine Optimization)**: Formatting and structure that make a page easier for answer engines to quote directly.
3. **GEO (Generative Engine Optimization)**: Credibility and trust signals that large language models tend to look for.

Each score is a **readiness indicator** — a set of leading signals you control. They are not a promise of rankings, traffic, or AI citations, and Triomize does not attempt to manipulate any search engine. Think of the scores as a thorough, plain-language checklist for publishing content that is well structured for both traditional and AI search.

**What you get for free:**

* Per-post SEO / AEO / GEO scoring with the full checklist for each.
* Clear "how to fix" guidance on every check that isn't passing.
* A snippet editor with SEO title, meta description, and slug, including a SERP-style preview and character counters.
* Schema **detection** — Triomize tells you which structured-data types are missing.
* A robots.txt check for common AI crawlers.
* Intent declaration boxes for answer-engine questions and generative-engine prompts, which feed into your AEO/GEO scores.
* A site-wide dashboard, a posts audit, and per-engine summary screens.

The free plugin runs on your own server and contacts no third-party service by default. It does not track you or phone home.

== TriIntent (coming soon) ==

A future premium layer called **TriIntent** is planned to add site-wide topical-coherence analysis and measured outcomes (for example, whether AI engines actually cite you over time). **TriIntent is not available in this version.** It is described on the in-plugin "TriIntent" page purely as a roadmap — nothing is sold, nothing is locked, and no feature next to your editor checks requires payment.

== External services ==

Triomize works entirely on your own server by default. One optional feature contacts a third-party service, and only when you turn it on or click a manual button:

**IndexNow** (https://www.indexnow.org/)

* **What it is:** an open protocol for telling participating search engines (such as Bing, Yandex, Seznam, and Yep) that a URL has changed.
* **When data is sent:** never automatically by default. It is sent only if you enable "Auto-submit on publish" in Triomize → Settings, or if you click a manual "Submit" button on the Search Indexing screen.
* **What is sent:** the public URL of the post or page, your site host, and an auto-generated IndexNow key. No personal data, post content, or visitor data is sent.
* **Where it is sent:** the IndexNow API endpoint at https://api.indexnow.org/indexnow.
* **Terms & privacy:** https://www.indexnow.org/faq and https://www.bing.com/webmasters/help/microsoft-bing-and-indexnow-37c5e1d6

No other external services are used.

== Privacy ==

Triomize stores its scores and settings in your WordPress database (post meta and options) and does not send analytics, telemetry, or personal data anywhere. To report status it may make a local loopback request to your own site (for example, to check whether your robots.txt or llms.txt is reachable); that request stays on your own host. The only request to a third party is the optional IndexNow submission described above, which is off by default and contains no personal data.

== Installation ==

1. Upload the `triomize` folder to `/wp-content/plugins/`, or install the ZIP via Plugins → Add New → Upload Plugin.
2. Activate Triomize through the 'Plugins' menu.
3. Complete the short onboarding wizard to set your brand name and website URL.
4. Edit any post or page to see the SEO / AEO / GEO analysis panel below the editor.

== Frequently Asked Questions ==

= Does it make external API calls? =
By default, no — the plugin runs entirely on your server. The one exception is IndexNow, which is **off by default**. If you enable auto-submit (or click a manual submit button), Triomize sends the changed URL and your IndexNow key to https://api.indexnow.org. No personal data is sent. See the "External services" section for full details.

= Does Triomize guarantee rankings, traffic, or AI citations? =
No. The scores are readiness checklists for content you control. They cannot guarantee how Google or any AI engine will rank, crawl, or cite your site, and the plugin does not try to manipulate search results.

= Does it conflict with Yoast SEO or RankMath? =
No. Triomize detects Yoast or RankMath and avoids injecting duplicate Organization schema, while keeping its own Speakable and FAQ schema. When you edit the SEO title or meta description in Triomize, it keeps the matching Yoast/RankMath fields in sync.

= Is it free? =
Yes. All scoring, checklists, fix guidance, the snippet editor, and the dashboards are free and fully functional. The TriIntent premium layer is not part of this version.

== Changelog ==

= 6.0.3 =
* Hardened: the onboarding-reset redirect URL in the Settings page is now output with wp_json_encode() for JavaScript context (previously esc_url), matching the escaping used for the plugin's other inline scripts.
* Cleaned: the dashboard widget's grade helper is now a closure instead of a named function declared inside a method, avoiding any redeclaration edge case.

= 6.0.2 =
* Hardened: admin inline scripts are now assembled as plain PHP strings and attached via wp_add_inline_script(), removing all template-scope output buffering (no open ob_start() across template output).
* Changed: Triomize no longer overrides WordPress core's sitemap stylesheet; the core sitemap keeps its own default styling. Triomize still detects and scores the core sitemap as before.

= 6.0.1 =
* Changed: IndexNow auto-submit is now opt-in and **off by default** — the plugin makes no third-party request until you enable it or submit manually.
* New: a Settings toggle for IndexNow auto-submit, with a clear disclosure of the third-party service and exactly what is sent.
* Fixed: saving Answer-Engine questions or Generative-Engine prompts could fail on PHP 8 due to incorrect array sanitization.
* Fixed: a passing ("good") score showed as a blue badge on the dashboard but green in the editor and post list; passing scores now use one consistent green across every screen.
* Changed: the premium/TriIntent surface is now a single informational "coming soon" page; no locked upsell controls appear next to editor checks.
* Improved: uninstall now removes all plugin options, post meta, and transients it creates.
* Hardened: all admin scripts and styles are now registered/enqueued via the WordPress assets API (no inline tags), output is escaped late for its context (JS values via wp_json_encode/esc_js), and JSON-LD output is slash-escaped to prevent any script-tag break-out.
* New: Triomize now applies a clean, branded stylesheet to WordPress core's built-in sitemap (/wp-sitemap.xml) so a site without a dedicated SEO plugin still gets a polished, human-readable sitemap; it defers automatically to Yoast SEO or RankMath when either is active.
* Fixed: the sitemap check and the Search Indexing panel now recognise WordPress core's sitemap, so standalone sites are scored and reported correctly instead of showing "no sitemap detected".
* Fixed: the GEO "expert citations / quotations" check used a JavaScript-style \u smart-quote escape that PHP's PCRE2 engine rejected, throwing a warning and skipping the check; rewritten with the correct \x{...} syntax so it runs cleanly.
* Docs: readme now documents external services and privacy, and softens outcome-related wording to match the "readiness, not guarantees" framing.

= 6.0.0 =
* Fixed: FAQ scoring counted question-style headings (How.../Why...) as FAQ entries. Only headings ending in "?" are now counted; question-style headings are reported separately with guidance to add a real FAQ block.
* Changed: FAQPage schema is generated only from real "?" questions, so injected markup always mirrors visible content.
* Fixed: version mismatch between the plugin header and the internal version constant.
* Docs: the analysis panel renders below the editor in both the Block and Classic editors.

= 3.2.1 =
* Fixed featured image alt text never being included in scoring due to an undefined variable.
* Fixed duplicate score runs (and duplicate site-wide scans) on every classic editor save.
* Fixed the "Most Urgent Fix" dashboard message showing a generic fallback for renamed and newly added SEO checks.
* Hardened the AJAX rescore endpoint to require edit permission on the specific post.
* Meta descriptions saved from the meta box now preserve line breaks.
* Uninstall now clears the correct scheduled cron hook and removes all plugin post meta and options.

= 3.2.0 =
* Implemented automatic cache-stale detection and synchronous rescoring on metabox render.
* Added "Refresh & Update Scores" button to SEO, AEO, and GEO panels.
* Hardened scoring checks to degrade gracefully in different rendering contexts.

= 3.0.0 =
* Overhauled SEO scoring matrix to include 15 keyword quality and technical checks.
* Redesigned the meta box UI with collapsible sections and status badges.

= 2.0.0 =
* UI redesign with a consistent color-coded scoring palette and a system font stack.
* Added persistent snippet editor with live SERP preview, counters, and slug editing.
* Added color-coded score badges to post and page list columns.

= 1.0.0 =
* Initial release of Triomize. Free core scoring engines.

== Upgrade Notice ==

= 6.0.1 =
IndexNow is now off by default and only runs with your consent; fixes a PHP 8 save error for intent fields. Recommended for all users.
