=== Testibox Widget ===
Contributors: testibox
Tags: testimonials, reviews, social proof, widget, gutenberg
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display your Testibox customer testimonials anywhere on your WordPress site via a shortcode or a Gutenberg block.

== Description ==

**Testibox** is a SaaS platform for collecting and displaying customer testimonials. This plugin lets you embed your approved testimonials on any WordPress page or post in seconds — no coding required.

**Features:**

* 🧩 Native **Gutenberg block** — drag, drop, configure
* 📋 **Shortcode** `[testibox]` — works in any page builder or classic editor
* 🎨 Four display layouts: **Grid**, **List**, **Carousel**, **Logos**
* ☀️ Light and 🌙 Dark themes
* 🎨 Custom accent colour
* ⚙️ Global defaults configurable from **Settings → Testibox**
* Per-block/shortcode overrides for all options
* Lightweight — loads the Testibox widget script only when the shortcode or block is present

**How it works:**

1. Create a free account at [testibox.fr](https://testibox.fr)
2. Create a project and collect testimonials via your unique collection link
3. Approve the testimonials you want to display
4. Copy your Project ID from the Testibox dashboard
5. Paste it into this plugin's settings or directly in the block/shortcode

== Installation ==

1. Upload the `testibox-widget` folder to `/wp-content/plugins/` or install via **Plugins → Add New**.
2. Activate the plugin.
3. Go to **Settings → Testibox** and enter your Project ID (found in your [Testibox dashboard](https://testibox.fr/dashboard)).
4. Insert the `[testibox]` shortcode or add the **Testibox — Témoignages** block in the Gutenberg editor.

== Frequently Asked Questions ==

= Where do I find my Project ID? =

Log in to your [Testibox dashboard](https://testibox.fr/dashboard), select your project, and copy the ID shown in the widget integration section.

= Can I display different projects on different pages? =

Yes. Use the `id` attribute in the shortcode or configure the Project ID per block:
`[testibox id="your-project-id" layout="carousel"]`

= What shortcode attributes are available? =

* `id` — Project UUID or slug
* `layout` — `grid` (default) | `list` | `carousel` | `logos`
* `theme` — `light` (default) | `dark`
* `max` — number of testimonials to display (1–50, default: 6)
* `color` — accent colour as a hex code (e.g. `#3b82f6`)
* `radius` — card corner radius in px (0–32, default: 12)

= Does it work with page builders (Elementor, Divi, etc.)? =

Yes. The `[testibox]` shortcode works anywhere WordPress shortcodes are supported.

= Is a Testibox account required? =

Yes. You need a free or paid Testibox account to collect and manage testimonials. Sign up at [testibox.fr](https://testibox.fr).

= Does this plugin store any data? =

No. This plugin only stores your display preferences (Project ID, layout, theme, colour) in WordPress options. All testimonial data is managed on the Testibox platform.

== External Services ==

This plugin loads an external JavaScript file and retrieves data from the Testibox platform in order to display testimonials on your site.

**What is loaded and when:**

* When a visitor views a page containing the `[testibox]` shortcode or the Testibox block, the plugin outputs a `<script>` tag that loads `widget.js` from `https://testibox.fr`. That script then fetches your approved testimonials from Testibox's database (hosted on Supabase) using a read-only public API key scoped to your project.
* No data originating from your WordPress site or your visitors is sent to Testibox's servers. Only your Project ID (which you configure) is transmitted as part of the data retrieval request.

**Third-party services used:**

* **Testibox** (`https://testibox.fr`) — testimonial management platform.
  [Terms of Service](https://testibox.fr/cgv) | [Privacy Policy](https://testibox.fr/confidentialite)
* **Supabase** (`https://supabase.com`) — database infrastructure used by Testibox.
  [Terms of Service](https://supabase.com/terms) | [Privacy Policy](https://supabase.com/privacy)

== Screenshots ==

1. Settings page — configure your default Project ID, layout, theme and colour.
2. Gutenberg block — real-time configuration in the block inspector panel.
3. Front-end grid layout on a sample page.
4. Front-end carousel layout.

== Changelog ==

= 1.1.0 =
* New `logos` layout — displays a compact list of client company badges.
* New `radius` shortcode attribute and Gutenberg block control to override card corner radius (0–32 px).
* `data-border-radius` attribute support added to `widget.js`.

= 1.0.0 =
* Initial release.
* Shortcode `[testibox]` with `id`, `layout`, `theme`, `max` and `color` attributes.
* Gutenberg block with inspector controls.
* Settings page under Settings → Testibox.
* Light and dark themes, grid / list / carousel layouts.

== Upgrade Notice ==

= 1.1.0 =
Adds `logos` layout and `radius` parameter. Fully backwards-compatible.

= 1.0.0 =
Initial release.
