Changeset 3288448
- Timestamp:
- 05/06/2025 12:46:57 PM (7 months ago)
- Location:
- wp-hotelier/trunk
- Files:
-
- 9 edited
-
hotelier.php (modified) (2 diffs)
-
includes/admin/meta-boxes/views/reservation/html-meta-box-reservation-single-item.php (modified) (1 diff)
-
includes/class-htl-info.php (modified) (3 diffs)
-
includes/htl-extra-functions.php (modified) (1 diff)
-
includes/privacy/class-htl-privacy.php (modified) (3 diffs)
-
languages/wp-hotelier.pot (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
templates/booking/reservation-table-extras.php (modified) (1 diff)
-
templates/reservation/item-extras.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-hotelier/trunk/hotelier.php
r3239349 r3288448 4 4 * Plugin URI: https://wphotelier.com/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=wphotelierplugin 5 5 * Description: Hotel booking plugin for WordPress. 6 * Version: 2.1 4.46 * Version: 2.15.0 7 7 * Author: WP Hotelier 8 8 * Author URI: https://wphotelier.com/ 9 9 * Requires at least: 4.0 10 * Tested up to: 6. 610 * Tested up to: 6.8 11 11 * License: GPLv3 12 12 * License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 32 32 * @var string 33 33 */ 34 public $version = '2.1 4.4';34 public $version = '2.15.0'; 35 35 36 36 /** -
wp-hotelier/trunk/includes/admin/meta-boxes/views/reservation/html-meta-box-reservation-single-item.php
r2575390 r3288448 125 125 <?php foreach ( $extras as $extra_id => $extra_data ) : ?> 126 126 <?php 127 $extra_id = apply_filters( 'translate_object_id', $extra_id, 'extra', true ); 127 128 $extra = htl_get_extra( $extra_id ); 128 129 $extra_qty = isset( $extra_data['qty'] ) ? $extra_data['qty'] : 1; -
wp-hotelier/trunk/includes/class-htl-info.php
r1974323 r3288448 106 106 107 107 /** 108 * Gets hotel checkinhours.108 * Helper function to format hotel hours. 109 109 * 110 * @return string 110 * @param array $hours The hours settings array 111 * @param string $filter_name The name of the filter to apply 112 * @return string Formatted time string 111 113 */ 112 public static function get_hotel_checkin() { 113 $checkin = htl_get_option( 'hotel_checkin', array() ); 114 $from = isset( $checkin[ 'from' ] ) ? $checkin[ 'from' ] : 0; 115 $to = isset( $checkin[ 'to' ] ) ? $checkin[ 'to' ] : 0; 114 private static function format_hotel_hours( $hours, $filter_name ) { 115 $from = isset( $hours['from'] ) ? $hours['from'] : 0; 116 $to = isset( $hours['to'] ) ? $hours['to'] : 0; 116 117 $formatted_from = $from > 24 ? $from - 25 : $from; 117 118 $formatted_from = sprintf( '%02d', $formatted_from ); … … 120 121 $formatted_to = sprintf( '%02d', $formatted_to ); 121 122 $formatted_to .= $to > 24 ? ':30' : ':00'; 123 124 // Check if from and to times are the same 125 if ( $from === $to ) { 126 $formatted_hours = date_i18n( get_option( 'time_format' ), strtotime( $formatted_from ) ); 127 } else { 128 $formatted_hours = date_i18n( get_option( 'time_format' ), strtotime( $formatted_from ) ) . ' - ' . date_i18n( get_option( 'time_format' ), strtotime( $formatted_to ) ); 129 } 122 130 123 $hotel_checkin = date_i18n( get_option( 'time_format' ), strtotime( $formatted_from ) ) . ' - ' . date_i18n( get_option( 'time_format' ), strtotime( $formatted_to ) ); 131 return apply_filters( $filter_name, $formatted_hours, $from, $to ); 132 } 124 133 125 return apply_filters( 'hotelier_get_hotel_checkin', $hotel_checkin, $from, $to ); 134 /** 135 * Gets hotel checkin hours. 136 * 137 * @return string 138 */ 139 public static function get_hotel_checkin() { 140 $checkin = htl_get_option( 'hotel_checkin', array() ); 141 return self::format_hotel_hours( $checkin, 'hotelier_get_hotel_checkin' ); 126 142 } 127 143 … … 132 148 */ 133 149 public static function get_hotel_checkout() { 134 $checkout = htl_get_option( 'hotel_checkout', array() ); 135 $from = isset( $checkout[ 'from' ] ) ? $checkout[ 'from' ] : 0; 136 $to = isset( $checkout[ 'to' ] ) ? $checkout[ 'to' ] : 0; 137 $formatted_from = $from > 24 ? $from - 25 : $from; 138 $formatted_from = sprintf( '%02d', $formatted_from ); 139 $formatted_from .= $from > 24 ? ':30' : ':00'; 140 $formatted_to = $to > 24 ? $to - 25 : $to; 141 $formatted_to = sprintf( '%02d', $formatted_to ); 142 $formatted_to .= $to > 24 ? ':30' : ':00'; 143 $hotel_checkout = date_i18n( get_option( 'time_format' ), strtotime( $formatted_from ) ) . ' - ' . date_i18n( get_option( 'time_format' ), strtotime( $formatted_to ) ); 144 145 return apply_filters( 'hotelier_get_hotel_checkout', $hotel_checkout, $from, $to ); 150 $checkout = htl_get_option( 'hotel_checkout', array() ); 151 return self::format_hotel_hours( $checkout, 'hotelier_get_hotel_checkout' ); 146 152 } 147 153 -
wp-hotelier/trunk/includes/htl-extra-functions.php
r3076051 r3288448 48 48 ); 49 49 50 $extras = apply_filters( 'hotelier_get_all_extras_ids', $extras ); 51 50 52 set_transient( 'hotelier_extras_ids', $extras, DAY_IN_SECONDS * 30 ); 51 53 -
wp-hotelier/trunk/includes/privacy/class-htl-privacy.php
r1882581 r3288448 6 6 * @category Class 7 7 * @package Hotelier/Classes 8 * @version 1.6.08 * @version 2.15.0 9 9 */ 10 10 … … 42 42 include_once 'class-htl-privacy-exporters.php'; 43 43 44 $this->init();44 add_action( 'init', array( $this, 'init' ) ); 45 45 } 46 46 … … 48 48 * Hook in events. 49 49 */ 50 p rotectedfunction init() {50 public function init() { 51 51 add_filter( 'wp_privacy_personal_data_exporters', array( $this, 'register_exporters' ), 5 ); 52 52 add_filter( 'wp_privacy_personal_data_erasers', array( $this, 'register_erasers' ) ); -
wp-hotelier/trunk/languages/wp-hotelier.pot
r3239349 r3288448 2156 2156 msgstr "" 2157 2157 2158 #: ../includes/htl-extra-functions.php:13 72158 #: ../includes/htl-extra-functions.php:139 2159 2159 msgid "This extra does not exists." 2160 2160 msgstr "" 2161 2161 2162 #: ../includes/htl-extra-functions.php:14 72162 #: ../includes/htl-extra-functions.php:149 2163 2163 msgid "This extra is not enabled." 2164 2164 msgstr "" … … 4601 4601 msgstr "" 4602 4602 4603 #: ../includes/admin/meta-boxes/views/reservation/html-meta-box-reservation-single-item.php:15 04603 #: ../includes/admin/meta-boxes/views/reservation/html-meta-box-reservation-single-item.php:151 4604 4604 msgid "This room does not exist anymore" 4605 4605 msgstr "" -
wp-hotelier/trunk/readme.txt
r3239349 r3288448 3 3 Tags: booking, hotel, booking system, hostel, reservations, reservations, b&b, rooms, wphotelier 4 4 Requires at least: 4.1 5 Tested up to: 6. 76 Stable tag: 2.1 4.45 Tested up to: 6.8 6 Stable tag: 2.15.0 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 131 131 == Changelog == 132 132 133 = 2.15.0 - 2025-05-06 = 134 * Add - Support for WordPress 6.8. 135 * Fix - PHP warning for text domain not loaded correctly. 136 133 137 = 2.14.4 - 2025-02-12 = 134 138 * Fix - Reservation tables not showing correct info for paid deposits. -
wp-hotelier/trunk/templates/booking/reservation-table-extras.php
r2575390 r3288448 18 18 <?php foreach ( $extras as $extra_id => $extra_data ) : ?> 19 19 <?php 20 $extra_id = apply_filters( 'translate_object_id', $extra_id, 'extra', true ); 20 21 $extra = htl_get_extra( $extra_id ); 21 22 $extra_qty = isset( $extra_data['qty'] ) ? $extra_data['qty'] : 1; -
wp-hotelier/trunk/templates/reservation/item-extras.php
r2575390 r3288448 31 31 <?php foreach ( $extras as $extra_id => $extra_data ) : ?> 32 32 <?php 33 $extra_id = apply_filters( 'translate_object_id', $extra_id, 'extra', true ); 33 34 $extra = htl_get_extra( $extra_id ); 34 35 $extra_qty = isset( $extra_data['qty'] ) ? $extra_data['qty'] : 1;
Note: See TracChangeset
for help on using the changeset viewer.