=== FrontierBase ===
Contributors: hadfamily
Donate link: https://www.frontierbase.io/
Tags: chatbot, customer support, faq, widget, frontierbase
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed the official FrontierBase row-based support chatbot widget on your WordPress site.

== Description ==

FrontierBase connects product, pricing, inventory, or policy tables and answers from retrieved rows through a website widget.

This plugin is the **official WordPress installer** for that widget. It does not invent customer-support answers inside WordPress.

= How it works =

1. Create a channel and configure data / response rules in [FrontierBase Console](https://console.frontierbase.io).
2. Copy your **plugin key** from Channel management → Button install.
3. Paste the key in **Settings → FrontierBase** and save.
4. The official script `https://cdn.frontierbase.io/chatbot.js` loads on your public site and boots with your plugin key.

= What this plugin does =

* Stores your FrontierBase plugin key securely in WordPress options
* Embeds only the official FrontierBase CDN snippet (fixed URL)
* Skips loading entirely when no key is set (safe empty state)

= What this plugin does not do =

* It does not provide an arbitrary JavaScript/PHP code editor
* It does not auto-generate support policies or FAQ text
* It does not paywall built-in plugin features — connection settings work fully; usage limits (if any) are on the FrontierBase service

A FrontierBase account is required: [https://frontierbase.io](https://frontierbase.io)

== Installation ==

1. Upload the `frontierbase` folder to `/wp-content/plugins/`, or install the zip via **Plugins → Add New → Upload Plugin**.
2. Activate **FrontierBase** through the **Plugins** menu.
3. Go to **Settings → FrontierBase**.
4. Open [FrontierBase Console](https://console.frontierbase.io), create a channel, and copy the plugin key.
5. Paste the plugin key, ensure **Enable widget** is checked, and click **Save settings**.
6. View your public site — the chatbot button should appear (typically bottom-right).

== Frequently Asked Questions ==

= Why is nothing showing after install? =

The widget loads only after you paste a valid FrontierBase plugin key. Until then the plugin intentionally injects nothing on the front end. Complete setup under **Settings → FrontierBase**.

= Where do I find the plugin key? =

In FrontierBase Console: **Channel management → Button install**. It is the same `pluginKey` value used in the embed snippet.

= Does this plugin send my WordPress content to FrontierBase automatically? =

No. You configure datasets and rules in FrontierBase Console. This plugin only embeds the official widget script with your plugin key.

= Can I disable the widget without removing the key? =

Yes. Uncheck **Enable widget** on the settings page and save.

= Is arbitrary code allowed? =

No. Only the fixed official CDN URL and a boot call with your sanitized plugin key are used.

== External services ==

This plugin connects to FrontierBase services to display the official chatbot widget on your public site. A FrontierBase account and plugin key are required.

= FrontierBase CDN (chatbot widget) =

* **Service:** `https://cdn.frontierbase.io/chatbot.js`
* **Used for:** Loading the FrontierBase chatbot widget UI and running customer conversations on your site.
* **When data is sent:** Only on public site pages where the widget is enabled and a valid plugin key is saved. The plugin key is passed to the script at load time. When a visitor uses the chat widget, messages and related session data are sent to FrontierBase to generate replies from your configured datasets (not from WordPress posts or pages).
* **Terms of Service:** https://www.frontierbase.io/terms
* **Privacy Policy:** https://www.frontierbase.io/privacy

= FrontierBase Console (account setup) =

* **Service:** https://console.frontierbase.io
* **Used for:** Creating a channel, configuring datasets and response rules, and obtaining your plugin key. The plugin links to Console from the settings screen; configuration happens outside WordPress.
* **Terms of Service:** https://www.frontierbase.io/terms
* **Privacy Policy:** https://www.frontierbase.io/privacy

== Screenshots ==

1. Settings page with empty-state setup instructions
2. Settings page with plugin key connected

== Changelog ==

= 1.0.2 =
* Add bundled translations (ko_KR, ja, fr_FR, de_DE, it_IT, es_ES, zh_TW)

= 1.0.1 =
* Load widget JavaScript via wp_enqueue_script
* Document external FrontierBase services in readme

= 1.0.0 =
* Initial release: plugin key settings, enable toggle, official CDN embed

== Upgrade Notice ==

= 1.0.2 =
Adds admin UI translations for major locales.

= 1.0.1 =
Review fixes: wp_enqueue for CDN script and external services documentation.

= 1.0.0 =
Initial public release.
