=== Botpass – AI Crawler Optimizer & GEO ===
Contributors: botpass
Tags: ai, seo, crawlers, llms, json-ld
Requires at least: 5.9
Tested up to: 7.0
Stable tag: 1.2.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI crawler interception and GEO optimization for WordPress.

== Description ==

Botpass connects your WordPress site to the Botpass platform to optimize how AI models discover, consume, and cite your content.

**Main features:**

* Intercepts AI bots (GPTBot, ClaudeBot, PerplexityBot, etc.) and serves optimized Markdown responses.
* Public endpoints: `/llms.txt`, `/llms-full.txt`, and `/citations.json`.
* Automatic JSON-LD injection enriched via the Botpass API.
* `Link` autodiscovery headers for AI crawlers.
* Analytics dashboard with GEO Score baseline, KPIs, and CSV export.
* Per-post metabox: exclusions, pillar content, and GEO Score delta.
* Compatible with Yoast SEO, Rank Math, SEOPress, and AIOSEO.

== External services ==

This plugin requires an external service operated by Botpass at `https://api.botpass.io/api/v1`.

**When data is sent**

* **On connect (admin opt-in):** site URL, site name, WordPress version, plugin version.
* **AI bot visits:** page URL, bot identifier, last modified date.
* **JSON-LD requests:** page URL of the current singular view.
* **llms.txt (remote mode):** site URL, site name, and tagline.
* **Content audits:** URLs of published posts (baseline capture after connect).
* **Cache invalidation:** URL of updated posts.
* **Warmup:** list of published post URLs (the Botpass API may enforce plan limits server-side).

**Legal links**

* Terms of Service: https://botpass.io/legal/terms
* Privacy Policy: https://botpass.io/legal/privacy

**Service plans**

The free plan is assigned on connect. Higher tiers (Pro, Agency, Enterprise) are managed by the Botpass service at botpass.io. The plugin displays your current plan label for reference; any paid limits or quotas are enforced by the external API, not by locking features in the plugin code.

**Local analytics**

The plugin stores local analytics in the database table `{prefix}botpass_analytics` with post URL, bot slug, event type, and a SHA-256 hash of the visitor IP. Retention defaults to 12 months and can be filtered with `botpass_analytics_retention_months`.

**Consent**

No data is sent to Botpass until a site administrator explicitly accepts the connection screen and clicks Connect. You can disconnect at any time from **Botpass → Settings**.

== Installation ==

1. Upload the plugin directory to `/wp-content/plugins/botpass/`.
2. Activate the plugin from the **Plugins** menu in WordPress.
3. On the connection screen, review what data is sent, accept the terms, and click **Connect to Botpass**.
4. Optional: adjust features under **Botpass → Settings**.

== Frequently Asked Questions ==

= Do I need to configure an API key manually? =

No. After you accept the connection on onboarding, the plugin registers with Botpass and stores the key encrypted locally.

= Which bots does the plugin detect? =

It detects crawlers from OpenAI, Anthropic, Google, Perplexity, Meta, Apple, Amazon, xAI, DeepSeek, Mistral, Cohere, Brave, and autonomous agents. The dictionary is extensible via the `botpass_bot_dictionary` filter.

= What happens if the Botpass API is unavailable? =

Your site continues serving normal HTML. The interceptor does not block access to content. `/llms.txt` uses a local fallback when the remote API is unavailable.

= How do I disconnect the service? =

Go to **Botpass → Settings** and use **Disconnect from Botpass**. This removes the stored API key and stops all external calls.

== Screenshots ==

1. Connection screen with explicit consent.
2. Analytics dashboard with ROI banner and KPIs.

== Changelog ==

= 1.2.5 =
* Removed active_plugins manipulation (WordPress.org compliance).
* Full English readme and user-facing strings; descriptive plugin name.
* Analytics schema upgrades via dbDelta(); Spanish code comments translated to English.
* Plugin Check fixes: prepared SQL, phpcs annotations, safe redirects, and variable prefixes.

= 1.2.4 =
* WordPress.org compliance: removed local Pro plan gating, registration token without WP secrets, local Chart.js, safe JSON-LD escaping.

= 1.2.2 =
* Audit fixes for WordPress.org plugin directory compliance.
* Settings panel, llms.txt, and debug improvements.

= 1.2.1 =
* Onboarding with explicit consent before connecting to Botpass.
* Settings page with feature toggles and service disconnect.
* External services and privacy documentation in readme.
* Local fallback for `/llms.txt` when the remote API fails.
* Removed debug logging in production.

== Upgrade Notice ==

= 1.2.5 =
Compliance update for WordPress.org review (active_plugins guard removed, English readme).

= 1.2.4 =
WordPress.org compliance update.

= 1.2.2 =
Maintenance release with audit fixes. No configuration changes required.

= 1.2.1 =
After updating, connect your site from the onboarding screen if you have not already.
