=== KnowDesk AI Support Widget ===
Contributors: knowdeskio, akinadeayodeji5
Tags: ai chatbot, support widget, knowledge base, customer support, chat widget
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed a KnowDesk AI support widget on your WordPress site. Your docs become an instant-answer chatbot - no coding needed.

== Description ==

**KnowDesk** turns your existing knowledge base into an AI-powered support widget that answers visitor questions in real time - directly from your own content.

Connect your Google Docs, Notion pages, Confluence wiki, PDF files, or help centre URLs. KnowDesk reads your documentation and deploys a branded chat widget on your site that answers questions instantly, 24/7.

**What this plugin does:**

* Embeds your KnowDesk widget on any WordPress page, post, or the entire site - no code required
* Lets you configure your Widget API key directly from the WordPress admin
* Gives you display controls: choose which pages, which visitors (logged-in / logged-out), and which corner the widget appears in

**What KnowDesk does:**

* Connects to your existing documentation - Google Docs, Notion, Confluence, PDFs, website URLs, or plain text
* Deploys an AI chatbot that only answers from **your content** (not generic internet knowledge)
* Deflects repetitive support questions so your team handles only complex cases
* Works on any website in under 2 minutes

**Who it's for:**

* SaaS companies with support docs
* E-commerce stores with FAQs, returns policies, shipping info
* Agencies deploying AI support for clients
* HR & ops teams building internal knowledge assistants
* Anyone with an existing knowledge base that visitors keep asking questions about

= Features =

* ✓ Paste-and-save setup - no code, no embed blocks needed
* ✓ Inline API key validation so you know it worked before publishing
* ✓ Display rules: all pages, front page only, posts only, pages only
* ✓ Exclude specific pages by ID
* ✓ Visitor rules: show to logged-out visitors, logged-in users, or both
* ✓ Widget position: bottom-right or bottom-left
* ✓ Admin notice guides you through setup until a key is saved
* ✓ Multisite compatible
* ✓ Translation ready

= Getting started =

1. Install and activate the plugin
2. Go to **Settings → KnowDesk Widget**
3. Click **"Get your API key → Sign up free"** to create a KnowDesk account
4. Connect your knowledge base (Google Docs, Notion, PDF, etc.)
5. Copy your Widget API Key from KnowDesk → Widget Config
6. Paste it into the plugin settings and click **Save**
7. Your widget is live ✓

= Supported knowledge sources =

KnowDesk can read from: Google Docs, Notion, Confluence, PDF files (via URL), website URLs, and plain pasted text.

= Privacy =

This plugin does not collect or store any personal data about your site visitors. The KnowDesk widget itself operates under [KnowDesk's Privacy Policy](https://knowdesk.io/privacy). The API key is stored in your WordPress database as a standard option and is never exposed to the browser.

== Installation ==

= From the WordPress Plugin Directory =

1. Go to **Plugins → Add New** in your WordPress admin
2. Search for **KnowDesk**
3. Click **Install Now**, then **Activate**
4. Go to **Settings → KnowDesk Widget** to configure

= Manual installation =

1. Download the plugin zip file
2. Go to **Plugins → Add New → Upload Plugin**
3. Choose the zip file and click **Install Now**
4. Activate the plugin
5. Go to **Settings → KnowDesk Widget**

== Frequently Asked Questions ==

= Do I need a KnowDesk account? =

Yes. This plugin is a connector - it embeds the widget your KnowDesk account generates. You need a KnowDesk account to get an API key. [Sign up free at knowdesk.io](https://knowdesk.io/signup?utm_source=wordpress&utm_medium=plugin&utm_campaign=faq).

= Is it free? =

KnowDesk offers paid plans starting at $49/month. There is a 7-day free trial on every plan, no credit card required. The WordPress plugin itself is free.

= Where do I find my API key? =

In your KnowDesk dashboard: **Widget Config → Embed Code**. The key starts with `kd_live_`.

= The widget isn't appearing on my site - what do I check? =

1. Confirm your API key is saved and shows "Widget active" in the plugin settings
2. Check the display rules - if "Show widget on" is set to "Front page only", it won't appear on other pages
3. Check the Visitor visibility settings - you may have unchecked both options
4. Check the "Exclude these pages" field for the current page's ID
5. Open your browser console for any JavaScript errors

= Can I show the widget on specific pages only? =

Use the "Exclude these pages" field and enter the page IDs you want to exclude. For page-specific display, set "Show widget on" to "Pages only" or "Posts only" and use excludes to narrow it further.

= Does this work with WooCommerce? =

Yes. The widget loads on any WordPress page type, including WooCommerce product, cart, and checkout pages.

= Is the plugin GDPR-compliant? =

The plugin itself stores only your API key (a non-personal setting). No visitor data is stored by the plugin. The KnowDesk widget operates under KnowDesk's own data processing terms - see [knowdesk.io/privacy](https://knowdesk.io/privacy).

= Can I use this on a multisite installation? =

Yes. Each site in the network configures its own API key and display settings independently.

== Screenshots ==

1. Settings page - clean API key setup with step-by-step onboarding
2. Settings page - display and visibility options
3. Admin notice on the plugins page before setup is complete
4. Live widget on a WordPress site answering a visitor question

== Changelog ==

= 1.0.0 =
* Initial release
* WordPress Settings API integration
* Inline API key validation via AJAX
* Display rules: all / front page / posts / pages
* Page exclusions by ID
* Visitor visibility (logged-in / logged-out)
* Widget position: bottom-right / bottom-left
* Admin notice with signup CTA
* Multisite support
* Translation ready

== Upgrade Notice ==

= 1.0.0 =
Initial release.
