=== REVENTOR Calendar Appointment Booking ===
Contributors: REVENTOR, alaminit
Tags: appointments, booking, calendar, scheduling
Requires at least: 6.3
Tested up to: 7.0
Stable tag: 1.2.2
Requires PHP: 8.1
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A simple and easy-to-use appointment booking plugin for WordPress with CalDAV integration, multi-calendar support, and timezone handling.

== Description ==

REVENTOR Calendar Appointment Booking is a WordPress plugin that allows you to manage appointments and bookings on your website. It provides a simple interface for customers to book appointments and for administrators to manage them.

== Features ==

= Booking Form =

* 3-step booking wizard: service selection, date & time picker, customer details
* Interactive calendar widget with month navigation
* Shortcode `[reventor-booking]` for any page or post
* Optional `calendar` attribute to target a specific calendar (e.g., `[reventor-booking calendar="cal_1"]`)

= Multi-Calendar Support =

* 1 to 10 independent calendars, each with its own settings
* Manage Calendars page to set the number of calendars and rename them
* Each calendar has its own working hours, appointment types, CalDAV integration, theme color, and email settings

= Appointment Types =

* Multiple configurable appointment types with custom name and duration (15, 30, 45, 60, 90, or 120 minutes)
* Max per day limit per appointment type to control availability
* Appointment type-specific date filtering with CalDAV conflict checking

= Time Slot Settings =

* Timeslot granularity: 15, 30, 60, 75, 90, or 120 minutes
* Working hours: configurable start and end time
* Break times: configurable start and end time
* Working days: select which days of the week are available (Mon–Sun)
* Minimum booking advance time: 1h, 2h, 4h, next day, up to 7 days
* Administration buffer time: 15, 30, 45, or 60 minutes blocked after each appointment
* Max appointments per day (global and per-type limits)

= CalDAV Integration =

* Configurable CalDAV URL, username, and password
* Connection test button to verify settings
* Conflict checking against CalDAV server events
* Events synced with CalDAV calendar on booking, update, and deletion
* Live schedule preview showing available, past, booked, and outside-hours slots for any date

= Email Notifications =

* Customer confirmation email with appointment details
* Admin notification email for new and updated appointments
* ICS file attachment for calendar import
* Configurable sender name and email address
* Available in German and English (auto-detected from browser language)

= Video Meeting Integration =

* Automatic Jitsi Meet room generation for every appointment
* Meeting URL included in emails, ICS attachments, and CalDAV events

= Appointment Reminders =

* Configurable reminder time: none, 5, 10, 15, 30, or 60 minutes before appointment
* Reminders included in ICS file attachments and CalDAV events

= Timezone =

* Plugin-level timezone setting with all IANA timezone identifiers
* Automatic user timezone detection
* Timezone display with human-readable names and DST info
* Live timezone and time display in admin

= General Settings =

* Booking days ahead (1–365)
* Theme color picker for the entire booking form UI
* Time format: 12h or 24h
* Date format: DD.MM.YYYY, MM/DD/YYYY, YYYY-MM-DD, DD/MM/YYYY
* Custom CSS field for frontend booking form styling
* Dark mode support
* Responsive layout for all screen sizes

= Import & Export =

* Export all settings to a JSON file
* Import settings from a JSON file with validation

= Localization =

* German translation included
* Translation-ready with .pot template file

= Uninstall Cleanup =

* Deactivation clears all plugin cache
* Uninstall (plugin deletion) removes all settings and database tables

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/reventor-calendar-appointment-booking` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Use the Settings->REVENTOR Calendar Appointment Booking screen to configure the plugin

== Frequently Asked Questions ==

= How do I display the booking form? =

Use the shortcode [reventor-booking] to display the booking form on any page or post. For multi-calendar setups, use [reventor-booking calendar="cal_1"] to target a specific calendar.

= Can I customize the available time slots? =

Yes, you can configure timeslot granularity, working hours, break times, working days, and per-type limits in the plugin settings.

= Does the plugin support multiple calendars? =

Yes, you can configure up to 10 independent calendars, each with its own settings, working hours, appointment types, and CalDAV integration.

= Is timezone handling supported? =

Yes, the plugin detects the user's timezone automatically and converts all times between the user's timezone and the configured plugin timezone. This includes time slot display, CalDAV operations, and booking confirmation.

= Can I style the booking form to match my theme? =

Yes, you can set a theme color that dynamically generates the entire UI, and you can add custom CSS for further styling. Dark mode is also supported automatically.

== Changelog ==

= 1.2.2 =
* Fixed CalDAV HTTP 415 (UnsupportedMediaType) error when customer notes contained line breaks - iCalendar text is now properly escaped and folded per RFC 5545
* Fixed notification emails always sending in English - now respects WordPress site language (in addition to browser language) and the language file path was corrected
* Added "Admin Notification Recipient" setting and `reventorcab_admin_notification_recipients` filter for a separate admin notification address
* Added "Disable video meeting integration" setting and `reventorcab_video_meeting_enabled` filter to omit Jitsi meeting URLs from emails, ICS attachments, and CalDAV events
* Added `reventorcab_email_language` filter to force the notification email language
* Removed misleading "Online Meeting" LOCATION from ICS/CalDAV events when no video meeting is configured

= 1.2.1 =
* Fixed CalDAV HTTP 415 (UnsupportedMediaType) error when customer notes contained line breaks - iCalendar text is now properly escaped and folded per RFC 5545
* Fixed notification emails always sending in English - now respects WordPress site language (in addition to browser language) and the language file path was corrected
* Added "Admin Notification Recipient" setting and `reventorcab_admin_notification_recipients` filter for a separate admin notification address
* Added "Disable video meeting integration" setting and `reventorcab_video_meeting_enabled` filter to omit Jitsi meeting URLs from emails, ICS attachments, and CalDAV events
* Added `reventorcab_email_language` filter to force the notification email language
* Removed misleading "Online Meeting" LOCATION from ICS/CalDAV events when no video meeting is configured

= 1.2.0 =
* Added multi-calendar support for managing multiple calendars with individual settings

= 1.1.5 =
* Added administration buffer time option (15, 30, 45, 60 minutes) to block time after appointments
* Fixed responsive booking form layout for narrow and embedded containers using CSS container queries
* Improved calendar positioning on all screen sizes

= 1.1.4 =
* Enhanced frontend slot management and date availability checks
* Refactored code structure for improved readability and maintainability
* Added uninstall hook and enhanced deactivation process to clean up plugin data
* Refactored code style and optimized translation loading
* Added cache clearing functionality for improved performance
* Fixed duplicate settings registrations

= 1.1.3 =
* Added Break times feature

= 1.1.2 =
* Added automated scrolling to the form to make it easier to see the form fields in all 3 steps
* Added email notification copy to sender email for new appointments

= 1.1.1 =
* Fixed a language translation
* Tested the plugin for WordPress 6.9

= 1.1.0 =
* Added automatic saving in admin settings
* Changed dropdown to calendar for easier date selection

= 1.0.2 =
* Added appointment reminder feature
* Added configurable reminder time (5, 10, or 15 minutes) in admin settings
* Added VALARM component to ICS files for email notifications
* Added VALARM component to CalDAV events for admin calendar reminders

= 1.0.1 =
* Minor CSS fixes

= 1.0.0 =
* Initial release
* Basic appointment booking functionality
* Admin dashboard
* Email notifications
* CalDAV integration support
