Booking Calendar - Version 9.4.2

Version Description

  • Changes in all versions:
    • Fix. PHP Warning: Undefined variable $select_box_options in toolbar_ui.php on line 877 (9.4.2.1)
    • Fix. PHP Warning: foreach() argument must be of type array|object, null given in toolbar_ui.php on line 3296 (9.4.2.1)
    • Fix. Set delay in showing mouse over tooltips in 500 milliseconds (9.4.2.2)
  • Changes in Personal / Business Small / Business Medium / Business Large / MultiUser versions:
    • New. Ability to disable changing booking resource while editing a booking, belonging to child booking resource. If this option is not selected, the system updates the booking to the first available child booking resource based on the capacity and availability of the parent booking resource. (9.4.2.3)
Download this release

Release Info

Developer wpdevelop
Plugin Icon 128x128 Booking Calendar
Version 9.4.2
Comparing to
See all releases

Code changes from version 9.4.1 to 9.4.2

core/admin/wpbc-class-listing.php CHANGED
@@ -369,6 +369,7 @@ class WPBC_Booking_Listing_Table {
369
 
370
  // Edit
371
  $row_data['edit_booking_url'] = $this->url['add'] . '&booking_type=' . $row_data['resource'] . '&booking_hash=' . $row_data['hash'] . '&parent_res=1' ;
 
372
  make_bk_action( 'wpbc_booking_listing_button_edit', $row_data );
373
 
374
  // Change booking resource
369
 
370
  // Edit
371
  $row_data['edit_booking_url'] = $this->url['add'] . '&booking_type=' . $row_data['resource'] . '&booking_hash=' . $row_data['hash'] . '&parent_res=1' ;
372
+ $row_data['edit_booking_url'] .= ( 'Off' !== get_bk_option( 'booking_is_resource_no_update__during_editing' ) ) ? '&resource_no_update=1' : ''; //FixIn: 9.4.2.3
373
  make_bk_action( 'wpbc_booking_listing_button_edit', $row_data );
374
 
375
  // Change booking resource
core/any/emails_tpl/standard-html-tpl.php CHANGED
@@ -89,10 +89,11 @@ function wpbc_email_template_standard_html( $fields_values ) {
89
  line-height: 100%;
90
  vertical-align: middle;
91
  font-family: Helvetica, Roboto, Arial, sans-serif;
92
- <?php echo $base_color; ?>
93
  }
94
  .footer .inner {
95
  text-align: center;
 
96
  }
97
  .footer .inner p {
98
  font-size: 11px;
89
  line-height: 100%;
90
  vertical-align: middle;
91
  font-family: Helvetica, Roboto, Arial, sans-serif;
92
+ <?php echo $base_color; ?>
93
  }
94
  .footer .inner {
95
  text-align: center;
96
+ <?php //echo $base_color; ?>
97
  }
98
  .footer .inner p {
99
  font-size: 11px;
core/lib/wpbc-booking-new.php CHANGED
@@ -103,12 +103,13 @@ function wpdev_bk_insert_new_booking() {
103
 
104
  //FixIn: 6.1.1.9
105
  // Check situation when we have editing "child booking resource", so need to reupdate calendar and form to have it for parent resource.
106
- if ( ( function_exists( 'wpbc_is_this_child_resource') ) && ( wpbc_is_this_child_resource( $bktype ) ) ){
107
- $bk_parent_br_id = wpbc_get_parent_resource( $bktype );
108
-
109
- $is_edit_booking['booking_type'] = $bk_parent_br_id;
110
- $bktype = $bk_parent_br_id;
111
- }
 
112
  // End: 6.1.1.9
113
 
114
  }
@@ -149,7 +150,7 @@ function wpdev_bk_insert_new_booking() {
149
  $_POST["is_show_payment_form"] = 1;
150
 
151
  if ( isset( $_POST["is_send_emeils"] ) ) { //FixIn: 8.7.11.8
152
- $is_send_emeils = $_POST["is_send_emeils"];
153
  } else {
154
  $is_send_emeils = 1;
155
  }
103
 
104
  //FixIn: 6.1.1.9
105
  // Check situation when we have editing "child booking resource", so need to reupdate calendar and form to have it for parent resource.
106
+ if ( strpos( $_SERVER['HTTP_REFERER'], 'resource_no_update' ) === false ) //FixIn: 9.4.2.3
107
+ if ( ( function_exists( 'wpbc_is_this_child_resource') ) && ( wpbc_is_this_child_resource( $bktype ) ) ){
108
+ $bk_parent_br_id = wpbc_get_parent_resource( $bktype );
109
+
110
+ $is_edit_booking['booking_type'] = $bk_parent_br_id;
111
+ $bktype = $bk_parent_br_id;
112
+ }
113
  // End: 6.1.1.9
114
 
115
  }
150
  $_POST["is_show_payment_form"] = 1;
151
 
152
  if ( isset( $_POST["is_send_emeils"] ) ) { //FixIn: 8.7.11.8
153
+ $is_send_emeils = intval( $_POST["is_send_emeils"] );
154
  } else {
155
  $is_send_emeils = 1;
156
  }
core/lib/wpdev-booking-class.php CHANGED
@@ -669,6 +669,7 @@ class wpdev_booking {
669
  // Check situation when we have editing "child booking resource", so need to reupdate calendar and form to have it for parent resource.
670
  if ( //FixIn: 6.1.1.9 //Fix:2016-10-12
671
  ( ! isset( $_GET['booking_pay'] ) )
 
672
  && ( function_exists( 'wpbc_is_this_child_resource' ) )
673
  && ( wpbc_is_this_child_resource( $my_boook_type ) )
674
  ){
669
  // Check situation when we have editing "child booking resource", so need to reupdate calendar and form to have it for parent resource.
670
  if ( //FixIn: 6.1.1.9 //Fix:2016-10-12
671
  ( ! isset( $_GET['booking_pay'] ) )
672
+ && ( ! isset( $_GET['resource_no_update'] ) ) //FixIn: 9.4.2.3
673
  && ( function_exists( 'wpbc_is_this_child_resource' ) )
674
  && ( wpbc_is_this_child_resource( $my_boook_type ) )
675
  ){
core/timeline/v2/wpbc-class-timeline_v2.php CHANGED
@@ -2705,6 +2705,7 @@ if(1)
2705
  $bk_hash = (isset( $bookings[$bk_id]->hash )) ? $bookings[$bk_id]->hash : '';
2706
  $bk_booking_type = $bookings[$bk_id]->booking_type;
2707
  $edit_booking_url = $bk_url_add . '&booking_type=' . $bk_booking_type . '&booking_hash=' . $bk_hash . '&parent_res=1';
 
2708
  $header_title .= '<a class=\'button button-secondary\'
2709
  title=\'' . esc_js( str_replace( "'", '', __( 'Edit', 'booking' ) ) ) . '\'
2710
  href=\'' . $edit_booking_url . '\' onclick=\'\' ><i class=\'wpbc_icn_draw\'></i></a>';
2705
  $bk_hash = (isset( $bookings[$bk_id]->hash )) ? $bookings[$bk_id]->hash : '';
2706
  $bk_booking_type = $bookings[$bk_id]->booking_type;
2707
  $edit_booking_url = $bk_url_add . '&booking_type=' . $bk_booking_type . '&booking_hash=' . $bk_hash . '&parent_res=1';
2708
+ $edit_booking_url .= ( 'Off' !== get_bk_option( 'booking_is_resource_no_update__during_editing' ) ) ? '&resource_no_update=1' : ''; //FixIn: 9.4.2.3
2709
  $header_title .= '<a class=\'button button-secondary\'
2710
  title=\'' . esc_js( str_replace( "'", '', __( 'Edit', 'booking' ) ) ) . '\'
2711
  href=\'' . $edit_booking_url . '\' onclick=\'\' ><i class=\'wpbc_icn_draw\'></i></a>';
core/wpbc-activation.php CHANGED
@@ -1366,6 +1366,8 @@ $mu_option4delete[]= 'booking_timeslot_picker_skin';
1366
  $mu_option4delete[]='booking_availability_based_on';
1367
  $default_options['booking_is_dissbale_booking_for_different_sub_resources'] = 'Off';
1368
  $mu_option4delete[]='booking_is_dissbale_booking_for_different_sub_resources';
 
 
1369
  $default_options['booking_search_form_show'] = str_replace( '\\n\\r', "\n", wpbc_get_default_search_form_template( 'flex' ) ); //FixIn:6.1.0.1 //FixIn: 8.5.2.11
1370
  $mu_option4delete[]='booking_search_form_show';
1371
  $default_options['booking_found_search_item'] = str_replace( '\\n\\r', "\n", wpbc_get_default_search_results_template( 'flex' ) ); //FixIn:6.1.0.1 //FixIn: 8.5.2.11
1366
  $mu_option4delete[]='booking_availability_based_on';
1367
  $default_options['booking_is_dissbale_booking_for_different_sub_resources'] = 'Off';
1368
  $mu_option4delete[]='booking_is_dissbale_booking_for_different_sub_resources';
1369
+ $default_options['booking_is_resource_no_update__during_editing'] = 'On'; //FixIn: 9.4.2.3
1370
+ $mu_option4delete[]='booking_is_resource_no_update__during_editing';
1371
  $default_options['booking_search_form_show'] = str_replace( '\\n\\r', "\n", wpbc_get_default_search_form_template( 'flex' ) ); //FixIn:6.1.0.1 //FixIn: 8.5.2.11
1372
  $mu_option4delete[]='booking_search_form_show';
1373
  $default_options['booking_found_search_item'] = str_replace( '\\n\\r', "\n", wpbc_get_default_search_results_template( 'flex' ) ); //FixIn:6.1.0.1 //FixIn: 8.5.2.11
css/calendar.css CHANGED
@@ -235,11 +235,11 @@ div.date-content-bottom{
235
  }
236
  .months_num_in_row_5 .datepick-one-month {
237
  flex: 1 1 20%;
238
- min-width:217px;
239
  }
240
  .months_num_in_row_6 .datepick-one-month {
241
  flex: 1 1 16.6666666666666%;
242
- min-width:217px;
243
  }
244
 
245
  /* STRUCTURE: Previous & Next month links */
235
  }
236
  .months_num_in_row_5 .datepick-one-month {
237
  flex: 1 1 20%;
238
+ min-width:203px;
239
  }
240
  .months_num_in_row_6 .datepick-one-month {
241
  flex: 1 1 16.6666666666666%;
242
+ min-width:169px;
243
  }
244
 
245
  /* STRUCTURE: Previous & Next month links */
includes/_toolbar_ui/toolbar_ui.php CHANGED
@@ -820,11 +820,12 @@ function wpbc_ajx__ui__booking_resources( $escaped_search_request_params, $defau
820
  */
821
  $resources_arr = wpbc_ajx_arrange_booking_resources_arr( $resources_sql_arr );
822
  $style = '';
 
823
  if ( ! empty( $resources_arr ) ) {
824
 
825
  $linear_resources_arr = $resources_arr['linear_resources'];
826
 
827
- $select_box_options = array();
828
 
829
  if ( count( $linear_resources_arr ) > 1 ) {
830
 
820
  */
821
  $resources_arr = wpbc_ajx_arrange_booking_resources_arr( $resources_sql_arr );
822
  $style = '';
823
+ $select_box_options = array(); //FixIn: 4.3.2.1
824
  if ( ! empty( $resources_arr ) ) {
825
 
826
  $linear_resources_arr = $resources_arr['linear_resources'];
827
 
828
+
829
 
830
  if ( count( $linear_resources_arr ) > 1 ) {
831
 
includes/page-availability/availability__class.php CHANGED
@@ -122,7 +122,7 @@ function wpbc_activation__dates_availability() {
122
  $charset_collate = ( ! empty( $wpdb->charset ) ) ? "DEFAULT CHARACTER SET $wpdb->charset" : '';
123
  $charset_collate .= ( ! empty( $wpdb->collate ) ) ? " COLLATE $wpdb->collate" : '';
124
 
125
- if ( ! wpbc_is_table_exists( 'booking_dates_prop' ) ) {
126
  $simple_sql = "CREATE TABLE {$wpdb->prefix}booking_dates_props (
127
  booking_dates_prop_id bigint(20) unsigned NOT NULL auto_increment,
128
  resource_id bigint(10) NOT NULL default 1,
122
  $charset_collate = ( ! empty( $wpdb->charset ) ) ? "DEFAULT CHARACTER SET $wpdb->charset" : '';
123
  $charset_collate .= ( ! empty( $wpdb->collate ) ) ? " COLLATE $wpdb->collate" : '';
124
 
125
+ if ( ! wpbc_is_table_exists( 'booking_dates_props' ) ) {
126
  $simple_sql = "CREATE TABLE {$wpdb->prefix}booking_dates_props (
127
  booking_dates_prop_id bigint(20) unsigned NOT NULL auto_increment,
128
  resource_id bigint(10) NOT NULL default 1,
includes/page-availability/availability__page.php CHANGED
@@ -37,9 +37,9 @@ class WPBC_Page_AJX_Availability extends WPBC_Page_Structure {
37
  //$_REQUEST['view_mode'] = 'availability';
38
  $tabs = array();
39
  $tabs[ 'availability' ] = array(
40
- 'title' => __( 'Booking Listing', 'booking' ) // Title of TAB
41
- , 'hint' => __( 'Booking Listing', 'booking' ) // Hint
42
- , 'page_title' => __( 'Booking Listing', 'booking' ) // Title of Page
43
  , 'link' => '' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
44
  , 'position' => '' // 'left' || 'right' || ''
45
  , 'css_classes' => '' // CSS class(es)
@@ -111,8 +111,8 @@ class WPBC_Page_AJX_Availability extends WPBC_Page_Structure {
111
  wp_nonce_field( 'wpbc_settings_page_' . $submit_form_name );
112
  ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php
113
 
114
- ///wpbc_ajx_booking_modify_container_show(); // Container for showing Edit ajx_booking and define Edit and Delete ajx_booking JavaScript vars.
115
-
116
  wpbc_ajx__ui__booking_sorting( $escaped_request_params_arr , wpbc_ajx_get__request_params__names_default( 'default' ) );
117
 
118
  ?><div class="wpbc_ajx_booking_pagination"></div><?php // Pagination container at head
@@ -121,7 +121,7 @@ class WPBC_Page_AJX_Availability extends WPBC_Page_Structure {
121
  $is_test_sql_directly = false;
122
  if ( ! $is_test_sql_directly ) {
123
 
124
- //$this->show_ajx_booking_listing_container_ajax( $escaped_request_params_arr );
125
 
126
  $this->show_pagination_container();
127
 
@@ -142,6 +142,44 @@ class WPBC_Page_AJX_Availability extends WPBC_Page_Structure {
142
  }
143
 
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
 
146
  private function show_pagination_container(){
147
  ?>
37
  //$_REQUEST['view_mode'] = 'availability';
38
  $tabs = array();
39
  $tabs[ 'availability' ] = array(
40
+ 'title' => __( 'Availability', 'booking' ) // Title of TAB
41
+ , 'hint' => __( 'Availability', 'booking' ) // Hint
42
+ , 'page_title' => __( 'Availability', 'booking' ) // Title of Page
43
  , 'link' => '' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
44
  , 'position' => '' // 'left' || 'right' || ''
45
  , 'css_classes' => '' // CSS class(es)
111
  wp_nonce_field( 'wpbc_settings_page_' . $submit_form_name );
112
  ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php
113
 
114
+ //wpbc_ajx_booking_modify_container_show(); // Container for showing Edit ajx_booking and define Edit and Delete ajx_booking JavaScript vars.
115
+ $this->test_design_directly();
116
  wpbc_ajx__ui__booking_sorting( $escaped_request_params_arr , wpbc_ajx_get__request_params__names_default( 'default' ) );
117
 
118
  ?><div class="wpbc_ajx_booking_pagination"></div><?php // Pagination container at head
121
  $is_test_sql_directly = false;
122
  if ( ! $is_test_sql_directly ) {
123
 
124
+ $this->show_ajx_booking_listing_container_ajax( $escaped_request_params_arr );
125
 
126
  $this->show_pagination_container();
127
 
142
  }
143
 
144
 
145
+ private function test_design_directly(){
146
+ ?>
147
+ <style type="text/css">
148
+ .wpbc_ajx_main_section {
149
+ display:flex;
150
+ flex-flow: row wrap;
151
+ justify-content: flex-start;
152
+ align-items: flex-start;
153
+ border:1px solid #9E0B0F;
154
+ }
155
+ .wpbc_ajx_left_sub_section {
156
+ flex: 1 1 auto;
157
+ background:#AECEE0;
158
+ margin: 5px;
159
+ }
160
+ .wpbc_ajx_right_sub_section {
161
+ flex: 0 1 200px;
162
+ margin:5px;
163
+ background:#99a7d1;
164
+ }
165
+ .my_cal{
166
+ width:300px;
167
+ height:300px;
168
+ background:#e9ac4d;
169
+ margin:5px auto;
170
+ }
171
+ </style>
172
+ <div class="wpbc_ajx_main_section">
173
+ <div class="wpbc_ajx_left_sub_section">
174
+ <div class="my_cal">Calendar</div>
175
+ </div>
176
+ <div class="wpbc_ajx_right_sub_section">
177
+ Tools
178
+ </div>
179
+ </div>
180
+ <?php
181
+ }
182
+
183
 
184
  private function show_pagination_container(){
185
  ?>
includes/page-bookings/bookings__actions.php CHANGED
@@ -2403,6 +2403,7 @@ function wpbc_ajax_WPBC_AJX_BOOKING_ACTIONS() {
2403
 
2404
  $edit_booking_url = 'admin.php?page=' . wpbc_get_new_booking_url( false, false)
2405
  . '&booking_type={{data.parsed_fields.resource_id}}&booking_hash={{data.parsed_fields.hash}}&parent_res=1' ;
 
2406
 
2407
  $params = array(
2408
  'type' => 'button',
2403
 
2404
  $edit_booking_url = 'admin.php?page=' . wpbc_get_new_booking_url( false, false)
2405
  . '&booking_type={{data.parsed_fields.resource_id}}&booking_hash={{data.parsed_fields.hash}}&parent_res=1' ;
2406
+ $edit_booking_url .= ( 'Off' !== get_bk_option( 'booking_is_resource_no_update__during_editing' ) ) ? '&resource_no_update=1' : ''; //FixIn: 9.4.2.3
2407
 
2408
  $params = array(
2409
  'type' => 'button',
js/wpbc_times.js CHANGED
@@ -248,7 +248,7 @@ function wpbc_prepare_tooltip_content( value, date_obj, resource_id ){
248
  maxWidth : 550,
249
  theme : 'wpbc-tippy-times',
250
  placement : 'top',
251
- delay : [400, 0],
252
  ignoreAttributes : true,
253
  touch : true, //['hold', 500], // 500ms delay //FixIn: 9.2.1.5
254
  appendTo: () => document.body,
248
  maxWidth : 550,
249
  theme : 'wpbc-tippy-times',
250
  placement : 'top',
251
+ delay : [500, 0], //FixIn: 9.4.2.2
252
  ignoreAttributes : true,
253
  touch : true, //['hold', 500], // 500ms delay //FixIn: 9.2.1.5
254
  appendTo: () => document.body,
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: booking calendar, booking system, availability calendar, events calendar,
5
  Requires at least: 4.0
6
  Requires PHP: 5.6
7
  Tested up to: 6.1
8
- Stable tag: 9.4.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -232,6 +232,14 @@ Please see [Video Guides](https://wpbookingcalendar.com/help/).
232
 
233
 
234
  == Changelog ==
 
 
 
 
 
 
 
 
235
  = 9.4.1 =
236
  - Changes in **all** versions:
237
  * **Fix**. Border cell issues at mobile devices
5
  Requires at least: 4.0
6
  Requires PHP: 5.6
7
  Tested up to: 6.1
8
+ Stable tag: 9.4.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
232
 
233
 
234
  == Changelog ==
235
+ = 9.4.2 =
236
+ - Changes in **all** versions:
237
+ * **Fix**. PHP Warning: Undefined variable $select_box_options in toolbar_ui.php on line 877 (9.4.2.1)
238
+ * **Fix**. PHP Warning: foreach() argument must be of type array|object, null given in toolbar_ui.php on line 3296 (9.4.2.1)
239
+ * **Fix**. Set delay in showing mouse over tooltips in 500 milliseconds (9.4.2.2)
240
+ - Changes in **Personal / Business Small / Business Medium / Business Large / MultiUser** versions:
241
+ * **New**. Ability to disable changing booking resource while editing a booking, belonging to child booking resource. If this option is not selected, the system updates the booking to the first available child booking resource based on the capacity and availability of the parent booking resource. (9.4.2.3)
242
+
243
  = 9.4.1 =
244
  - Changes in **all** versions:
245
  * **Fix**. Border cell issues at mobile devices
wpdev-booking.php CHANGED
@@ -7,7 +7,7 @@ Author: wpdevelop, oplugins
7
  Author URI: https://wpbookingcalendar.com/
8
  Text Domain: booking
9
  Domain Path: /languages/
10
- Version: 9.4.1
11
  */
12
 
13
  /* Copyright 2009 - 2022 www.wpbookingcalendar.com (email: info@wpbookingcalendar.com),
@@ -29,7 +29,7 @@ Version: 9.4.1
29
  if ( ! defined( 'ABSPATH' ) ) die( '<h3>Direct access to this file do not allow!</h3>' ); // Exit if accessed directly
30
 
31
 
32
- if ( ! defined( 'WP_BK_VERSION_NUM' ) ) { define( 'WP_BK_VERSION_NUM', '9.4.1' ); }
33
  if ( ! defined( 'WP_BK_MINOR_UPDATE' ) ) { define( 'WP_BK_MINOR_UPDATE', ! true ); }
34
 
35
  if ( ! defined( 'WPBC_EXIST_NEW_BOOKING_LISTING' ) ) { define( 'WPBC_EXIST_NEW_BOOKING_LISTING', true ); } //FixIn: 9.2.1
7
  Author URI: https://wpbookingcalendar.com/
8
  Text Domain: booking
9
  Domain Path: /languages/
10
+ Version: 9.4.2
11
  */
12
 
13
  /* Copyright 2009 - 2022 www.wpbookingcalendar.com (email: info@wpbookingcalendar.com),
29
  if ( ! defined( 'ABSPATH' ) ) die( '<h3>Direct access to this file do not allow!</h3>' ); // Exit if accessed directly
30
 
31
 
32
+ if ( ! defined( 'WP_BK_VERSION_NUM' ) ) { define( 'WP_BK_VERSION_NUM', '9.4.2' ); }
33
  if ( ! defined( 'WP_BK_MINOR_UPDATE' ) ) { define( 'WP_BK_MINOR_UPDATE', ! true ); }
34
 
35
  if ( ! defined( 'WPBC_EXIST_NEW_BOOKING_LISTING' ) ) { define( 'WPBC_EXIST_NEW_BOOKING_LISTING', true ); } //FixIn: 9.2.1