=== Replai - AI Chatbot ===
Contributors: replai
Tags: chat, ai, assistant, sales, onboarding
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 1.1.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Boost your WordPress site with an AI-powered chatbot for sales, support and onboarding. Easy to install, fully customizable and multilingual.

== Description ==

Do you want to transform your visitors' experience and boost engagement on your WordPress site?
**Replai - AI Chatbot** is the plugin you need. Our advanced AI-powered chat agent enables you to:

* **Connect in real time:** Instantly respond to user inquiries and provide 24/7 personalized support.
* **Drive your sales:** Automate pre-sales queries and optimize every stage of your sales funnel.
* **Enhance support and onboarding:** Streamline customer support and speed up employee onboarding with accurate, automated responses.
* **Multi-language capability:** Communicate globally by supporting multiple languages and markets.
* **Fully customizable:** Tailor the chat's appearance and behavior to seamlessly integrate with your website.

Discover how REPLAI can revolutionize customer service and drive business growth. Get started today and elevate your WordPress site to the next level!

== Installation ==

1. Upload the **replai-ai-chatbot** folder to your `/wp-content/plugins/` directory, or install it directly from the WordPress plugin repository.
2. Activate the plugin from the WordPress admin panel.
3. Go to **Replai Chatbot** in the WordPress admin sidebar to enter your Assistant code and configure where the chatbot is displayed.
4. Optionally test the chatbot by visiting the front-end of your site.

== External services ==

