=== SyncBooking ===
Tags: booking, hotel, BNB, vacation, reservations  
Requires at least: 5.0  
Tested up to: 7.0  
Stable tag: 1.44.0
Requires PHP: 7.2  
Contributors: automaticbnb  
License: GPLv2 or later  
License URI: http://www.gnu.org/licenses/gpl-2.0.html  

SyncBooking simplifies hotel and BNB reservations with a real-time availability calendar and WooCommerce integration.

== Description ==

SyncBooking simplifies hotel and BNB reservations with a real-time availability calendar and WooCommerce integration.

== External Services ==

This plugin connects to external services to validate API keys, retrieve booking data, render UI assets and provide media functionality.

1. **SyncBooking API**  
   Used to send email reminders or retrieve booking details.  

   * **What**: API service to send messages or retrieve bookings  
   * **Data sent**: User email address and booking code  
   * **When**: When a user clicks the “Send Email” or “Retrieve Booking” button  
   * **Where**: `https://booking.syncbooking.com/api-send-email/`  
   * **Provider**: SyncBooking.com  
   * **Terms**: <https://syncbooking.com/terms>  
   * **Privacy**: <https://syncbooking.com/privacy>  

2. **Webflow Fonts**  
   Loads UI font resources (base64-embedded) exported from Webflow.  

   * **What**: Font files only (no user data)  
   * **Data sent**: None – fonts are embedded locally  
   * **When**: On pages using Webflow-styled components  
   * **Provider**: Webflow Inc.  
   * **Terms**: <https://webflow.com/legal/terms>  
   * **Privacy**: <https://webflow.com/legal/privacy>  

3. **Cloudflare Turnstile**  
   Provides CAPTCHA protection for forms built with Webflow components.  

   * **What**: CAPTCHA JavaScript (`https://challenges.cloudflare.com/turnstile/v0/api.js`)  
   * **Data sent**: IP address and browser metadata for anti-bot analysis  
   * **When**: When a form protected by Turnstile is displayed or submitted  
   * **Provider**: Cloudflare Inc.  
   * **Terms**: <https://www.cloudflare.com/terms/>  
   * **Privacy**: <https://www.cloudflare.com/privacypolicy/>  

4. **Google IMA SDK**  
   Enables ad-supported video playback inside the bundled Plyr player.  

   * **What**: Loads ad SDK script (`https://imasdk.googleapis.com/js/sdkloader/ima3.js`)  
   * **Data sent**: IP address and basic interaction data when videos are played  
   * **When**: Only when a video using IMA ads is loaded or played  
   * **Provider**: Google LLC  
   * **Terms**: <https://policies.google.com/terms>  
   * **Privacy**: <https://policies.google.com/privacy>  

These services are essential for core plugin features.  
No personal data is transmitted unless triggered by explicit user actions (e.g., submitting a form or playing a video).

== Source Code ==

This plugin bundles both custom and third-party JavaScript files.  
For compliance with WordPress.org guidelines, the original (non-minified) source is included or referenced.

**Third-party library**

* `php/theme-sync/js/webfont.js` → Web Font Loader v1.6.26  
  * License: Apache 2.0 (see file header)  

**Webflow-generated assets**

* `php/theme-sync/js/webflow.js` & `php/theme-sync/js/webflow-touch.js`
  * Exported from Webflow.com
  * Original versions: `webflow-uncompressed.js`, `webflow-touch-uncompressed.js`

**Custom scripts**

* `php/bar-sync/js/bar.js` – booking bar (date-range calendar + submit), custom, not minified.

No build tools (npm, webpack, etc.) are required to use or extend this plugin.
Developers may edit the provided readable source files directly.

== Changelog ==

= 1.44.0 =
* Big cleanup of php/theme-sync: removed the old Webflow CSS (normalize, webflow, booking-8aa063), the Webflow/webfont JS and ~90 unused bundled images. The booking/manage pages now load only the theme01 assets (downloaded site.css + theme01 skin + bk- styles) and the functional scripts (flatpickr, glightbox, calendar, next, send-email, mobile menu). Header cleaned of Webflow markup; favicon/og:image now use the structure logo.

= 1.43.0 =
* Search results now styled with the exact theme01 bk- classes (paired with the api-search backend update): room cards, info sections, tabs and empty state. The results no longer depend on the old Webflow CSS for styling.

= 1.42.0 =
* Cleanup: removed unused legacy chrome includes (navbar-wrapper, fixed-wrapper, header_functions) no longer referenced after the theme01 header/footer.

= 1.41.0 =
* Booking page rebuilt to match the theme01 mockup exactly: bk- search bar, bk- gallery grid and bk- page styles, on top of the theme header/footer. The results area (bk-page) is filled by the api-search backend.

= 1.40.0 =
* Theme assets: the download section is now a sub-page of the SyncBooking menu (not a separate menu). More robust download (longer time limit, wp_remote_get fallback) and the real error message is shown when it fails.

= 1.39.0 =
* New "SyncBooking Tema" admin page that downloads the theme CSS/JS from the remote assets.zip into uploads/syncbooking-theme01/ (images skipped) and auto-refreshes it twice a day when the remote zip changes. The booking page now loads site.css from there (falls back to the bundled copy).

= 1.38.0 =
* Booking & manage pages now use the exact theme01 header and footer (real site.css), populated with the structure's own logo, menu items and socials. Added the theme fonts (Cormorant Garamond + Jost) and a mobile menu drawer.

= 1.37.0 =
* Results polish: strip stray PHP notices from the backend response, stop a horizontal scrollbar caused by the offers slider, hide the Webflow form status messages and the duplicate mobile amenities row.

= 1.36.0 =
* Fix: the booking page search now calls the new backend endpoint (/api-search) instead of the retired /search/ (which returned 404, so no results showed). Availability calendar unchanged.

= 1.35.0 =
* Booking page: the whole section after the gallery (accommodation results, info sections and support) now comes entirely from the api-search backend; the plugin only provides the container. Added theme01 styling for the injected results (room cards, prices, amenities, info sections).

= 1.34.0 =
* Fix: the booking/manage page header was oversized (a CSS class-name collision made the "Manage Booking" link inherit the page-wrapper min-height). Renamed the wrapper class. Tidier footer (hide empty social links, show structure name).

= 1.33.0 =
* Compatibility: tested up to WordPress 7.0.

= 1.32.0 =
* Refreshed plugin admin UI (theme01 palette): cleaner cards, tabs and buttons in the SyncBooking accent colour. Settings and behaviour unchanged.

= 1.31.0 =
* New "Manage booking" page design (theme01): clean centred card with the email-retrieve form, matching header/footer. Same fields and behaviour (enter the booking email to receive the reservation details).

= 1.30.0 =
* New booking page design (theme01): refreshed header/footer, search bar, structure gallery, two-column layout with a sticky customer-support sidebar. Typography and colours follow the structure brand.
* Search, availability calendar (flatpickr) and the booking flow are unchanged: the page keeps the same fields (structure, dates, houses, guests) and still loads the availability results into the page.

= 1.29.0 =
* New booking bar design (theme01): date-range calendar, refreshed typography and layout.
* The bar now follows each structure's brand colour and no longer bundles the Webflow CSS/JS (lighter footprint on the host site).
* Functionality unchanged: it still submits arrival, nights, houses, guests and kids to the booking page.

= 1.28.0 =
* Asset cache-busting aligned with the plugin version.