=== Winevizer ===
Contributors: winevizer
Tags: wine, menu, restaurant, winelist, winecard
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display your Winevizer digital wine card on your WordPress site via a shortcode, a Gutenberg block or a classic widget.

== Description ==

Winevizer is a digital wine card solution for restaurants, bars and wine shops. This plugin lets you embed your own
Winevizer card into your WordPress website. Three integration methods are supported, all driven by a single global
configuration (no settings to repeat on each page):

* Shortcode: `[winevizer]`
* Gutenberg block: "Carte Winevizer"
* Classic widget: "Carte Winevizer"

Four display types are available:

* **Inline HTML (recommended)** — the card is rendered server-side by Winevizer and injected directly into your page.
  Best for SEO (search engines index the wines), no JavaScript required.
* **Inline HTML — Mosaic** — visual browsing by color (click a color, then a wine image, then the detail view),
  also server-rendered.
* **Iframe — Digital card** — the interactive Winevizer app embedded in an iframe.
* **Iframe — PDF** — the printable PDF version embedded in an iframe.

You configure everything from **Settings → Winevizer**: enter the email of your Winevizer account, pick the
establishment you want to display, and choose the default display type and height.

This plugin connects to the Winevizer service to retrieve your card. See **External services** below.

== External services ==

This plugin relies on the Winevizer service (https://www.winevizer.com), operated by Winevizer, to retrieve and
display your wine card. The plugin does not function without it, since the card content lives in your Winevizer
account. The following calls are made to the Winevizer API (`api.winevizer.com`) and content servers
(`resto.winevizer.com`):

* **When you configure the plugin or refresh the establishment list (admin only):** the account email you entered is
  sent to `https://api.winevizer.com/api/v1/shops` so the plugin can list the establishments linked to your account.
* **When a page containing the card is displayed (front-end):** a public, non-reversible token identifying the
  selected establishment is sent to Winevizer to fetch the rendered card. Depending on the chosen display type this is
  either the server-rendered HTML fragment (`https://api.winevizer.com/resto/api/e/{token}/embed.html`) or an iframe
  (`https://api.winevizer.com/embed/iframe/{token}` or `.../embed/pdf/{token}`). No visitor personal data is sent;
  only the establishment token is used.
* The card stylesheet and the small interactivity script are bundled with the plugin and served locally — they are
  **not** loaded from a remote server.

Data sent is limited to your account email (admin configuration) and the establishment token (page rendering).
By using this plugin you agree to the Winevizer terms and privacy practices:

* Terms / privacy: https://www.winevizer.com/cgu

The API base URLs can be overridden in `wp-config.php` (`WINEVIZER_API_URL`, `WINEVIZER_RESTO_URL`) for
staging/testing environments.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/winevizer` (or install the zip from the WordPress plugin page).
2. Activate the plugin.
3. Go to **Settings → Winevizer** and enter your Winevizer account email.
4. Pick the establishment you want to embed and choose the display type.
5. Insert `[winevizer]` in any post or page, or use the "Carte Winevizer" Gutenberg block or widget.

== Frequently Asked Questions ==

= Do I need a Winevizer account? =

Yes. The plugin displays a wine card that you manage in your Winevizer account. Enter the email of that account in
**Settings → Winevizer** to link your establishments.

= No establishment appears in the list. What should I do? =

Make sure you entered the same email used to create your Winevizer account, save again, then use the
"Refresh the establishment list" button. The list is cached for one hour.

= Does the plugin send any visitor data to Winevizer? =

No. On the front-end, only a public establishment token is sent to fetch the card. No visitor personal data is
collected or transmitted by the plugin. See **External services** above.

= Is the wine card good for SEO? =

Yes, if you use one of the "Inline HTML" display types: the card is rendered as real HTML in your page (including
structured data), so search engines can index your wines. The iframe types are interactive but less SEO-friendly.

== Changelog ==

= 1.3.0 =
* Security & WordPress.org compliance: the stylesheet and interactivity script are now bundled and served locally
  (no remote assets), embedded content is strictly sanitized, and no remote/inline JavaScript is executed.
* Added a documented "External services" section describing the data exchanged with the Winevizer service.
* Fixed the Mosaic display mode: view transitions (color → wines → detail) now work reliably.
* Added clean uninstall (removes the plugin settings and cached data).
* The classic widget now follows the global configuration like the block and shortcode.

= 1.2.0 =
* Added the Mosaic display mode and server-rendered (Inline HTML) embedding for better SEO.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.3.0 =
Recommended update: local assets, stronger security/sanitization, and a fix for the Mosaic display mode.
