Changeset 3352327
- Timestamp:
- 08/28/2025 10:12:34 PM (6 months ago)
- Location:
- reventor-calendar-appointment-booking
- Files:
-
- 31 added
- 6 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/LICENSE (added)
-
tags/1.0.2/assets (added)
-
tags/1.0.2/assets/css (added)
-
tags/1.0.2/assets/css/admin.css (added)
-
tags/1.0.2/assets/css/frontend.css (added)
-
tags/1.0.2/assets/css/index.php (added)
-
tags/1.0.2/assets/index.php (added)
-
tags/1.0.2/assets/js (added)
-
tags/1.0.2/assets/js/admin.js (added)
-
tags/1.0.2/assets/js/frontend.js (added)
-
tags/1.0.2/assets/js/index.php (added)
-
tags/1.0.2/includes (added)
-
tags/1.0.2/includes/class-admin.php (added)
-
tags/1.0.2/includes/class-caldav.php (added)
-
tags/1.0.2/includes/class-database.php (added)
-
tags/1.0.2/includes/class-frontend.php (added)
-
tags/1.0.2/includes/email-functions.php (added)
-
tags/1.0.2/includes/functions.php (added)
-
tags/1.0.2/includes/index.php (added)
-
tags/1.0.2/index.php (added)
-
tags/1.0.2/languages (added)
-
tags/1.0.2/languages/easy-calendar-appointment-booking-de_DE.mo (added)
-
tags/1.0.2/languages/easy-calendar-appointment-booking-de_DE.po (added)
-
tags/1.0.2/languages/easy-calendar-appointment-booking.pot (added)
-
tags/1.0.2/readme.txt (added)
-
tags/1.0.2/reventor-calendar-appointment-booking.php (added)
-
tags/1.0.2/templates (added)
-
tags/1.0.2/templates/admin-page.php (added)
-
tags/1.0.2/templates/booking-form.php (added)
-
tags/1.0.2/templates/index.php (added)
-
trunk/includes/class-admin.php (modified) (6 diffs)
-
trunk/includes/class-caldav.php (modified) (1 diff)
-
trunk/includes/email-functions.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/reventor-calendar-appointment-booking.php (modified) (1 diff)
-
trunk/templates/admin-page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
reventor-calendar-appointment-booking/trunk/includes/class-admin.php
r3352003 r3352327 58 58 register_setting('reventorcab_settings', 'reventorcab_date_format', ['sanitize_callback' => 'sanitize_text_field']); 59 59 register_setting('reventorcab_settings', 'reventorcab_show_credits', ['sanitize_callback' => [$this, 'sanitize_checkbox']]); 60 register_setting('reventorcab_settings', 'reventorcab_appointment_reminder', ['sanitize_callback' => [$this, 'sanitize_reminder_time']]); 60 61 } 61 62 … … 118 119 public function sanitize_checkbox($value) { 119 120 return !empty($value) ? 1 : 0; 121 } 122 123 public function sanitize_reminder_time($value) { 124 $valid_times = array('5', '10', '15', 'none'); 125 $value = sanitize_text_field($value); 126 return in_array($value, $valid_times, true) ? $value : 'none'; 120 127 } 121 128 … … 177 184 $timeslot_granularity = get_option('reventorcab_timeslot_granularity', 15); 178 185 $show_credits = get_option('reventorcab_show_credits', 0); 186 $appointment_reminder = get_option('reventorcab_appointment_reminder', 'none'); 179 187 180 188 include REVENTORCAB_PLUGIN_PATH . 'templates/admin-page.php'; … … 213 221 $timeslot_granularity = isset($_POST['timeslot_granularity']) ? intval($_POST['timeslot_granularity']) : 15; 214 222 $show_credits = isset($_POST['show_credits']) ? 1 : 0; 223 $appointment_reminder = isset($_POST['appointment_reminder']) ? sanitize_text_field(wp_unslash($_POST['appointment_reminder'])) : '10'; 215 224 // phpcs:enable WordPress.Security.NonceVerification.Missing 216 225 … … 223 232 update_option('reventorcab_date_format', $date_format); 224 233 update_option('reventorcab_timeslot_granularity', $timeslot_granularity); 234 update_option('reventorcab_appointment_reminder', $appointment_reminder); 225 235 226 236 return true; … … 508 518 'reventorcab_timezone' => $this->get_timezone_string(), 509 519 'reventorcab_time_format' => get_option('reventorcab_time_format', 'H:i'), 510 'reventorcab_date_format' => get_option('reventorcab_date_format', 'Y-m-d') 520 'reventorcab_date_format' => get_option('reventorcab_date_format', 'Y-m-d'), 521 'reventorcab_appointment_reminder' => get_option('reventorcab_appointment_reminder', '10') 511 522 ); 512 523 -
reventor-calendar-appointment-booking/trunk/includes/class-caldav.php
r3351939 r3352327 454 454 } 455 455 $ical_content .= "STATUS:CONFIRMED\r\n"; 456 457 // Add reminder if configured 458 $reminder_minutes = get_option('reventorcab_appointment_reminder', '10'); 459 if ($reminder_minutes !== 'none' && is_numeric($reminder_minutes)) { 460 $ical_content .= "BEGIN:VALARM\r\n"; 461 $ical_content .= "ACTION:DISPLAY\r\n"; 462 $ical_content .= "DESCRIPTION:Reminder for appointment\r\n"; 463 $ical_content .= "TRIGGER:-PT" . $reminder_minutes . "M\r\n"; 464 $ical_content .= "END:VALARM\r\n"; 465 } 466 456 467 $ical_content .= "END:VEVENT\r\n"; 457 468 $ical_content .= "END:VCALENDAR\r\n"; -
reventor-calendar-appointment-booking/trunk/includes/email-functions.php
r3352003 r3352327 162 162 $site_url = get_bloginfo('url'); 163 163 164 // Get reminder setting 165 $reminder_minutes = get_option('reventorcab_appointment_reminder', '10'); 166 164 167 // Get local timezone for conversion 165 168 $user_timezone = isset($appointment_data['user_timezone']) ? $appointment_data['user_timezone'] : null; … … 252 255 } 253 256 $ics_content .= "STATUS:CONFIRMED\r\n"; 257 258 // Add reminder if configured 259 if ($reminder_minutes !== 'none' && is_numeric($reminder_minutes)) { 260 $ics_content .= "BEGIN:VALARM\r\n"; 261 $ics_content .= "ACTION:DISPLAY\r\n"; 262 $ics_content .= "DESCRIPTION:Reminder for appointment\r\n"; 263 $ics_content .= "TRIGGER:-PT" . $reminder_minutes . "M\r\n"; 264 $ics_content .= "END:VALARM\r\n"; 265 } 266 254 267 $ics_content .= "END:VEVENT\r\n"; 255 268 $ics_content .= "END:VCALENDAR\r\n"; -
reventor-calendar-appointment-booking/trunk/readme.txt
r3352003 r3352327 4 4 Requires at least: 6.3 5 5 Tested up to: 6.8 6 Stable tag: 1.0. 16 Stable tag: 1.0.2 7 7 Requires PHP: 8.1 8 License: GPL v2 or later8 License: GPL v2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 … … 40 40 Yes, you can configure the available time slots and working days in the plugin settings. 41 41 42 == Screenshots ==43 44 1. Step 1 - Choose appointment type45 2. Step 2 - Select available time slot46 3. Step 3 - Book appointment47 48 42 == Changelog == 49 43 44 = 1.0.2 = 45 * Added appointment reminder feature 46 * Added configurable reminder time (5, 10, or 15 minutes) in admin settings 47 * Added VALARM component to ICS files for email notifications 48 * Added VALARM component to CalDAV events for admin calendar reminders 49 50 50 = 1.0.1 = 51 * Fixed CSS class names51 * Minor CSS fixes 52 52 53 53 = 1.0.0 = -
reventor-calendar-appointment-booking/trunk/reventor-calendar-appointment-booking.php
r3352003 r3352327 4 4 * Description: A REVENTOR calendar appointment booking system with CalDAV integration for seamless scheduling and calendar synchronization. 5 5 * Plugin URI: https://wordpress.org/plugins/reventor-calendar-appointment-booking/ 6 * Version: 1.0. 16 * Version: 1.0.2 7 7 * Author: REVENTOR 8 8 * Author URI: https://reventor.eu -
reventor-calendar-appointment-booking/trunk/templates/admin-page.php
r3352003 r3352327 158 158 </div> 159 159 160 <div class="reventorcab-field-group"> 161 <label for="appointment_reminder"><?php esc_html_e('Appointment Reminder', 'reventor-calendar-appointment-booking'); ?></label> 162 <select id="appointment_reminder" name="appointment_reminder"> 163 <option value="none" <?php selected($appointment_reminder, 'none'); ?>><?php esc_html_e('No reminder', 'reventor-calendar-appointment-booking'); ?></option> 164 <option value="5" <?php selected($appointment_reminder, '5'); ?>>5 <?php esc_html_e('minutes', 'reventor-calendar-appointment-booking'); ?></option> 165 <option value="10" <?php selected($appointment_reminder, '10'); ?> selected>10 <?php esc_html_e('minutes', 'reventor-calendar-appointment-booking'); ?></option> 166 <option value="15" <?php selected($appointment_reminder, '15'); ?>>15 <?php esc_html_e('minutes', 'reventor-calendar-appointment-booking'); ?></option> 167 </select> 168 <p class="description"><?php esc_html_e('Set a reminder time for appointments in calendar invitations. This will be included in the ICS file sent to customers and set for admin appointments.', 'reventor-calendar-appointment-booking'); ?></p> 169 </div> 170 160 171 </div> 161 172
Note: See TracChangeset
for help on using the changeset viewer.