=== RentProg – Booking Form ===
Contributors: rentprog
Tags: booking, rental, car rental, form, widget
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed the RentProg booking form into WordPress pages using a shortcode and settings panel. Supports all widget parameters, including CSS classes and “human-friendly” lists instead of JSON.

== Description ==
RentProg Booking Form lets you embed a booking widget via the `[rentprog_bf_widget]` shortcode or a settings page. It supports all widget parameters, including human-friendly list inputs as well as raw JSON.

- Fully localized (`rentprog-booking-form` text domain), with English and Russian included.
- Uses the WordPress Settings API with proper capability checks and nonces.
- Escapes output and sanitizes input.
- Compatible with PHP 7.4–8.3.

**Shortcode**

Basic:
`[rentprog_bf_widget]`

With overrides (examples):
```
[rentprog_bf_widget show_email="true" email_required="true" button_classes="bg-blue-600 text-white"]
[rentprog_bf_widget places='[{"place":"Office","price":0},{"place":"Airport","price":800}]']
[rentprog_bf_widget equipment='[{"item":"Navigator","price":500,"daily":false}]']
```

== Installation ==
1. Upload the plugin files to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **Settings → RentProg Form** to configure.

== Frequently Asked Questions ==
= How do I change the form language? =
The form follows your site language (Settings → General → Site Language). You can also set `locale="en|ru"` inside the shortcode.

== Screenshots ==
1. Settings screen
2. Frontend widget

== Changelog ==
= 1.1.5 - 2026-12-13 =
* Initial public release.

== Privacy ==
This plugin itself does not track users and does not send telemetry. If you enable the booking widget with a valid API token, the widget communicates with RentProg servers to display availability and process bookings. Optionally, if you enter a Yandex.Metrika ID in settings, the widget may emit events to your configured Yandex.Metrika property.

== External Services ==

The plugin embeds an external widget provided and maintained by RentProg (https://rentprog.ru). The external widget may call or contact third parties:

* ip2c.org — used to detect user's country from IP address.
* Google reCAPTCHA — used to protect forms from spam.
* RentProg API — used to fetch availability and submit booking requests.

What data may be sent:
* IP address (for IP-to-country lookups),
* browser geolocation (only if the user grants permission),
* booking details (name, phone, email, dates) — sent to RentProg API to create reservations.

If the user denies geolocation permission or location cannot be determined, a configurable default location (from plugin settings) is used.

Terms & Privacy:
* Terms of Use: https://rentprog.ru/ru/agreement
* Privacy Policy: https://rentprog.ru/ru/privacy
* Google reCAPTCHA: https://policies.google.com/privacy

== How it works ==
The plugin registers a shortcode `[rentprog_bf_widget]` that renders a booking widget powered by RentProg.
The plugin includes the required JavaScript and CSS assets locally.
When the shortcode is rendered on the frontend, the embedded RentProg widget
communicates directly with RentProg servers to display availability
and process bookings.
All form interactions and data exchanges happen directly between the widget and RentProg’s API endpoints.

