=== VP Iframe Assistant ===
Contributors: visualpublinet
Tags: iframe, assistant, chatbot, embed, floating button
Requires at least: 5.6
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Floating button that opens any iframe-embedded conversational assistant in a chat-style side panel. Colors, texts and URL configurable.

== Description ==

VP Iframe Assistant adds a floating button to your website. When clicked, it opens a chat-style side panel (full screen on mobile) that loads any conversational assistant embedded through an iframe.

It is provider-agnostic: you just paste the iframe URL of the assistant you want to embed. It works with any service that offers an embeddable iframe — for example, a Q-soft (e-salus) appointment assistant, a support chatbot, a booking widget, an AI assistant, etc.

The plugin itself does not connect to or send any data to external servers. The iframe is loaded directly in the visitor's browser, against the URL configured by the site administrator.

Transparency: this plugin was developed with AI assistance (Claude) and was reviewed and audited manually by the Visual Publinet team, including a security and privacy review. It has no external dependencies and no API keys.

= Features =

* Fixed floating button, configurable (text, icon, position, colors).
* Side panel viewer, full screen on mobile.
* Lazy loading of the iframe (does not affect page speed).
* Full settings panel with a live preview of the button and viewer.
* Optional, configurable privacy notice in the viewer footer.
* Open the assistant from any other element via the `vpifa-open` CSS class or a JavaScript API.
* Open the assistant from selected WordPress menu items, chosen right from the settings.
* Minimal iframe permissions and a strict referrer policy by default.
* Accessible (ARIA roles, focus management, close with the Esc key).
* Available in English and Spanish (translation-ready, with a bundled es_ES translation).

== Installation ==

1. Upload the `vp-iframe-assistant` folder to `/wp-content/plugins/`, or install the ZIP from Plugins > Add New > Upload Plugin.
2. Activate the plugin from the "Plugins" menu.
3. Go to the "VP Iframe Assistant" menu and set the iframe URL of your assistant, plus colors and texts.

== Default configuration ==

* Iframe URL: empty (must be set under Settings → VP Iframe Assistant). The button is not shown until a URL is provided.
* Button text: "Open assistant" ("Abrir asistente" in Spanish).

== Opening the assistant from other buttons ==

In addition to the floating button, you can open the assistant from any element on the website by adding the CSS class `vpifa-open` (or the `data-vpifa-open` attribute):

* HTML: `<a href="#" class="vpifa-open">Open assistant</a>`
* Menus (Appearance > Menus): enable "CSS Classes" in Screen Options and type `vpifa-open`.
* Gutenberg / Elementor buttons: "Additional CSS classes" field > `vpifa-open`.

You can also pick existing menu items directly from the plugin settings ("Open from a menu item"): tick the menu entries that should open the assistant and the plugin adds the trigger for you, no CSS class needed.

It can also be opened with JavaScript: `window.vpifaCita.open()` (and `.close()` / `.toggle()`).

== Frequently Asked Questions ==

= Which services can I embed? =

Any service that provides an embeddable iframe URL. The plugin is not tied to a specific provider; you choose the URL.

= Does the plugin send my data anywhere? =

No. The plugin does not contact any external server. Only the iframe you configure is loaded in the visitor's browser, against the provider you choose.

== For developers ==

Filter available to hide the widget on specific templates:

`add_filter( 'vpifa_should_render', '__return_false' );`

== Screenshots ==

1. The floating action button displayed on a live website, ready to open the chat viewer.
2. The chat viewer opened as a side panel with an embedded conversational assistant loaded through an iframe.
3. The settings page where you enable the plugin, set the iframe URL, and edit the button, title, and subtitle texts.
4. The live preview showing the button and viewer update instantly as you adjust the settings.
5. The color palette section with color pickers for customizing the button and viewer to match your brand.
6. The optional privacy notice and the option to open the assistant from any element using the vpifa-open CSS class or a selected menu item.

== Changelog ==

= 1.0.0 =
* Initial version.
