=== Bookinda Booking Widget ===
Contributors:      bookinda
Tags:              booking, appointment, elementor, gutenberg, scheduling
Requires at least: 5.8
Tested up to:      7.0
Requires PHP:      7.4
Stable tag:        1.1.2
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Native WordPress plugin for the Bookinda online booking widget. Gutenberg block, Elementor widget, Classic editor button, shortcode, lightbox.

== Description ==

The Bookinda Booking Widget plugin embeds the Bookinda online booking experience natively into any WordPress site. It supports four embed methods (Gutenberg block, Elementor widget, Classic editor toolbar button, shortcode) and two display modes (inline iframe, fullscreen lightbox).

The plugin is a thin client for the Bookinda SaaS booking platform (https://bookinda.hu). It loads the booking flow in an iframe from your Bookinda tenant subdomain (`{slug}.bookinda.hu`) and bridges its lifecycle events to the host page as native DOM CustomEvents.

You need an active Bookinda account to use this plugin. The plugin itself is free.

= Features =

* **Gutenberg block** in the Widgets category with sidebar InspectorControls for every parameter.
* **Elementor widget** with three tabs (Content, Preselection, Style) in the sidebar.
* **Classic editor (TinyMCE) toolbar button** with a dialog that inserts the appropriate shortcode.
* **Shortcode** `[bookinda]` / `[bookinda mode="lightbox"]` for any template, widget area, or content block.
* **Inline mode**: the booking iframe is embedded directly in the content (auto-resize).
* **Lightbox mode**: a button opens a fullscreen modal with the booking flow (mobile-optimized with sticky continue button, ESC and backdrop click to close).
* **Preselection**: pass `services`, `staff`, `category`, `promo`, `location` parameters to pre-select fields in the booking flow.
* **Host DOM events**: `bookinda:complete`, `bookinda:error`, `bookinda:step`, `bookinda:resize` CustomEvents dispatched on `document` for custom integrations.
* **Optional GA4 and Meta Pixel tracking**: if the host page already loads `gtag` or `fbq`, the plugin can fire a `purchase` event on booking completion. Configured via plugin settings (off by default).

= Where to find your tenant slug =

Your tenant slug is the prefix of your Bookinda URL: `https://YOUR-SLUG.bookinda.hu/manager/calendar`. The slug is the part before `.bookinda.hu`.

== External Services ==

This plugin connects to **Bookinda** (https://bookinda.hu), a third-party SaaS booking platform operated by Bookinda Kft. The connection is required for the plugin to function: the booking widget is hosted by Bookinda and embedded in your WordPress site via an iframe.

**What is sent to Bookinda:**

* When a visitor opens a page containing the booking widget, their browser loads `https://{your-tenant-slug}.bookinda.hu/embed/{your-tenant-slug}` in an iframe. The URL includes the embed configuration parameters you set (mode, color, preselected service IDs, etc.) and an analytics-only `source=wp-plugin` parameter so Bookinda can distinguish WordPress plugin traffic from other embed sources.
* When the visitor proceeds with a booking, they interact directly with the Bookinda iframe. Any data they enter (name, email, phone, payment details) is sent to Bookinda's servers, not to your WordPress site. The plugin does not collect or store visitor data on the WordPress site.

**What is received from Bookinda:**

* The booking widget HTML, CSS, and JavaScript, served from the Bookinda CDN.
* postMessage events containing booking lifecycle data (completion confirmation, step changes, iframe height). The plugin re-broadcasts these as DOM CustomEvents on the host page.

**Service documentation:**

* Bookinda website: https://bookinda.hu
* Privacy Policy: https://bookinda.hu/adatkezeles
* Cookie Policy: https://bookinda.hu/cookie-szabalyzat
* Terms of Service: https://bookinda.hu/aszf
* Data deletion request: https://bookinda.hu/adatok-torlese

By installing and activating this plugin you acknowledge that visitor interactions with the embedded widget are subject to Bookinda's Privacy Policy and Terms of Service. Please review them and ensure your site's privacy notice reflects the data flow described above.

== Installation ==

1. Download the plugin zip from https://bookinda.hu/integracio/wordpress
2. In WordPress admin, go to **Plugins → Add New → Upload Plugin** and select the zip file.
3. Click **Install Now**, then **Activate**.
4. Go to **Settings → Bookinda** and enter your tenant slug.
5. Embed the widget anywhere using the Gutenberg block, Elementor widget, Classic editor button, or shortcode `[bookinda]`.

== Frequently Asked Questions ==

= Do I need a Bookinda account to use this plugin? =

Yes. The plugin embeds the Bookinda booking widget, which requires an active Bookinda account. You can sign up at https://bookinda.hu. The plugin itself is free.

= Is this plugin free? =

Yes. The plugin is licensed under GPLv2 or later and is free to use. There is no one-time purchase fee and no annual subscription cost for the plugin. A Bookinda SaaS account is required for the booking functionality (separate from the plugin).

= Where can I find my tenant slug? =

It is the prefix of your Bookinda URL: `https://YOUR-SLUG.bookinda.hu/manager/calendar`. The part before `.bookinda.hu` is your slug.

= What is sent to Bookinda's servers? =

When a visitor opens a page with the booking widget, their browser loads the booking iframe from `{your-slug}.bookinda.hu`. The plugin does not send data from your WordPress site to Bookinda. All visitor interactions (filling in name, email, payment) happen directly inside the iframe and are subject to Bookinda's Privacy Policy.

= Does the plugin track visitors? =

By default, no. The plugin only sends one analytics-only parameter to Bookinda (`source=wp-plugin`) so Bookinda can identify WordPress plugin traffic on its own analytics.

The plugin can optionally fire a Google Analytics 4 or Meta Pixel `purchase` event when a booking completes, but only if you explicitly configure the GA4 measurement ID or Meta Pixel ID in the plugin settings, and only if the host page already loads `gtag` or `fbq` (the plugin does not load any tracking scripts itself).

= Inline or lightbox mode? =

**Lightbox** (recommended for most cases): a button on the page opens a fullscreen modal with the booking flow. Mobile-friendly because the iframe gets its own scroll context.

**Inline**: the iframe is embedded directly in the content. Good for dedicated booking pages.

= How do I update the plugin? =

Download the latest zip from https://bookinda.hu/integracio/wordpress, deactivate and delete the current plugin in WP-admin, then install the new zip. Your settings (slug, primary color, tracking IDs) are preserved across updates.

== Changelog ==

= 1.1.2 =
* Tested up to WordPress 7.0.
* Removed the manual load_plugin_textdomain() call. WordPress.org loads translations automatically for plugins hosted in the Plugin Directory.

= 1.1.1 =
* External Services disclosure section in readme (WordPress.org plugin guideline 6).
* Privacy Policy and Terms of Service links on settings page.
* Output escape audit on settings page (defense-in-depth).
* User-facing strings wrapped with `__()` / `esc_html__()` for i18n.
* Empty `/languages` folder + `.pot` template so the Domain Path declaration validates cleanly.
* Plugin name set to ASCII for the WordPress.org repository ("Bookinda Booking Widget").
* Tested up to WordPress 6.7.

= 1.1.0 =
* New: Gutenberg block ("Bookinda Foglalás") with sidebar InspectorControls for every parameter.
* New: Classic editor (TinyMCE) toolbar button with shortcode-inserting dialog.
* New: Host-side DOM events (`bookinda:complete`, `bookinda:error`, `bookinda:step`, `bookinda:resize`).
* New: GA4 + Meta Pixel auto-purchase tracking via plugin settings.

= 1.0.0 =
* Initial release. Shortcode + Elementor widget + lightbox modal mode.

== Upgrade Notice ==

= 1.1.2 =
WordPress.org Plugin Check compliance: Tested up to 7.0 and removed redundant text domain loader. Recommended upgrade.

= 1.1.1 =
WordPress.org compliance pass: external services disclosure, escape audit, i18n improvements. Recommended upgrade.

== Screenshots ==

1. Elementor widget settings, Content tab.
2. Lightbox modal on mobile.
3. Inline mode iframe on a page.
4. Plugin settings page with Bookinda tenant slug and optional tracking configuration.
