=== Aetheris AI Chat ===
Contributors: aetherisinnovations
Tags: ai, chatbot, chat, customer-support, lead-generation
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

One-click AI chatbot for any WordPress site. Trained on your content. Generates leads. Mobile-ready. No code.

== Description ==

**Aetheris AI Chat** drops a production-ready AI sales assistant onto your WordPress site in under 60 seconds. The bot is trained on YOUR content (homepage, docs, PDFs) and answers visitor questions with citations — turning passive traffic into qualified leads.

= What you get =

* **One-click install** — paste your public key, toggle on, done.
* **Trained on your content** — ingest URLs or upload PDFs/DOCX from inside WordPress.
* **Mobile responsive** — Shadow-DOM widget that won't conflict with your theme.
* **White-label ready** — hide the "Powered by Aetheris" footer with a single toggle.
* **Lightweight** — async-loaded, zero front-end render-blocking, ~25 KB gzipped.
* **Secure by default** — capability checks, nonces, sanitised inputs, escaped output.
* **Lead capture** — collected leads flow back to your Aetheris dashboard.
* **Analytics in WP** — see conversations, messages, and lead counts without leaving admin.

= How it works =

1. Sign up at [aetherisinnovations.com](https://aetherisinnovations.com).
2. Copy your **Public Key** from the dashboard.
3. Paste it into **Aetheris Chat → Settings**.
4. Train the bot on your homepage URL or upload a few PDFs.

The widget appears bottom-right on every public page. Toggle it off any time.

= Privacy =

This plugin sends visitor messages and your knowledge-base content to Aetheris servers (api.chat.aetherisinnovations.com) for processing. No personal data is collected by the WordPress plugin itself; lead capture happens through the widget and is stored against your Aetheris account. See [our privacy policy](https://aetherisinnovations.com/privacy) for details.

= Developer hooks =

`apply_filters( 'aetheris_ai_chat_should_load', $bool, $settings )` — last-chance gate before the widget script tag is printed. Return `false` to suppress on specific routes (e.g. WooCommerce checkout).

== Installation ==

1. Upload the `aetheris-ai-chat` folder to `/wp-content/plugins/` — or install via Plugins → Add New and search for "Aetheris AI Chat".
2. Activate through the **Plugins** menu in WordPress.
3. Go to **Aetheris Chat → Settings** and paste your Public Key.
4. (Optional) Add your API Key to manage the knowledge base from inside WordPress.

== Frequently Asked Questions ==

= Do I need an Aetheris account? =

Yes — the plugin is the WordPress front-end for the Aetheris hosted service. Free tier covers up to 100 conversations / month.

= Will this slow down my site? =

The widget script is loaded asynchronously and isolated in a Shadow DOM. There is no render-blocking JavaScript and no impact on Core Web Vitals.

= Can I hide the widget on certain pages? =

Yes — use the `aetheris_ai_chat_should_load` filter (see Description → Developer hooks) or pick a different value under **Settings → Load on**.

= Is it GDPR compliant? =

Yes. The widget displays a disclosure on first message and visitors must opt-in before submitting a lead. Aetheris is GDPR + SOC 2 compliant; see our DPA for details.

= Does it work with caching plugins? =

Yes. The plugin only writes to the page footer, so static page caches (W3 Total Cache, WP Rocket, LiteSpeed) work out of the box.

= Can I self-host the widget? =

Yes. Under **Settings → Advanced**, set the API base URL and widget script URL to your own deployment.

== Screenshots ==

1. Settings page in the WordPress admin — paste your Public Key + API Key, configure position, white-label, and load rules.
2. Knowledge Base tab — ingest a URL or upload a document without leaving WordPress. Shown after a successful URL ingest (5 chunks indexed).
3. The full Aetheris dashboard — Overview with messages, leads, conversations, documents, and embedded chunks at a glance. Linked from inside WordPress.
4. The Aetheris widget on a live customer storefront. Shadow-DOM, mobile-ready, color-matched to your brand.

== Changelog ==

= 1.0.2 =
* **Compliance**: passes the WordPress.org Plugin Check tool — translators comments on all placeholder strings, per-field `$_FILES` sanitisation, prefixed template variables, and the front-end widget now ships through `wp_enqueue_script()` instead of a hand-written `<script>` tag.
* **Compatibility**: tested up to WordPress 6.9.
* **Cleanup**: dropped the explicit `load_plugin_textdomain()` call (handled automatically since WP 4.6 for plugins on .org).

= 1.0.1 =
* **Fix**: in-WordPress Dashboard tab sometimes showed "missing auth" on the Recent Conversations panel even with a valid API key. The plugin now forces HTTP/1.1, disables redirect-following, and adds Cache-Control headers so the Authorization header reliably reaches the backend across more host configurations (notably WASM-based playgrounds).
* **Polish**: admin pages rebranded with the Aetheris paper / ink / copper palette and the brand mark, replacing the placeholder blue accent.
* **Refactor**: all read-only analytics calls go through a single `request()` helper. Halves the surface area for HTTP bugs and makes future additions one-liners.

= 1.0.0 =
* Initial release.
* Settings page with public key, API key, position, white-label, load-on rules.
* Knowledge base ingestion (URL + file upload).
* In-WP dashboard with stats and recent conversations.
* `aetheris_ai_chat_should_load` filter for per-route widget control.
* Multisite-safe uninstall.

== Upgrade Notice ==

= 1.0.2 =
WordPress.org Plugin Check compliance pass and verified compatibility with WordPress 6.9. Recommended for all sites.

= 1.0.1 =
Bug fix for "missing auth" on the Dashboard tab + brand-aligned admin styling. Recommended for everyone running 1.0.0.

= 1.0.0 =
First release.
