# Adisistemak Booking Embed for ADI Camping

WordPress plugin that embeds the **ADI Camping** booking system from [www.adicamping.com](https://www.adicamping.com) via a Gutenberg block or shortcode. Visitors use the external booking UI in an iframe; WordPress does not store reservation data.

## Requirements

- WordPress 6.0+
- PHP 7.4+
- Access to the ADI Camping booking service (default embed URL included)

## Installation

1. Copy this folder to `wp-content/plugins/adisistemak-booking-for-adi-camping/` (main file: `adisistemak-booking-for-adi-camping.php`).
2. Activate **Adisistemak Booking Embed for ADI Camping**.
3. Optionally set **Booking URL** under **Settings → Adisistemak Booking** (defaults to production App URL).
4. Add the **Adisistemak Booking Embed for ADI Camping** block in the editor, or add `[adisistemak_booking]` to a page or post.

## Usage

Default embed URL:

`https://app.adicamping.com/public-reservation-booking?camp=camping-roble-verde-principal`

### Two ways to add the booking form

**Way 1 — Gutenberg block (recommended)**

1. Confirm the plugin is active under **Plugins**.
2. (Optional) Set the booking URL under **Settings → Adisistemak Booking**.
3. Edit a page → click **+** (or type `/`) → search **camping** or **booking**.
4. Select **Adisistemak Booking Embed for ADI Camping**.
5. In the sidebar, optionally set width, height, Booking URL, and Camp Slug.
6. Publish / Update, then **View Page** to see the live booking form.

The editor shows a placeholder; the iframe appears on the frontend.

**Way 2 — Shortcode**

1. Edit a page and add a Shortcode block (or paste into classic content).
2. Enter `[adisistemak_booking]`.
3. Optionally:

```
[adisistemak_booking height="1000px" width="100%" camp="your-camp-slug"]
[adisistemak_booking url="https://app.adicamping.com/public-reservation-booking" height="800px"]
```

4. Publish / Update and view the page.

Alias: `[adisistemak_booking_widget]` (same attributes).

| Attribute | Default | Notes |
|-----------|---------|--------|
| `width` | `100%` | `%`, `px`, `rem`, `em`, `vh`, `vw`, or `auto` |
| `height` | `600px` | same units |
| `url` | (settings) | HTTPS only; overrides the settings URL for this embed |
| `camp` | _(empty)_ | Added as `camp` query arg |

## External service

This plugin is serviceware: the visitor’s browser loads your configured booking page from ADI Camping’s infrastructure.

- Service: https://www.adicamping.com  
- Support: admin@adicamping.com  
- Terms / privacy: see https://www.adicamping.com  

## Development

Repo root is the plugin root. Use [Local](https://localwp.com/) or similar; copy or symlink into `wp-content/plugins/adisistemak-booking-for-adi-camping/`.

For WordPress.org packaging, exclude `.git`, `*.code-workspace`, and this `README.md` is optional (directory uses `readme.txt`).

## Project structure

```
adisistemak-booking-for-adi-camping/
├── adisistemak-booking-for-adi-camping.php
├── readme.txt
├── license.txt
├── uninstall.php
├── includes/
│   ├── class-adisistemak-booking-for-adi-camping-embed.php
│   └── class-adisistemak-booking-for-adi-camping-settings.php
├── blocks/adisistemak-booking-for-adi-camping/
│   ├── block.json
│   ├── index.js
│   ├── index.asset.php
│   └── render.php
└── assets/css/booking-embed.css
```

## License

GPLv2 or later. See `license.txt`.

Adisistemak Booking Embed for ADI Camping © Adisistemak