The chatbot you see on your site is powered by the REPLAI cloud platform (https://replai.net). The plugin loads the chatbot from REPLAI on the public pages of your site; this connection is required for the chatbot to work.

**When it connects:** only on the public pages where you have chosen to show the chatbot (and only while the "Enable chatbot" option is active). It never connects from the WordPress admin area.

**Data sent by the plugin:** only the assistant code you selected in Settings, used to load your chatbot. The plugin does not send any personal data, IP addresses, or page contents to REPLAI. Once the chat is open in the visitor's browser, the conversation itself (messages, page URL, language) is handled by REPLAI under its terms and privacy policy:

**Terms of service:** https://replai.net/en/termsandconditions/

**Privacy policy:** https://replai.net/en/privacy-policy/

== Screenshots ==

1. **Plugin settings:** Connect your REPLAI project with its API key, pick a chatbot and choose where it appears — with a live status panel.
2. **Chatbot on your site:** The assistant ready to help your visitors on the public front-end.
3. **Chatbot customization:** Colors, button, texts and languages, fully customizable from REPLAI.
4. **Assistant behaviour:** Identity, role and conversation style configured in REPLAI.

== Changelog ==

A full changelog is also available in CHANGELOG.md.

= 1.1.3 =
* Updated the Terms of service and Privacy policy links in the External services section to the correct REPLAI URLs.

= 1.1.2 =
* Sanitized the REPLAI base URL field on save (Plugin Check: ValidatedSanitizedInput).

= 1.1.1 =
* WordPress.org compliance: removed the bundled translation files (.po/.mo) and the Spanish locale mofile filter; translations are served by translate.wordpress.org.
* Fixed the plugin name in the description (it still said "REPLAI - Your AI Assistant" in one place).

= 1.1.0 =
* The chatbot version served on the site (front v2 or v3) is now decided in REPLAI, per agent. The plugin uses the install URL that REPLAI returns for the selected chatbot, instead of assuming a fixed path.
* Existing installations keep working: if no resolved URL is available, the plugin falls back to the previous behaviour.

= 1.0.0 =
* The plugin now connects to your REPLAI project with its **project API key** — the same key used by the Replai Forms plugin — instead of asking for a chatbot code.
* Added a chatbot selector: it lists every chatbot of the project and states its type (**v1** or **v2**), so you can pick the agent you want.
* Each type loads its own embed script automatically, so switching between v1 and v2 requires no manual change.
* New Status panel with a connection test, a catalog refresh, the number of chatbots found and the last sync timestamps.
* Existing installations keep working: the stored chatbot code is preserved and its type is inferred from the code itself.
* Fixed the Settings screen so admin notices from other plugins are no longer injected inside the plugin cards.

= 0.3.0 =
* Rebuilt the plugin package using the WordPress.org slug `replai-ai-chatbot` as the canonical install folder, main plugin file and text domain.
* Refreshed translation headers and compiled language files for Catalan, Spanish, French, Italian and Portuguese under the `replai-ai-chatbot` text domain.
* Prepared a clean release ZIP without macOS metadata files.

= 0.2.0 =
* Renamed the plugin slug from `replai-your-ai-assistant` to `replai-ai-chatbot` to match the plugin name shown in WordPress.org. Text Domain, translation files, the main plugin file and the install folder all use the new slug.
* Fixed inline `<style>` blocks in the admin Settings screen and the admin menu icon styles: both are now registered through `wp_enqueue_style()` from a real CSS file (`admin/css/admin-style.css`).
* Documented the external REPLAI service used by the plugin (front-end chatbot script) under a new `== External services ==` section in the readme, including endpoint, data sent, and links to terms and privacy.
* Updated `Plugin URI` to a working URL.
* Updated `Contributors` to the WordPress.org username `replai`.

= 0.1.9 =
* All translatable strings rewritten in English as source language so the plugin defaults to English when no translation file matches the WP locale.
* Added translations for Catalan (`ca`), Spanish (`es_ES`), French (`fr_FR`), Italian (`it_IT`) and Portuguese (`pt_PT`), including the Plugin Name and Description shown in the Plugins list.
* Added a `load_textdomain_mofile` filter that maps every Spanish locale variant (`es_AR`, `es_MX`, `es_CL`, `es_CO`, `es_PE`, `es_VE`...) to the same `es_ES.mo`, so any Spanish-speaking user sees Spanish copy.
* New translation catalog (`.pot`, `.po`, `.mo`) shipped inside `/languages/`.

= 0.1.8 =
* Renamed the plugin to "Replai - AI Chatbot" (the previous name "REPLAI - Your AI Assistant" was confusing and is no longer used in the WP admin).
* Redesigned the Settings screen with the same card-based layout used by the REPLAI CRM Form Embed plugin: hero block with the REPLAI logo, version and release date chips, a Configuration card with form, and a Status card showing the live state of the chatbot.
* Added a release date constant (`REPLAI_YAI_RELEASE_DATE`) for the hero chip.
* Removed the legacy `top-bar.php` and `main.php` admin views (no longer used after the menu refactor in 0.1.7).
* Wrapped the Settings screen code in a prefixed function to avoid non-prefixed global variables (PluginCheck `PrefixAllGlobals.NonPrefixedVariableFound`).
* Added `/* translators: */` comments before `__()` calls with placeholders (PluginCheck `WP.I18n.MissingTranslatorsComment`).
* Replaced `wp_date()` with `date_i18n()` to keep compatibility with the declared minimum `Requires at least: 5.0` (PluginCheck `wp_function_not_compatible_with_requires_wp`).
* Updated `Tested up to` to WordPress 7.0.

= 0.1.7 =
* Removed manual call to `load_plugin_textdomain()`. WordPress.org loads translations automatically since WP 4.6 (fixes PluginCheck warning `DiscouragedFunctions.load_plugin_textdomainFound`).
* Refactored chatbot script injection to use the standard `wp_enqueue_script()` API instead of the previous output buffering approach (fixes PluginCheck error `WordPress.WP.EnqueuedResources.NonEnqueuedScript`).
* README rewritten in English with a proper short description and "Tested up to" updated to the latest WordPress version.
* Admin menu renamed to "Replai Chatbot" and the brand landing page removed: the first click on the menu now opens the Settings screen directly.
* Updated admin menu icon to the rounded "R" badge shared with the REPLAI CRM Form Embed plugin, with matching circular styling.

= 0.1.6 =
* Ensure the chatbot script is injected before the closing body tag.

= 0.1.5 =
* Enabled file management option in REPLAI.
* General services version 2.

= 0.1.4 =
* Improved custom icon integration in the admin menu with full retina support.
* Optimized chat script loading for better mobile performance.
* Updated help texts and internal documentation for a clearer user experience.

= 0.1.3 =
* Added support for custom icons in the admin menu.
* Improvements in the settings UI and chat script loading optimization.
* Adjustments in script presentation and enqueueing for better compatibility with modern themes.

= 0.1.2 =
* Improved sanitization and validation of configuration data.
* Minor compatibility fixes with the latest WordPress version.
* Improvements in the stored version update process.

= 0.1.1 =
* Updated Plugin URI and improvements to internationalization.
* Optimized script enqueueing system for efficient resource loading.

= 0.1.0 =
* Changed slug from "repyai" to "replai" across the plugin.
* Reviewed and updated plugin header to comply with WordPress.org guidelines.

= 0.0.9 =
* Minor adjustments and bug fixes reported by the community.
* Improvements in general plugin stability.

= 0.0.8 =
* Improvements in top-menu positioning inside the admin area.

= 0.0.7 =
* Implemented dynamic validation on the settings screen to prevent saving invalid data.

= 0.0.5 =
* Added quick-access settings link from the plugin list.

= 0.0.4 =
* Removed the login screen; settings are shown directly.
* Proper initialization of display options when REPLAI is not active.

= 0.0.3 =
* Implemented multi-language support and expanded the side menu with sections: REPLAI, Settings, Help, and About REPLAI.

= 0.0.2 =
* Implemented AJAX login system, update notifications and use of the WordPress Options API.

= 0.0.1 =
* Initial release of the plugin with basic AI chat integration features.

== Upgrade Notice ==

= 1.1.0 =
* The front version (v2/v3) of a chatbot is now controlled from REPLAI. Re-save the chatbot in Settings after changing it in REPLAI to pick up the new version.

= 1.0.0 =
* Major update: connect with your project API key and choose any chatbot of the project, v1 or v2. Your current chatbot keeps working without changes.

= 0.3.0 =
* Release package rebuilt for WordPress.org validation with the canonical `replai-ai-chatbot` slug and text domain.

= 0.2.0 =
* Important update: addresses the WordPress.org review feedback (slug renamed to `replai-ai-chatbot`, inline styles moved to enqueued CSS, external REPLAI service documented, contributor username fixed).

= 0.1.7 =
* Recommended update: fixes PluginCheck warnings (deprecated `load_plugin_textdomain()` call and non-enqueued script) and rewrites the README in English to comply with WordPress.org guidelines.

= 0.1.6 =
* Important update: please read the full changelog to see all improvements accumulated since the initial release.
