=== LLM Override === Contributors: vanguardhive Donate link: https://llmoverride.com Tags: llm, seo, geo, markdown, chatgpt Requires at least: 6.9 Tested up to: 7.0 Requires PHP: 8.1 Stable tag: 1.2.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Make your content accessible and accurate for AI systems. The compliance-first GEO optimization toolkit for WordPress. == Description == **The AI era has a problem: ChatGPT, Claude, and Perplexity are making up facts about your brand.** They crawl your raw HTML — a format built for humans — and hallucinate the gaps. Traditional SEO cannot fix this. A static sitemap cannot fix this. LLM Override fixes this. **LLM Override** is a Machine-to-Machine (M2M) interception engine for WordPress. It speaks the language AI crawlers actually understand: clean, structured Markdown with semantic context — served in real time, directly from your site, without modifying a single page. --- ### How AI systems read your content Most AI tools for WordPress generate a list of URLs. That tells an AI crawler *where* your content is. LLM Override tells AI crawlers *what your content means* — making your brand accurately represented across AI-powered search engines. When a bot visits your page, LLM Override intercepts the request before WordPress renders any HTML, and responds with a structured Markdown payload containing: * Your content, cleaned of scripts, ads, and UI noise * A YAML frontmatter block with your canonical title, URL, and last-updated timestamp * Your **Site Manifest** — verifiable organization facts included in your /llms.txt This is Generative Engine Optimization (GEO): making your content accessible and accurately represented to AI systems. --- ### How it works 1. LLM Override adds a `` tag into your page ``. 2. An AI crawler discovers this link and follows it — that's the standard Content Negotiation protocol. 3. It appends `?view=raw` to your URL and sends the request. 4. LLM Override intercepts at the WordPress routing layer — no HTML is rendered, no theme loads. 5. The crawler receives clean, semantic Markdown. Accurate content. No hallucinations. Your human visitors never see any of this. Their experience is unchanged. --- ### Core Features (Free) **M2M Interception Engine** ✅ Intercepts AI bot requests via `?view=raw` — works on any page, any post type ✅ Converts HTML to clean Markdown using `league/html-to-markdown` ✅ Strips `` breakout. * Fix: Restructured `printf` calls in the llms.txt admin partial to use `wp_kses()` with explicit allowlists instead of `esc_html__()` with raw HTML arguments. * Fix: Removed non-permitted binary files from distribution (`vendor/bin/html-to-markdown`, `vendor/league/html-to-markdown/bin/`). * Fix: Eliminated duplicate Metabox instantiation that caused hooks to register twice. * Tweak: Extracted Terminology Standardization repeater JavaScript into a dedicated external file (`admin/js/llm-override-admin-terminology.js`), enqueued conditionally on the Content Rules page only. * Tweak: Yoast SEO dismiss handler now passes nonce via `wp_localize_script()` instead of inline PHP. * Tweak: Added `phpcs:ignore` annotations with technical justifications for text/plain API endpoints where `esc_html()` would corrupt Markdown output. = 1.1.3 = * Fix: Removed residual AJAX callback registrations pointing to non-existent methods, preventing a fatal error in certain configurations. = 1.1.2 = * Fix: Resolved a backend conflict by removing unused AJAX event listeners that could potentially trigger HTTP 500 errors in specific environments. = 1.1.1 = * Fix: Eliminated execution conflicts by removing non-functional code blocks. * Performance: Restored ultra-lightweight architecture by ensuring all processes rely exclusively on the WordPress Options and Transients APIs. = 1.1.0 = * **Feature**: Terminology Standardization Engine. M2M Engine now globally replaces legacy forbidden terms logic with a structured `{from => to}` Terminology Dictionary to ensure Content Faithfulness and compliance. * **Enhancement**: Migrated global term filtering logic to comply with accurate Source Attribution guidelines. * **Tweak**: Version bump for plugin parity and architectural refactoring to optimize payload delivery. = 1.0.5 = * **New**: RAG JSON-LD Grounding Engine. Automatically injects semantic `TechArticle` schema markup into the HTML `` containing the M2M translated content, allowing search engines and discovery bots to ingest the clean markdown payload directly from the DOM without needing to visit the `?view=raw` endpoint. * **Enhancement**: Complete architectural refactoring of the Content Pipeline. HTML-to-Markdown conversion is now centralized natively inside `LLM_Override_Content_Pipeline::convert_to_markdown()`, guaranteeing maximum stability and preventing theme builder conflicts or fatal errors during the M2M interception phase. * **Fix**: Developer Experience (DX) bypass for Stealth Bot Detection. Integrated IDE headless browsers and Localhost environments (127.0.0.1, .local) will no longer trigger false positive M2M interceptions due to stripped `Sec-Fetch-*` routing headers. = 1.0.4 = * **Fix**: Added deep exclusions for performance auditing tools (`Chrome-Lighthouse`, `GTmetrix`, `PingdomPTST`) to prevent them from receiving Markdown. Speed tests will now correctly analyze the HTML layout without triggering the Stealth Bot engine. * **Fix**: Added extended SEO bots exclusions (`AhrefsBot`, `SemrushBot`, `Applebot`, `DotBot`, `MJ12bot`) to the whitelist. = 1.0.3 = * Fix: **Critical Indexing Hotfix.** Excluded honest search engine crawlers (like Googlebot and Bingbot) from being falsely flagged by the Stealth Detection Engine. This ensures good bots receive standard HTML without the `noindex` header, allowing normal SERP indexing to continue seamlessly. = 1.0.2 = * Fix: Changed the Content-Type header from `text/markdown` to `text/plain` to ensure strict AI URL ingesters (like Google NotebookLM) accept the M2M endpoints as valid sources, while maintaining monospace readability in browsers. * Tweak: Restored the `X-Robots-Tag: noindex` header to prevent search engine SERP pollution, confirming it was not the cause of the NotebookLM blockage. = 1.0.1 = * New: Passive Yoast SEO Compatibility Checker. Intercepts `llms.txt` overriding rules and Bot Blocker restrictions from Yoast Premium, alerting administrators with actionable fixes inside the WP dashboard. * Fix: Added missing `Content-Type: text/markdown` header to the M2M payload response. This prevents browsers from incorrectly attempting to parse the payload as HTML and collapsing whitespace/formatting. = 1.0.0 = * Initial release. * New: Semantic `llms.txt` UI. Select a global context source via dropdown to automatically generate the file's blockquote manifesto. * New: Link grouping in `llms.txt`. Links are now categorized by post type (`## Pages`, `## Optional`, etc.) following strict llmstxt.org specifications. * Enhancement: M2M payload extraction engine now evaluates up to 400 characters of raw content (vs 120) when native excerpts are missing, providing richer factual context to AI crawlers. * Fix: Addressed WordPress forcing trailing slashes (`/`) on `.txt` API endpoints via `redirect_canonical`. Now serves pristine flat files. * Fix: Replaced generic HTML entity decoding with native WordPress typographic decoders to properly clean apostrophes and quotes injected by Gutenberg. * Tweak: Redesigned the "Regenerate Cache" UI to strictly adhere to B2B aesthetic guidelines. * Active M2M Interceptor engine with structured HTML-to-Markdown conversion. * Global Semantic Injection: Forbidden Terms and Corporate Manifest via YAML frontmatter. * Dynamic `/llms.txt` and `/llms-full.txt` endpoint generation. * Algorithmic Discoverability via `` tag and `robots.txt` announcement. * Native SEO integrations with Yoast SEO, Rank Math, SEOPress, and AIOSEO (zero-dependency SQL implementation). * Native per-post exclusion and payload override via WordPress editor metabox. * Admin Dashboard with Shadow Analytics Lite (M2M bot hit counters, GDPR-compliant IP hashing). * "View as AI" Admin Bar button for empirical M2M payload verification. * "Before vs. After" live HTML-to-Markdown simulation in the Dashboard. * Passive bot detection for 58 known AI crawlers across 4 behavioral categories. * HTTP Content Negotiation support (`Accept: text/markdown` header). * Enterprise Unicode sanitization (BOM, Zero-Width Spaces, Non-Breaking Spaces, Soft Hyphens). * AJAX-driven Transient caching (12-hour TTL) for all M2M endpoints with manual flush. * 14 documented action/filter hooks for developer extensibility. * Full compliance with WordPress coding standards: 0 Plugin Check errors, 0 warnings. --- == Upgrade Notice == = 1.2.2 = WordPress 7.0 compatibility release. Updates tested-up-to headers, aligns PHP 8.1 requirement, registers REST-visible post meta for editor compatibility, and adds Abilities API discovery for AI agents. Recommended for all users on WordPress 7.0. = 1.2.1 = Hotfix: Restores Google NotebookLM compatibility. NotebookLM users can now import site pages and M2M endpoints as sources without errors. All other bots unaffected. = 1.2.0 = HTTP standards compliance release. Adds RFC 7763 Content-Type, Vary: Accept for correct CDN behavior, X-Markdown-Tokens for AI pipeline budgeting, and ReadAction in JSON-LD for Schema.org-compliant M2M endpoint discovery. Recommended for all users. = 1.1.5 = Crucial compatibility layer patch for shortcode visual builders (Divi, WPBakery). Upgrade highly recommended to restore correct `.txt` endpoints and Grounding schemas. = 1.1.4 = Security and compliance release addressing all issues raised during the WordPress.org plugin review. Resolves inline script enqueuing, output escaping, and removes non-permitted files from distribution. = 1.0.1 = New Yoast SEO compatibility warnings added to the dashboard. Essential if you are using Yoast SEO simultaneously. = 1.0.0 = Initial release of LLM Override.