=== SMTech Turf Booking Manager ===
Contributors: smtech
Tags: booking, turf, sports, reservations, scheduling
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 7.9.41
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turf booking management for WordPress with sports, locations, rates, booking forms, closed dates, reports and email notifications.

== Description ==

SMTech Turf Booking Manager provides a self-contained turf and sports-court booking workflow. It includes an administrator dashboard, booking management, configurable time-based rates, frontend booking forms, blackout dates, reports and customizable email notifications.

The plugin stores booking data in the site's WordPress database and does not require a third-party SaaS account. Optional SMTP and externally hosted email-logo URLs are configured by the site administrator.

== Features ==

* Frontend booking form with the `[smtbm_booking]` shortcode.
* Admin booking creation and booking management.
* Multiple locations, sports and lighting options.
* Time-based rate schedules by sport, location and day group.
* Rates calculated across multiple time bands when a booking crosses a rate boundary.
* Optional matrix-style rate configuration.
* Closed dates and closed date ranges.
* Configurable booking form fields.
* Frontend colour controls.
* Admin and customer email templates.
* Optional SMTP delivery configuration.
* Reports and analytics based on stored turf booking records.
* WordPress privacy-policy guidance and personal-data export/erasure support.

== Installation ==

1. Go to **Plugins → Add New → Upload Plugin**.
2. Upload the plugin ZIP.
3. Activate **SMTech Turf Booking Manager**.
4. Open **Turf Booking** in the WordPress admin and complete the configuration.
5. Add `[smtbm_booking]` to the page where customers should book.

== Shortcode ==

Use `[smtbm_booking]` on the public booking page.

For an administrator booking form, the plugin also supports `[smtbm_booking admin_mode="1"]` in an appropriate admin-only context.

== Rate Management ==

The time-based configuration can contain multiple ranges for the same sport and location. For example:

* Monday-Friday, 06:00-12:00: 500/hour
* Monday-Friday, 12:00-16:00: 700/hour
* Monday-Friday, 16:00-23:00: 1000/hour

A booking spanning multiple ranges is calculated using the configured rate for each part of the booking.

== Privacy ==

Booking information can include customer name, mobile number, email address, booking date/time, sport, location, lighting, amount, status and additional form data configured by the site administrator. This information is stored in the site's WordPress database.

The plugin does not send booking data to an external analytics service by default. Optional SMTP configuration may transmit email through the configured mail provider. Email logos can be loaded from a URL selected by the administrator.

WordPress privacy tools can export or erase booking records matched by customer email address. Site owners are responsible for their privacy notice, lawful basis, retention policy and applicable laws.

== Security ==

Administrative operations use WordPress capability checks and nonces. User input is validated/sanitized and output is escaped. Database queries use WordPress database APIs and prepared statements where variable values are used. Frontend image uploads use the WordPress upload API with an explicit image MIME allowlist.

To report a security issue, contact the plugin maintainer privately rather than posting exploit details publicly.

== Frequently Asked Questions ==

= Which shortcode displays the booking form? =

Use `[smtbm_booking]`.

= Can prices change during a booking? =

Yes. Multiple configured time ranges are applied to the corresponding portions of the booking.

= Can I use different weekday and weekend prices? =

Yes. Configure separate weekday and weekend rate schedules.

= Can I close a range of dates? =

Yes. Use the closed-date settings to add individual dates or date ranges.

= Does the plugin require an external service? =

No. The core booking workflow runs in WordPress. SMTP is optional.

== Screenshots ==

1. Turf Booking admin dashboard.
2. Book a Slot admin interface.
3. Reports and Analytics dashboard.
4. Customize Booking settings.
5. Frontend booking form.

== Changelog ==

= 7.9.41 =
* Refined uninstall database cleanup annotations for WordPress.org Plugin Check compatibility.

= 7.9.14 =
* Hardened public admin-mode shortcode rendering and frontend image upload validation.
* Added stricter booking time/date configuration validation.
* Updated package version for the hardened release.

= 7.9.10 =
* Added WordPress.org-oriented licensing, security, privacy and documentation files.
* Added privacy-policy guidance and personal-data export/erasure handlers for booking records.
* Added a proper uninstall routine for plugin data.
* Hardened the Book a Slot CTA so its text and icon never receive underlines.
* Updated readme stable tag to match the plugin version.

= 7.9.9 =
* Removed unwanted button borders and standardized admin button hover behavior.
* Improved admin styling consistency.

