Booking Calendar - Version 9.1.1

Version Description

  • Changes in all versions:
    • New. Ability to show tooltips of booked times at mobile devices. (9.2.1.5)
    • Under Hood Separate section of code for '#bklnk' in search availability (9.2.1.2)
    • Fix. Issue of highlighting today date in calendar, after scrolling calendar months (9.2.1.7)
    • Fix. Vulnerability issue relative Deserialization and PHP object injection. (9.2.1.8)
  • Changes in Personal / Business Small / Business Medium / Business Large / MultiUser versions:
    • Fix. Issue of printing in MS Edge. (9.2.1.6)
    • Fix. Error: "Uncaught ReferenceError: wpbc_timeline_obj is not defined" while using [visitorbookingslisting] shortcode in the emails. (9.2.1.3)
    • Fix. Issue of not showing icons in popover in Timeline for editing and cancellation while using [visitorbookingslisting] shortcode in the emails. (9.2.1.4)
    • Fix. Conflict issue with other plugins, relative generation of random hashes. (9.2.1.9)
Download this release

Release Info

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

Code changes from version 9.1 to 9.1.1

assets/libs/wpbc_js_print/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Jason Day
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
assets/libs/wpbc_js_print/wpbc_js_print.js ADDED
@@ -0,0 +1,335 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * printThis v1.15.1
3
+ * @desc Printing plug-in for jQuery
4
+ * @author Jason Day
5
+ *
6
+ * Resources (based on):
7
+ * - jPrintArea: http://plugins.jquery.com/project/jPrintArea
8
+ * - jqPrint: https://github.com/permanenttourist/jquery.jqprint
9
+ * - Ben Nadal: http://www.bennadel.com/blog/1591-Ask-Ben-Print-Part-Of-A-Web-Page-With-jQuery.htm
10
+ *
11
+ * Licensed under the MIT licence:
12
+ * http://www.opensource.org/licenses/mit-license.php
13
+ *
14
+ * (c) Jason Day 2015-2019
15
+ *
16
+ * Usage:
17
+ *
18
+ * $("#mySelector").wpbc_js_print({
19
+ * debug: false, // show the iframe for debugging
20
+ * importCSS: true, // import parent page css
21
+ * importStyle: false, // import style tags
22
+ * printContainer: true, // grab outer container as well as the contents of the selector
23
+ * loadCSS: "path/to/my.css", // path to additional css file - use an array [] for multiple
24
+ * pageTitle: "", // add title to print page
25
+ * removeInline: false, // remove all inline styles from print elements
26
+ * removeInlineSelector: "body *", // custom selectors to filter inline styles. removeInline must be true
27
+ * printDelay: 333, // variable print delay
28
+ * header: null, // prefix to html
29
+ * footer: null, // postfix to html
30
+ * base: false, // preserve the BASE tag, or accept a string for the URL
31
+ * formValues: true, // preserve input/form values
32
+ * canvas: false, // copy canvas elements
33
+ * doctypeString: '...', // enter a different doctype for older markup
34
+ * removeScripts: false, // remove script tags from print content
35
+ * copyTagClasses: false // copy classes from the html & body tag
36
+ * beforePrintEvent: null, // callback function for printEvent in iframe
37
+ * beforePrint: null, // function called before iframe is filled
38
+ * afterPrint: null // function called before iframe is removed
39
+ * });
40
+ *
41
+ * Notes:
42
+ * - the loadCSS will load additional CSS (with or without @media print) into the iframe, adjusting layout
43
+ */
44
+ ;
45
+ (function($) {
46
+
47
+ function appendContent($el, content) {
48
+ if (!content) return;
49
+
50
+ // Simple test for a jQuery element
51
+ $el.append(content.jquery ? content.clone() : content);
52
+ }
53
+
54
+ function appendBody($body, $element, opt) {
55
+ // Clone for safety and convenience
56
+ // Calls clone(withDataAndEvents = true) to copy form values.
57
+ var $content = $element.clone(opt.formValues);
58
+
59
+ if (opt.formValues) {
60
+ // Copy original select and textarea values to their cloned counterpart
61
+ // Makes up for inability to clone select and textarea values with clone(true)
62
+ copyValues($element, $content, 'select, textarea');
63
+ }
64
+
65
+ if (opt.removeScripts) {
66
+ $content.find('script').remove();
67
+ }
68
+
69
+ if (opt.printContainer) {
70
+ // grab $.selector as container
71
+ $content.appendTo($body);
72
+ } else {
73
+ // otherwise just print interior elements of container
74
+ $content.each(function() {
75
+ $(this).children().appendTo($body)
76
+ });
77
+ }
78
+ }
79
+
80
+ // Copies values from origin to clone for passed in elementSelector
81
+ function copyValues(origin, clone, elementSelector) {
82
+ var $originalElements = origin.find(elementSelector);
83
+
84
+ clone.find(elementSelector).each(function(index, item) {
85
+ $(item).val($originalElements.eq(index).val());
86
+ });
87
+ }
88
+
89
+ var opt;
90
+ $.fn.wpbc_js_print = function(options) {
91
+ opt = $.extend({}, $.fn.wpbc_js_print.defaults, options);
92
+ var $element = this instanceof jQuery ? this : $(this);
93
+
94
+ var strFrameName = "wpbc_js_print-" + (new Date()).getTime();
95
+
96
+ if (window.location.hostname !== document.domain && navigator.userAgent.match(/msie/i)) {
97
+ // Ugly IE hacks due to IE not inheriting document.domain from parent
98
+ // checks if document.domain is set by comparing the host name against document.domain
99
+ var iframeSrc = "javascript:document.write(\"<head><script>document.domain=\\\"" + document.domain + "\\\";</s" + "cript></head><body></body>\")";
100
+ var printI = document.createElement('iframe');
101
+ printI.name = "printIframe";
102
+ printI.id = strFrameName;
103
+ printI.className = "MSIE";
104
+ document.body.appendChild(printI);
105
+ printI.src = iframeSrc;
106
+
107
+ } else {
108
+ // other browsers inherit document.domain, and IE works if document.domain is not explicitly set
109
+ var $frame = $("<iframe id='" + strFrameName + "' name='printIframe' />");
110
+ $frame.appendTo("body");
111
+ }
112
+
113
+ var $iframe = $("#" + strFrameName);
114
+
115
+ // show frame if in debug mode
116
+ if (!opt.debug) $iframe.css({
117
+ position: "absolute",
118
+ width: "0px",
119
+ height: "0px",
120
+ left: "-600px",
121
+ top: "-600px"
122
+ });
123
+
124
+ // before print callback
125
+ if (typeof opt.beforePrint === "function") {
126
+ opt.beforePrint();
127
+ }
128
+
129
+ // $iframe.ready() and $iframe.load were inconsistent between browsers
130
+ setTimeout(function() {
131
+
132
+ // Add doctype to fix the style difference between printing and render
133
+ function setDocType($iframe, doctype){
134
+ var win, doc;
135
+ win = $iframe.get(0);
136
+ win = win.contentWindow || win.contentDocument || win;
137
+ doc = win.document || win.contentDocument || win;
138
+ doc.open();
139
+ doc.write(doctype);
140
+ doc.close();
141
+ }
142
+
143
+ if (opt.doctypeString){
144
+ setDocType($iframe, opt.doctypeString);
145
+ }
146
+
147
+ var $doc = $iframe.contents(),
148
+ $head = $doc.find("head"),
149
+ $body = $doc.find("body"),
150
+ $base = $('base'),
151
+ baseURL;
152
+
153
+ // add base tag to ensure elements use the parent domain
154
+ if (opt.base === true && $base.length > 0) {
155
+ // take the base tag from the original page
156
+ baseURL = $base.attr('href');
157
+ } else if (typeof opt.base === 'string') {
158
+ // An exact base string is provided
159
+ baseURL = opt.base;
160
+ } else {
161
+ // Use the page URL as the base
162
+ baseURL = document.location.protocol + '//' + document.location.host;
163
+ }
164
+
165
+ $head.append('<base href="' + baseURL + '">');
166
+
167
+ // import page stylesheets
168
+ if (opt.importCSS) $("link[rel=stylesheet]").each(function() {
169
+ var href = $(this).attr("href");
170
+ if (href) {
171
+ var media = $(this).attr("media") || "all";
172
+ $head.append("<link type='text/css' rel='stylesheet' href='" + href + "' media='" + media + "'>");
173
+ }
174
+ });
175
+
176
+ // import style tags
177
+ if (opt.importStyle) $("style").each(function() {
178
+ $head.append(this.outerHTML);
179
+ });
180
+
181
+ // add title of the page
182
+ if (opt.pageTitle) $head.append("<title>" + opt.pageTitle + "</title>");
183
+
184
+ // import additional stylesheet(s)
185
+ if (opt.loadCSS) {
186
+ if ($.isArray(opt.loadCSS)) {
187
+ jQuery.each(opt.loadCSS, function(index, value) {
188
+ $head.append("<link type='text/css' rel='stylesheet' href='" + this + "'>");
189
+ });
190
+ } else {
191
+ $head.append("<link type='text/css' rel='stylesheet' href='" + opt.loadCSS + "'>");
192
+ }
193
+ }
194
+
195
+ var pageHtml = $('html')[0];
196
+
197
+ // CSS VAR in html tag when dynamic apply e.g. document.documentElement.style.setProperty("--foo", bar);
198
+ $doc.find('html').prop('style', pageHtml.style.cssText);
199
+
200
+ // copy 'root' tag classes
201
+ var tag = opt.copyTagClasses;
202
+ if (tag) {
203
+ tag = tag === true ? 'bh' : tag;
204
+ if (tag.indexOf('b') !== -1) {
205
+ $body.addClass($('body')[0].className);
206
+ }
207
+ if (tag.indexOf('h') !== -1) {
208
+ $doc.find('html').addClass(pageHtml.className);
209
+ }
210
+ }
211
+
212
+ // print header
213
+ appendContent($body, opt.header);
214
+
215
+ if (opt.canvas) {
216
+ // add canvas data-ids for easy access after cloning.
217
+ var canvasId = 0;
218
+ // .addBack('canvas') adds the top-level element if it is a canvas.
219
+ $element.find('canvas').addBack('canvas').each(function(){
220
+ $(this).attr('data-printthis', canvasId++);
221
+ });
222
+ }
223
+
224
+ appendBody($body, $element, opt);
225
+
226
+ if (opt.canvas) {
227
+ // Re-draw new canvases by referencing the originals
228
+ $body.find('canvas').each(function(){
229
+ var cid = $(this).data('printthis'),
230
+ $src = $('[data-printthis="' + cid + '"]');
231
+
232
+ this.getContext('2d').drawImage($src[0], 0, 0);
233
+
234
+ // Remove the markup from the original
235
+ if ($.isFunction($.fn.removeAttr)) {
236
+ $src.removeAttr('data-printthis');
237
+ } else {
238
+ $.each($src, function(i, el) {
239
+ el.removeAttribute('data-printthis');
240
+ });
241
+ }
242
+ });
243
+ }
244
+
245
+ // remove inline styles
246
+ if (opt.removeInline) {
247
+ // Ensure there is a selector, even if it's been mistakenly removed
248
+ var selector = opt.removeInlineSelector || '*';
249
+ // $.removeAttr available jQuery 1.7+
250
+ if ($.isFunction($.removeAttr)) {
251
+ $body.find(selector).removeAttr("style");
252
+ } else {
253
+ $body.find(selector).attr("style", "");
254
+ }
255
+ }
256
+
257
+ // print "footer"
258
+ appendContent($body, opt.footer);
259
+
260
+ // attach event handler function to beforePrint event
261
+ function attachOnBeforePrintEvent($iframe, beforePrintHandler) {
262
+ var win = $iframe.get(0);
263
+ win = win.contentWindow || win.contentDocument || win;
264
+
265
+ if (typeof beforePrintHandler === "function") {
266
+ if ('matchMedia' in win) {
267
+ win.matchMedia('print').addListener(function(mql) {
268
+ if(mql.matches) beforePrintHandler();
269
+ });
270
+ } else {
271
+ win.onbeforeprint = beforePrintHandler;
272
+ }
273
+ }
274
+ }
275
+ attachOnBeforePrintEvent($iframe, opt.beforePrintEvent);
276
+
277
+ setTimeout(function() {
278
+ if ($iframe.hasClass("MSIE")) {
279
+ // check if the iframe was created with the ugly hack
280
+ // and perform another ugly hack out of neccessity
281
+ window.frames["printIframe"].focus();
282
+ $head.append("<script> window.print(); </s" + "cript>");
283
+ } else {
284
+ // proper method
285
+ if (document.queryCommandSupported("print")) {
286
+ $iframe[0].contentWindow.document.execCommand("print", false, null);
287
+ } else {
288
+ $iframe[0].contentWindow.focus();
289
+ $iframe[0].contentWindow.print();
290
+ }
291
+ }
292
+
293
+ // remove iframe after print
294
+ if (!opt.debug) {
295
+ setTimeout(function() {
296
+ $iframe.remove();
297
+
298
+ }, 1000);
299
+ }
300
+
301
+ // after print callback
302
+ if (typeof opt.afterPrint === "function") {
303
+ opt.afterPrint();
304
+ }
305
+
306
+ }, opt.printDelay);
307
+
308
+ }, 333);
309
+
310
+ };
311
+
312
+ // defaults
313
+ $.fn.wpbc_js_print.defaults = {
314
+ debug: false, // show the iframe for debugging
315
+ importCSS: true, // import parent page css
316
+ importStyle: false, // import style tags
317
+ printContainer: true, // print outer container/$.selector
318
+ loadCSS: "", // path to additional css file - use an array [] for multiple
319
+ pageTitle: "", // add title to print page
320
+ removeInline: false, // remove inline styles from print elements
321
+ removeInlineSelector: "*", // custom selectors to filter inline styles. removeInline must be true
322
+ printDelay: 333, // variable print delay
323
+ header: null, // prefix to html
324
+ footer: null, // postfix to html
325
+ base: false, // preserve the BASE tag or accept a string for the URL
326
+ formValues: true, // preserve input/form values
327
+ canvas: false, // copy canvas content
328
+ doctypeString: '<!DOCTYPE html>', // enter a different doctype for older markup
329
+ removeScripts: false, // remove script tags from print content
330
+ copyTagClasses: false, // copy classes from the html & body tag
331
+ beforePrintEvent: null, // callback function for printEvent in iframe
332
+ beforePrint: null, // function called before iframe is filled
333
+ afterPrint: null // function called before iframe is removed
334
+ };
335
+ })(jQuery);
core/admin/page-form-free.php CHANGED
@@ -118,7 +118,7 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
118
  // Save Changes
119
  $this->update();
120
  }
121
- //$wpbc_user_role_master = get_wpbc_option( 'wpbc_user_role_master' ); // O L D W A Y: Get Fields Data
122
 
123
  // Get Form Fields ////////////////////////////////////////////////////
124
  $booking_form_structure = $this->get_booking_form_structure_for_visual(); // Get saved or Import form fields from OLD Free version
118
  // Save Changes
119
  $this->update();
120
  }
121
+ //$wpbc_user_role_master = get_bk_option( 'wpbc_user_role_master' ); // O L D W A Y: Get Fields Data
122
 
123
  // Get Form Fields ////////////////////////////////////////////////////
124
  $booking_form_structure = $this->get_booking_form_structure_for_visual(); // Get saved or Import form fields from OLD Free version
core/admin/page-settings.php CHANGED
@@ -184,7 +184,7 @@ class WPBC_Page_SettingsGeneral extends WPBC_Page_Structure {
184
  // Save Changes
185
  $this->update();
186
  }
187
- //$wpbc_user_role_master = get_wpbc_option( 'wpbc_user_role_master' ); // O L D W A Y: Get Fields Data
188
 
189
 
190
  // JavaScript: Tooltips, Popover, Datepick (js & css) //////////////////
184
  // Save Changes
185
  $this->update();
186
  }
187
+ //$wpbc_user_role_master = get_bk_option( 'wpbc_user_role_master' ); // O L D W A Y: Get Fields Data
188
 
189
 
190
  // JavaScript: Tooltips, Popover, Datepick (js & css) //////////////////
core/admin/wpbc-sql.php CHANGED
@@ -754,13 +754,13 @@ function wpbc_get_bookings_objects( $args ){
754
 
755
 
756
  $bookings_res = $wpdb->get_results( $sql_start_select . $sql . $sql_where . $sql_order . $sql_limit ); // Get Bookings
757
-
758
  $bookings_count = $wpdb->get_results( $sql_start_count . $sql . $sql_where ); // Get Number of bookings
759
  $bookings_count = ( ( count( $bookings_count ) > 0 ) ? $bookings_count[0]->count : 0 );
760
 
761
  $booking_types = apply_bk_filter( 'wpdebk_get_keyed_all_bk_resources', array() ); // Get Resources
762
 
763
-
764
  ////////////////////////////////////////////////////////////////////////////
765
 
766
  $booking_id_list = array(); // ID list of ALL bookings
754
 
755
 
756
  $bookings_res = $wpdb->get_results( $sql_start_select . $sql . $sql_where . $sql_order . $sql_limit ); // Get Bookings
757
+
758
  $bookings_count = $wpdb->get_results( $sql_start_count . $sql . $sql_where ); // Get Number of bookings
759
  $bookings_count = ( ( count( $bookings_count ) > 0 ) ? $bookings_count[0]->count : 0 );
760
 
761
  $booking_types = apply_bk_filter( 'wpdebk_get_keyed_all_bk_resources', array() ); // Get Resources
762
 
763
+
764
  ////////////////////////////////////////////////////////////////////////////
765
 
766
  $booking_id_list = array(); // ID list of ALL bookings
core/admin/wpbc-toolbar-tiny.php CHANGED
@@ -75,14 +75,10 @@ class WPBC_TinyMCE_Buttons {
75
  add_action( 'admin_footer', array( $this, 'modal_content' ) );
76
 
77
  // JS
78
- //wp_enqueue_script( 'wpdevelop-bootstrap', wpbc_plugin_url( '/assets/libs/bootstrap-css/js/bootstrap.js' ), array( 'jquery' ), '3.3.5.1');
79
- // Define proxy wpbc_model no conflict object - usage like jQuery('#wpbc_tiny_modal').wpbc_my_modal({
80
- //wp_enqueue_script( 'wpbc-wpdevelop-bootstrap', wpbc_plugin_url( '/js/wpbc_bs_no_conflict.js' ), array( 'wpdevelop-bootstrap' ), '1.0' );
81
  wp_enqueue_script( 'wpbc-modal', wpbc_plugin_url( '/assets/libs/ui/_out/dropdown_modal.js' ), array( 'jquery' ), '3.3.5.1' );
82
 
83
  // // Can not use this, because its start support only from WP 4.5 :(
84
  // // wp_add_inline_script( 'wpdevelop-bootstrap', "var wpbc_my_modal = jQuery.fn.modal.noConflict(); jQuery.fn.wpbc_my_modal = wpbc_my_modal;" ); // Define proxy wpbc_model no conflict object - usage like jQuery('#wpbc_tiny_modal').wpbc_my_modal({
85
-
86
  // wp_enqueue_script( 'jquery-ui-dialog' );
87
 
88
 
75
  add_action( 'admin_footer', array( $this, 'modal_content' ) );
76
 
77
  // JS
 
 
 
78
  wp_enqueue_script( 'wpbc-modal', wpbc_plugin_url( '/assets/libs/ui/_out/dropdown_modal.js' ), array( 'jquery' ), '3.3.5.1' );
79
 
80
  // // Can not use this, because its start support only from WP 4.5 :(
81
  // // wp_add_inline_script( 'wpdevelop-bootstrap', "var wpbc_my_modal = jQuery.fn.modal.noConflict(); jQuery.fn.wpbc_my_modal = wpbc_my_modal;" ); // Define proxy wpbc_model no conflict object - usage like jQuery('#wpbc_tiny_modal').wpbc_my_modal({
 
82
  // wp_enqueue_script( 'jquery-ui-dialog' );
83
 
84
 
core/any/css/admin-listing-table.css CHANGED
@@ -73,6 +73,7 @@
73
  padding: 2px 5px;
74
  background: #888;
75
  border:none;
 
76
  }
77
  .wpbc-listing-collumn.field-system-info {
78
  font-size: 10px;
73
  padding: 2px 5px;
74
  background: #888;
75
  border:none;
76
+ margin: 1px 1px 1px -10px;
77
  }
78
  .wpbc-listing-collumn.field-system-info {
79
  font-size: 10px;
core/class/wpbc-class-notices.php CHANGED
@@ -45,6 +45,8 @@ class WPBC_Notices {
45
  */
46
  public function show_system_messages($my_page) {
47
 
 
 
48
  ?><div class="wpbc_admin_system_message wpbc_page_<?php echo $my_page; ?>"><?php
49
 
50
  /** Static messages - user need to click for closing these messages */
45
  */
46
  public function show_system_messages($my_page) {
47
 
48
+
49
+
50
  ?><div class="wpbc_admin_system_message wpbc_page_<?php echo $my_page; ?>"><?php
51
 
52
  /** Static messages - user need to click for closing these messages */
core/lang/wpbc_all_translations.php CHANGED
@@ -121,9 +121,6 @@
121
  $wpbc_all_translations[] = __('This feature does not work for booking resources with capacity higher than one.', 'booking');
122
  $wpbc_all_translations[] = __('Show advanced settings of JavaScript loading', 'booking');
123
  $wpbc_all_translations[] = __('Hide advanced settings of JavaScript loading', 'booking');
124
- $wpbc_all_translations[] = __('Disable Bootstrap loading on Front-End', 'booking');
125
- $wpbc_all_translations[] = __(' If your theme or some other plugin is load the BootStrap JavaScripts, you can disable loading of this script by this plugin.', 'booking');
126
- $wpbc_all_translations[] = __('Disable Bootstrap loading on Back-End', 'booking');
127
  $wpbc_all_translations[] = __('Load JS and CSS files only on specific pages', 'booking');
128
  $wpbc_all_translations[] = __('Activate loading of CSS and JavaScript files of plugin only at specific pages.', 'booking');
129
  $wpbc_all_translations[] = __('Relative URLs of pages, where to load plugin CSS and JS files', 'booking');
@@ -643,6 +640,9 @@
643
  $wpbc_all_translations[] = __('Could not remove the old translation.', 'booking');
644
  $wpbc_all_translations[] = __('Purchase', 'booking');
645
  $wpbc_all_translations[] = __('Upgrade Now', 'booking');
 
 
 
646
  $wpbc_all_translations[] = __('Test', 'booking');
647
  $wpbc_all_translations[] = __('%sError!%s Request do not pass security check! Please refresh the page and try one more time.', 'booking');
648
  $wpbc_all_translations[] = __('Please check more %shere%s', 'booking');
121
  $wpbc_all_translations[] = __('This feature does not work for booking resources with capacity higher than one.', 'booking');
122
  $wpbc_all_translations[] = __('Show advanced settings of JavaScript loading', 'booking');
123
  $wpbc_all_translations[] = __('Hide advanced settings of JavaScript loading', 'booking');
 
 
 
124
  $wpbc_all_translations[] = __('Load JS and CSS files only on specific pages', 'booking');
125
  $wpbc_all_translations[] = __('Activate loading of CSS and JavaScript files of plugin only at specific pages.', 'booking');
126
  $wpbc_all_translations[] = __('Relative URLs of pages, where to load plugin CSS and JS files', 'booking');
640
  $wpbc_all_translations[] = __('Could not remove the old translation.', 'booking');
641
  $wpbc_all_translations[] = __('Purchase', 'booking');
642
  $wpbc_all_translations[] = __('Upgrade Now', 'booking');
643
+ $wpbc_all_translations[] = __('Disable Bootstrap loading on Front-End', 'booking');
644
+ $wpbc_all_translations[] = __(' If your theme or some other plugin is load the BootStrap JavaScripts, you can disable loading of this script by this plugin.', 'booking');
645
+ $wpbc_all_translations[] = __('Disable Bootstrap loading on Back-End', 'booking');
646
  $wpbc_all_translations[] = __('Test', 'booking');
647
  $wpbc_all_translations[] = __('%sError!%s Request do not pass security check! Please refresh the page and try one more time.', 'booking');
648
  $wpbc_all_translations[] = __('Please check more %shere%s', 'booking');
core/lang/wpbc_all_translations1.php CHANGED
@@ -912,4 +912,6 @@
912
  $wpbc_all_translations[] = __('Relative URLs of pages where you shouldn\'t use the change over days functionality', 'booking');
913
  $wpbc_all_translations[] = __('Enter the relative URLs of the pages for which you do not want to use the change over days functionality. Enter one URL per line. Example: %s', 'booking');
914
  $wpbc_all_translations[] = __('Show translations status', 'booking');
 
 
915
  }
912
  $wpbc_all_translations[] = __('Relative URLs of pages where you shouldn\'t use the change over days functionality', 'booking');
913
  $wpbc_all_translations[] = __('Enter the relative URLs of the pages for which you do not want to use the change over days functionality. Enter one URL per line. Example: %s', 'booking');
914
  $wpbc_all_translations[] = __('Show translations status', 'booking');
915
+ $wpbc_all_translations[] = __('Please check more here %s', 'booking');
916
+ $wpbc_all_translations[] = __('Please check FAQ instruction how to configure it here %s', 'booking');
917
  }
core/lib/wpdev-booking-class.php CHANGED
@@ -477,7 +477,7 @@ class wpdev_booking {
477
  $my_partially .= '<div class="datepick-inline" style="width:30px !important;border: 0;box-shadow: none;float: left;">';
478
  $my_partially .= '<table class="datepick" style=""><tbody><tr>';
479
  if ( wpbc_is_booking_used_check_in_out_time() ) { //FixIn: 8.9.4.10
480
- $my_partially .= '<td class="datepick-days-cell date_available date2approve timespartly check_in_time check_in_time_date2approve" style="height: 30px !important;">';
481
  } else {
482
  $my_partially .= '<td class="datepick-days-cell date_available date2approve timespartly times_clock" style="height: 30px !important;">';
483
  }
477
  $my_partially .= '<div class="datepick-inline" style="width:30px !important;border: 0;box-shadow: none;float: left;">';
478
  $my_partially .= '<table class="datepick" style=""><tbody><tr>';
479
  if ( wpbc_is_booking_used_check_in_out_time() ) { //FixIn: 8.9.4.10
480
+ $my_partially .= '<td class="datepick-days-cell date_available date_approved timespartly check_in_time check_in_time_date_approved" style="height: 30px !important;">';
481
  } else {
482
  $my_partially .= '<td class="datepick-days-cell date_available date2approve timespartly times_clock" style="height: 30px !important;">';
483
  }
core/timeline/v2/wpbc-class-timeline_v2.php CHANGED
@@ -525,9 +525,9 @@ class WPBC_TimelineFlex {
525
  , 'header_column2': "<?php echo esc_js( $this->timeline_titles['header_column2'] ); ?>"
526
  , 'header_title': "<?php echo esc_js( $this->timeline_titles['header_title'] ); ?>"
527
  , 'wh_trash': "<?php echo esc_js( $this->request_args['wh_trash'] ); ?>"
528
- , 'limit_hours': "<?php echo esc_js( $this->request_args['limit_hours'] ); ?>" //FixIn: 7.0.1.14
529
- , 'only_booked_resources': "<?php echo esc_js( $this->request_args['only_booked_resources'] ); ?>" //FixIn: 7.0.1.51
530
- , 'options': '<?php echo maybe_serialize( $this->options ) ; ?>' //FixIn: 7.2.1.14
531
  , 'booking_hash': "<?php echo esc_js( $this->request_args['booking_hash'] ); ?>" //FixIn: 8.1.3.5
532
  };
533
  </script>
@@ -808,7 +808,7 @@ class WPBC_TimelineFlex {
808
  if ( isset( $param['only_booked_resources'] ) ) $this->request_args['only_booked_resources'] = $param['only_booked_resources']; //FixIn: 7.0.1.14
809
  if ( isset( $param['booking_hash'] ) ) $this->request_args['booking_hash'] = $param['booking_hash']; //FixIn: 8.1.3.5
810
  if ( ( empty( $this->options ) ) && ( isset( $param['options'] ) ) ) {
811
- $this->options = maybe_unserialize( wp_unslash( $param['options'] ) ); //FixIn: 7.2.1.14
812
  }
813
 
814
  }
@@ -3083,16 +3083,19 @@ function bookingflextimeline_shortcode($attr) {
3083
  if ( ! WPBC()->booking_obj->popover_front_end_js_is_writed ) { //Write this JS only once at page
3084
  wpbc_bs_javascript_popover(); // JS Popover
3085
  WPBC()->booking_obj->popover_front_end_js_is_writed = true;
 
3086
 
3087
- //Define Global JavaScript Object - array of objects.
3088
- ?>
3089
- <script type="text/javascript">
3090
- var wpbc_timeline_obj = {};
3091
- </script>
3092
- <?php
3093
- }
 
 
3094
 
3095
- $timeline->show_timeline();
3096
  echo '</div>';
3097
 
3098
  echo '</div>';
525
  , 'header_column2': "<?php echo esc_js( $this->timeline_titles['header_column2'] ); ?>"
526
  , 'header_title': "<?php echo esc_js( $this->timeline_titles['header_title'] ); ?>"
527
  , 'wh_trash': "<?php echo esc_js( $this->request_args['wh_trash'] ); ?>"
528
+ , 'limit_hours': "<?php echo esc_js( $this->request_args['limit_hours'] ); ?>" //FixIn: 7.0.1.14
529
+ , 'only_booked_resources': "<?php echo esc_js( $this->request_args['only_booked_resources'] ); ?>" //FixIn: 7.0.1.51
530
+ , 'options': '<?php echo wp_json_encode( $this->options ); ?>' //FixIn: 9.2.1.8 //FixIn: 7.2.1.14
531
  , 'booking_hash': "<?php echo esc_js( $this->request_args['booking_hash'] ); ?>" //FixIn: 8.1.3.5
532
  };
533
  </script>
808
  if ( isset( $param['only_booked_resources'] ) ) $this->request_args['only_booked_resources'] = $param['only_booked_resources']; //FixIn: 7.0.1.14
809
  if ( isset( $param['booking_hash'] ) ) $this->request_args['booking_hash'] = $param['booking_hash']; //FixIn: 8.1.3.5
810
  if ( ( empty( $this->options ) ) && ( isset( $param['options'] ) ) ) {
811
+ $this->options = json_decode( wp_unslash( $param['options'] ), true ); //FixIn: 9.2.1.8
812
  }
813
 
814
  }
3083
  if ( ! WPBC()->booking_obj->popover_front_end_js_is_writed ) { //Write this JS only once at page
3084
  wpbc_bs_javascript_popover(); // JS Popover
3085
  WPBC()->booking_obj->popover_front_end_js_is_writed = true;
3086
+ } //FixIn: 9.2.1.3
3087
 
3088
+ //Define Global JavaScript Object - array of objects. //FixIn: 9.2.1.3
3089
+ ?>
3090
+ <script type="text/javascript">
3091
+ var wpbc_timeline_obj;
3092
+ if ( undefined === wpbc_timeline_obj ){
3093
+ wpbc_timeline_obj = [];
3094
+ }
3095
+ </script>
3096
+ <?php
3097
 
3098
+ $timeline->show_timeline();
3099
  echo '</div>';
3100
 
3101
  echo '</div>';
core/wpbc-constants.php CHANGED
@@ -26,7 +26,7 @@ if ( ! defined( 'WP_BK_CHECK_OUT_MINUS_DAY_SEARCH' ) ) { define( 'WP_BK_C
26
  ////////////////////////////////////////////////////////////
27
  // SYSTEM CONSTANTS //////////////
28
  ////////////////////////////////////////////////////////////
29
- if ( ! defined( 'WP_BK_MINOR_UPDATE' ) ) { define( 'WP_BK_MINOR_UPDATE', ! true ); }
30
  if ( ! defined( 'WP_BK_RESPONSE' ) ) { define( 'WP_BK_RESPONSE', false ); }
31
  if ( ! defined( 'WP_BK_BETA_DATA_FILL' ) ) { define( 'WP_BK_BETA_DATA_FILL', 0 ); } // Set 0 for no filling or 2 for 241 bookings or more for more
32
 
26
  ////////////////////////////////////////////////////////////
27
  // SYSTEM CONSTANTS //////////////
28
  ////////////////////////////////////////////////////////////
29
+ if ( ! defined( 'WP_BK_MINOR_UPDATE' ) ) { define( 'WP_BK_MINOR_UPDATE', true ); }
30
  if ( ! defined( 'WP_BK_RESPONSE' ) ) { define( 'WP_BK_RESPONSE', false ); }
31
  if ( ! defined( 'WP_BK_BETA_DATA_FILL' ) ) { define( 'WP_BK_BETA_DATA_FILL', 0 ); } // Set 0 for no filling or 2 for 241 bookings or more for more
32
 
core/wpbc-css.php CHANGED
@@ -50,18 +50,17 @@ class WPBC_CSS extends WPBC_JS_CSS{
50
  }
51
 
52
 
53
- public function enqueue( $where_to_load ) {
54
-
55
- wp_enqueue_style('wpdevelop-bts', wpbc_plugin_url( '/assets/libs/bootstrap-css/css/bootstrap.css' ), array(), '3.3.5.1'); //FixIn: 9.0.1.1.1
56
- wp_enqueue_style('wpdevelop-bts-theme', wpbc_plugin_url( '/assets/libs/bootstrap-css/css/bootstrap-theme.css' ), array(), '3.3.5.1'); //FixIn: 9.0.1.1.1
57
- // Popover Skin
58
- wp_enqueue_style( 'wpbc-tippy-popover',wpbc_plugin_url( '/assets/libs/tippy.js/themes/wpbc-tippy-popover.css' ), array(), '6.3.7'); //FixIn: 9.0.1.1
59
- wp_enqueue_style( 'wpbc-tippy-times', wpbc_plugin_url( '/assets/libs/tippy.js/themes/wpbc-tippy-times.css' ), array(), '6.3.7'); //FixIn: 9.0.1.1
60
 
61
- if ( $where_to_load == 'admin' ) { // Admin CSS files
62
  //Icons
63
  wp_enqueue_style( 'wpbc-bootstrap-icons', wpbc_plugin_url( '/assets/libs/bootstrap-icons/bootstrap-icons.css' ), array(), '1.8.1'); //FixIn: 9.0.1.1
64
- wp_enqueue_style( 'wpbc-material-design-icons', wpbc_plugin_url( '/assets/libs/material-design-icons/material-design-icons.css' ), array(), '4.0.0'); //FixIn: 9.0.1.1
65
 
66
  wp_enqueue_style( 'wpbc-chosen', wpbc_plugin_url( '/assets/libs/chosen/chosen.css' ), array(), WP_BK_VERSION_NUM);
67
  wp_enqueue_style( 'wpbc-admin-support', wpbc_plugin_url( '/core/any/css/admin-support.css' ), array(), WP_BK_VERSION_NUM);
@@ -90,9 +89,9 @@ class WPBC_CSS extends WPBC_JS_CSS{
90
  ";
91
  wp_add_inline_style( 'wpbc-admin-pages', $css );
92
  }
 
93
 
94
- }
95
- if ( ( $where_to_load != 'admin' ) || ( wpbc_is_new_booking_page() ) ){ // Client or Add New Booking page
96
 
97
  if ( 'On' === get_bk_option( 'booking_timeslot_picker' ) ) { //FixIn: 8.7.11.10
98
  wp_enqueue_style( 'wpbc-time_picker', wpbc_plugin_url( '/css/wpbc_time-selector.css' ), array(), WP_BK_VERSION_NUM );
@@ -105,9 +104,7 @@ class WPBC_CSS extends WPBC_JS_CSS{
105
  wp_enqueue_style( 'wpbc-client-pages', wpbc_plugin_url( '/css/client.css' ), array(), WP_BK_VERSION_NUM );
106
  }
107
 
108
- // wp_enqueue_style('wpbc-datepicker-main', wpbc_plugin_url( '/js/datepick.5.1/css/jquery.datepick.css' ), array(), WP_BK_VERSION_NUM); //FixIn: 8.6.1.13
109
-
110
- wp_enqueue_style('wpbc-calendar', wpbc_plugin_url( '/css/calendar.css' ), array(), WP_BK_VERSION_NUM);
111
  // Calendar Skins
112
  $calendar_skin_path = wpbc_get_calendar_skin_url();
113
  if ( ! empty( $calendar_skin_path ) )
50
  }
51
 
52
 
53
+ public function enqueue( $where_to_load ) {
54
+
55
+ wp_enqueue_style( 'wpdevelop-bts', wpbc_plugin_url( '/assets/libs/bootstrap-css/css/bootstrap.css' ), array(), '3.3.5.1' ); //FixIn: 9.0.1.1.1
56
+ wp_enqueue_style( 'wpdevelop-bts-theme', wpbc_plugin_url( '/assets/libs/bootstrap-css/css/bootstrap-theme.css' ), array(), '3.3.5.1' ); //FixIn: 9.0.1.1.1
57
+ wp_enqueue_style( 'wpbc-tippy-popover', wpbc_plugin_url( '/assets/libs/tippy.js/themes/wpbc-tippy-popover.css' ), array(), '6.3.7' ); //FixIn: 9.0.1.1
58
+ wp_enqueue_style( 'wpbc-tippy-times', wpbc_plugin_url( '/assets/libs/tippy.js/themes/wpbc-tippy-times.css' ), array(), '6.3.7' ); //FixIn: 9.0.1.1
59
+ wp_enqueue_style( 'wpbc-material-design-icons', wpbc_plugin_url( '/assets/libs/material-design-icons/material-design-icons.css' ), array(), '4.0.0' ); //FixIn: 9.2.1.4 //FixIn: 9.0.1.1
60
 
61
+ if ( $where_to_load == 'admin' ) { // Admin CSS files
62
  //Icons
63
  wp_enqueue_style( 'wpbc-bootstrap-icons', wpbc_plugin_url( '/assets/libs/bootstrap-icons/bootstrap-icons.css' ), array(), '1.8.1'); //FixIn: 9.0.1.1
 
64
 
65
  wp_enqueue_style( 'wpbc-chosen', wpbc_plugin_url( '/assets/libs/chosen/chosen.css' ), array(), WP_BK_VERSION_NUM);
66
  wp_enqueue_style( 'wpbc-admin-support', wpbc_plugin_url( '/core/any/css/admin-support.css' ), array(), WP_BK_VERSION_NUM);
89
  ";
90
  wp_add_inline_style( 'wpbc-admin-pages', $css );
91
  }
92
+ }
93
 
94
+ if ( ( $where_to_load != 'admin' ) || ( wpbc_is_new_booking_page() ) ){ // Client or Add New Booking page
 
95
 
96
  if ( 'On' === get_bk_option( 'booking_timeslot_picker' ) ) { //FixIn: 8.7.11.10
97
  wp_enqueue_style( 'wpbc-time_picker', wpbc_plugin_url( '/css/wpbc_time-selector.css' ), array(), WP_BK_VERSION_NUM );
104
  wp_enqueue_style( 'wpbc-client-pages', wpbc_plugin_url( '/css/client.css' ), array(), WP_BK_VERSION_NUM );
105
  }
106
 
107
+ wp_enqueue_style('wpbc-calendar', wpbc_plugin_url( '/css/calendar.css' ), array(), WP_BK_VERSION_NUM);
 
 
108
  // Calendar Skins
109
  $calendar_skin_path = wpbc_get_calendar_skin_url();
110
  if ( ! empty( $calendar_skin_path ) )
core/wpbc-functions.php CHANGED
@@ -2036,7 +2036,7 @@ $is_old = false;
2036
 
2037
  $obc_settings = array();
2038
  $ver = get_bk_option('bk_version_data');
2039
- if ( $ver !== false ) { $obc_settings = array( 'subscription_key'=>maybe_serialize($ver) ); }
2040
 
2041
  $params = array(
2042
  'action' => 'get_news',
2036
 
2037
  $obc_settings = array();
2038
  $ver = get_bk_option('bk_version_data');
2039
+ if ( $ver !== false ) { $obc_settings = array( 'subscription_key'=>wp_json_encode($ver) ); }
2040
 
2041
  $params = array(
2042
  'action' => 'get_news',
core/wpbc-include.php CHANGED
@@ -75,8 +75,16 @@ require_once( WPBC_PLUGIN_DIR . '/core/admin/wpbc-dashboard.php' );
75
  // Admin Pages
76
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
77
 
78
- //require_once( WPBC_PLUGIN_DIR . '/includes/page-booking_listing/page-booking_listing.php' ); //FixIn: 9.2.1
79
-
 
 
 
 
 
 
 
 
80
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
81
 
82
  require_once( WPBC_PLUGIN_DIR . '/core/admin/page-bookings.php' ); // Booking Listing
75
  // Admin Pages
76
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
77
 
78
+ //FixIn: 9.2.1
79
+ if ( 0 ) {
80
+ require_once( WPBC_PLUGIN_DIR . '/includes/flex-ui/admin-flex-ui.php' );
81
+ require_once( WPBC_PLUGIN_DIR . '/includes/listing_class/listing_class.php' );
82
+ require_once( WPBC_PLUGIN_DIR . '/includes/pagination/pagination.php' );
83
+
84
+ require_once( WPBC_PLUGIN_DIR . '/includes/page-booking_listing/ajx_bookings__sql.php' );
85
+ require_once( WPBC_PLUGIN_DIR . '/includes/page-booking_listing/ajx_bookings__listing.php' );
86
+ require_once( WPBC_PLUGIN_DIR . '/includes/page-booking_listing/ajx_bookings__page.php' );
87
+ }
88
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
89
 
90
  require_once( WPBC_PLUGIN_DIR . '/core/admin/page-bookings.php' ); // Booking Listing
core/wpbc-js.php CHANGED
@@ -109,7 +109,6 @@ class WPBC_JS extends WPBC_JS_CSS {
109
  $replacement = ' ';
110
  $tag = preg_replace($pattern, $replacement, $tag);
111
  }
112
-
113
  }
114
  }
115
 
@@ -140,7 +139,6 @@ class WPBC_JS extends WPBC_JS_CSS {
140
  }
141
 
142
 
143
-
144
  /** Define JavaScript Varibales */
145
  function wpbc_js_load_vars( $where_to_load ) {
146
 
@@ -169,7 +167,6 @@ function wpbc_js_load_vars( $where_to_load ) {
169
  );
170
 
171
 
172
-
173
  wp_localize_script( 'wpbc-global-vars'
174
  , 'wpbc_global1', array(
175
  'wpbc_ajaxurl' => admin_url( 'admin-ajax.php' )
@@ -258,24 +255,26 @@ function wpbc_js_load_libs( $where_to_load ) {
258
  /** Load JavaScript Files */
259
  function wpbc_js_load_files( $where_to_load ) {
260
 
 
261
  //FixIn: 9.0.1.1.1 // Bootstrap
262
- // if ( ( ( is_admin() ) && ( get_bk_option( 'booking_is_not_load_bs_script_in_admin' ) !== 'On') )
263
- // || ( ( ! is_admin() ) && ( get_bk_option( 'booking_is_not_load_bs_script_in_client' ) !== 'On' ) )
264
- // ) {
265
- // wp_enqueue_script( 'wpdevelop-bootstrap', wpbc_plugin_url( '/assets/libs/bootstrap-css/js/bootstrap.js' ), array( 'wpbc-global-vars' ), '3.3.5.1' );
266
- // }
267
-
268
- /**
269
- * Popover functionality.
270
- * Popover based on Tippy.js ( https://atomiks.github.io/tippyjs/v6/all-props/#allowhtml ), which is based on popper.js ( https://popper.js.org/docs/v2/tutorial/ )
271
- * Install Alt + F12 run
272
- * npm i @popperjs/core
273
- * npm i tippy.js
274
- * Copy ..\node_modules\@popperjs\core\dist\umd to ..\wp-content/plugins/booking/assets/libs/popper
275
- * Copy ..\node_modules\tippy.js\{dist && themes} to ..\wp-content/plugins/booking/assets/libs/tippy.js
276
- * In popper.js edit global.Popper to global.wpbc_Popper
277
- * In tippy-bundle.umd.js edit global.Popper to global.wpbc_Popper and global.tippy to global.wpbc_tippy
278
- */
 
279
  wp_enqueue_script( 'wpbc-popper', wpbc_plugin_url( '/assets/libs/popper/popper.js' ), array( 'wpbc-global-vars' ), '2.11.2' ); //FixIn: 9.0.1.1
280
  wp_enqueue_script( 'wpbc-tipcy', wpbc_plugin_url( '/assets/libs/tippy.js/dist/tippy-bundle.umd.js' ), array( 'wpbc-popper' ) , '6.3.7' );
281
  if ( $where_to_load != 'client' )
@@ -286,23 +285,22 @@ function wpbc_js_load_files( $where_to_load ) {
286
  // Datepicker
287
  wp_enqueue_script( 'wpbc-datepick', wpbc_plugin_url( '/js/datepick/jquery.datepick.wpbc.9.0.js'), array( 'wpbc-global-vars' ), '9.0');
288
 
289
- //wp_enqueue_script( 'wpbc-datepick-plugin', wpbc_plugin_url( '/js/datepick.5.1/jquery.plugin.js'), array( 'wpbc-global-vars' ), '5.1');
290
- //wp_enqueue_script( 'wpbc-datepick', wpbc_plugin_url( '/js/datepick.5.1/jquery.datepick.js'), array( 'wpbc-global-vars' ), '5.1');
291
-
292
  // Localization
293
  $calendar_localization_url = wpbc_get_calendar_localization_url();
294
- if ( ! empty( $calendar_localization_url ) )
295
- wp_enqueue_script( 'wpbc-datepick-localize', $calendar_localization_url, array( 'wpbc-datepick' ), '1.1');
296
- //wpbc_load_calendar_localization_file();
 
297
 
298
  if ( ( $where_to_load == 'client' ) || ( wpbc_is_new_booking_page() ) ) {
299
-
300
- // Client
301
- wp_enqueue_script( 'wpbc-main-client', wpbc_plugin_url( '/js/client.js' ), array( 'wpbc-datepick' ), WP_BK_VERSION_NUM );
302
 
303
- // wp_enqueue_script( 'wpbc-form-summary', wpbc_plugin_url( '/js/wpbc_form_summary.js' ), array(), WP_BK_VERSION_NUM ); //FixIn: 8.8.3.13
304
- // wp_enqueue_script( 'wpbc-form-summary', wpbc_plugin_url( '/js/_out/wpbc_form_summary.js' ), array(), WP_BK_VERSION_NUM ); //FixIn: 8.8.3.13
305
- // wp_enqueue_script( 'wpbc-form', wpbc_plugin_url( '/js/_out/wpbc_form.js' ), array( 'wpbc-main-client', 'react', 'react-dom' ), WP_BK_VERSION_NUM ); //FixIn: 8.8.3.7
 
 
 
 
306
 
307
  wp_enqueue_script( 'wpbc-times', wpbc_plugin_url( '/js/wpbc_times.js' ), array( 'wpbc-main-client' ), WP_BK_VERSION_NUM ); //FixIn: TimeFree 2 //UnComment it for Booking Calendar Free version
308
 
@@ -312,13 +310,12 @@ function wpbc_js_load_files( $where_to_load ) {
312
  }
313
 
314
  if ( $where_to_load == 'admin' ) {
315
-
316
- // Admin
317
- wp_enqueue_script( 'wpbc-admin-main', wpbc_plugin_url( '/js/admin.js'), array( 'wpbc-global-vars' ), WP_BK_VERSION_NUM );
318
  wp_enqueue_script( 'wpbc-admin-support', wpbc_plugin_url( '/core/any/js/admin-support.js'), array( 'wpbc-global-vars' ), WP_BK_VERSION_NUM );
319
-
320
- // Chosen Library
321
- wp_enqueue_script( 'wpbc-chosen', wpbc_plugin_url( '/assets/libs/chosen/chosen.jquery.min.js'), array( 'wpbc-global-vars' ), WP_BK_VERSION_NUM );
322
  }
323
 
324
  }
@@ -329,31 +326,6 @@ function wpbc_js_load_files( $where_to_load ) {
329
  // Support JavaScript functions
330
  ////////////////////////////////////////////////////////////////////////////////
331
 
332
- /** Load Datepicker Localization JS File */
333
- /*
334
- function wpbc_load_calendar_localization_file() {
335
-
336
- // Datepicker Localization - translation for calendar. Example: $locale = 'fr_FR';
337
- $locale = wpbc_get_maybe_reloaded_booking_locale();
338
- if ( ! empty( $locale ) ) {
339
-
340
- $locale_lang = substr( $locale, 0, 2 );
341
- $locale_country = substr( $locale, 3 );
342
-
343
- if ( ( $locale_lang !== 'en') && ( wpbc_is_file_exist( '/js/datepick/jquery.datepick-' . $locale_lang . '.js' ) ) ) {
344
-
345
- wp_enqueue_script( 'wpbc-datepick-localize', wpbc_plugin_url( '/js/datepick/jquery.datepick-'. $locale_lang . '.js' ), array( 'wpbc-datepick' ), WP_BK_VERSION_NUM );
346
-
347
- } else if ( ( ! in_array( $locale, array( 'en_US', 'en_CA', 'en_GB', 'en_AU' ) ) ) // English Exceptions
348
- && ( wpbc_is_file_exist( '/js/datepick/jquery.datepick-'. $locale_country . '.js' ) )
349
- ) {
350
-
351
- wp_enqueue_script( 'wpbc-datepick-localize', wpbc_plugin_url( '/js/datepick/jquery.datepick-'. $locale_country . '.js' ), array( 'wpbc-datepick' ), WP_BK_VERSION_NUM );
352
- }
353
- }
354
- }*/
355
-
356
-
357
  /**
358
  * Get URL Datepicker Localization JS File
359
  *
@@ -386,24 +358,6 @@ function wpbc_get_calendar_localization_url() {
386
  }
387
 
388
 
389
- /**
390
- * Get Registred jQuery version
391
- *
392
- * @global type $wp_scripts
393
- * @return string - jQuery version
394
- */
395
- function wpbc_get_registered_jquery_version() {
396
- global $wp_scripts;
397
-
398
- $version = false;
399
-
400
- if ( is_a( $wp_scripts, 'WP_Scripts' ) )
401
- if (isset( $wp_scripts->registered['jquery'] ))
402
- $version = $wp_scripts->registered['jquery']->ver;
403
- return $version;
404
- }
405
-
406
-
407
  /**
408
  * Check if we activated loading of JS/CSS only on specific pages and then load or no it
409
  *
@@ -441,4 +395,4 @@ function wpbc_is_load_css_js_on_client_page( $is_load_scripts ) {
441
  }
442
  return true;
443
  }
444
- add_filter( 'wpbc_is_load_script_on_this_page', 'wpbc_is_load_css_js_on_client_page' );
109
  $replacement = ' ';
110
  $tag = preg_replace($pattern, $replacement, $tag);
111
  }
 
112
  }
113
  }
114
 
139
  }
140
 
141
 
 
142
  /** Define JavaScript Varibales */
143
  function wpbc_js_load_vars( $where_to_load ) {
144
 
167
  );
168
 
169
 
 
170
  wp_localize_script( 'wpbc-global-vars'
171
  , 'wpbc_global1', array(
172
  'wpbc_ajaxurl' => admin_url( 'admin-ajax.php' )
255
  /** Load JavaScript Files */
256
  function wpbc_js_load_files( $where_to_load ) {
257
 
258
+ /**
259
  //FixIn: 9.0.1.1.1 // Bootstrap
260
+ if ( ( ( is_admin() ) && ( get_bk_option( 'booking_is_not_load_bs_script_in_admin' ) !== 'On') )
261
+ || ( ( ! is_admin() ) && ( get_bk_option( 'booking_is_not_load_bs_script_in_client' ) !== 'On' ) )
262
+ ) {
263
+ wp_enqueue_script( 'wpdevelop-bootstrap', wpbc_plugin_url( '/assets/libs/bootstrap-css/js/bootstrap.js' ), array( 'wpbc-global-vars' ), '3.3.5.1' );
264
+ }
265
+ */
266
+
267
+ /**
268
+ * Popover functionality.
269
+ * Popover based on Tippy.js ( https://atomiks.github.io/tippyjs/v6/all-props/#allowhtml ), which is based on popper.js ( https://popper.js.org/docs/v2/tutorial/ )
270
+ * Install Alt + F12 run
271
+ * npm i @popperjs/core
272
+ * npm i tippy.js
273
+ * Copy ..\node_modules\@popperjs\core\dist\umd to ..\wp-content/plugins/booking/assets/libs/popper
274
+ * Copy ..\node_modules\tippy.js\{dist && themes} to ..\wp-content/plugins/booking/assets/libs/tippy.js
275
+ * In popper.js edit global.Popper to global.wpbc_Popper
276
+ * In tippy-bundle.umd.js edit global.Popper to global.wpbc_Popper and global.tippy to global.wpbc_tippy
277
+ */
278
  wp_enqueue_script( 'wpbc-popper', wpbc_plugin_url( '/assets/libs/popper/popper.js' ), array( 'wpbc-global-vars' ), '2.11.2' ); //FixIn: 9.0.1.1
279
  wp_enqueue_script( 'wpbc-tipcy', wpbc_plugin_url( '/assets/libs/tippy.js/dist/tippy-bundle.umd.js' ), array( 'wpbc-popper' ) , '6.3.7' );
280
  if ( $where_to_load != 'client' )
285
  // Datepicker
286
  wp_enqueue_script( 'wpbc-datepick', wpbc_plugin_url( '/js/datepick/jquery.datepick.wpbc.9.0.js'), array( 'wpbc-global-vars' ), '9.0');
287
 
 
 
 
288
  // Localization
289
  $calendar_localization_url = wpbc_get_calendar_localization_url();
290
+ if ( ! empty( $calendar_localization_url ) ) {
291
+ wp_enqueue_script( 'wpbc-datepick-localize', $calendar_localization_url, array( 'wpbc-datepick' ), '1.1' );
292
+ }
293
+
294
 
295
  if ( ( $where_to_load == 'client' ) || ( wpbc_is_new_booking_page() ) ) {
 
 
 
296
 
297
+ wp_enqueue_script( 'wpbc-main-client', wpbc_plugin_url( '/js/client.js' ), array( 'wpbc-datepick' ), WP_BK_VERSION_NUM ); // Client
298
+
299
+ if ( 0 ) {
300
+ wp_enqueue_script( 'wpbc-form-summary', wpbc_plugin_url( '/js/wpbc_form_summary.js' ), array(), WP_BK_VERSION_NUM ); //FixIn: 8.8.3.13
301
+ wp_enqueue_script( 'wpbc-form-summary', wpbc_plugin_url( '/js/_out/wpbc_form_summary.js' ), array(), WP_BK_VERSION_NUM ); //FixIn: 8.8.3.13
302
+ wp_enqueue_script( 'wpbc-form', wpbc_plugin_url( '/js/_out/wpbc_form.js' ), array( 'wpbc-main-client', 'react', 'react-dom' ), WP_BK_VERSION_NUM ); //FixIn: 8.8.3.7
303
+ }
304
 
305
  wp_enqueue_script( 'wpbc-times', wpbc_plugin_url( '/js/wpbc_times.js' ), array( 'wpbc-main-client' ), WP_BK_VERSION_NUM ); //FixIn: TimeFree 2 //UnComment it for Booking Calendar Free version
306
 
310
  }
311
 
312
  if ( $where_to_load == 'admin' ) {
313
+
314
+ wp_enqueue_script( 'wpbc-js-print', wpbc_plugin_url( '/assets/libs/wpbc_js_print/wpbc_js_print.js' ), array( 'jquery' ) , '1.15.1' ); //FixIn: 9.2.1.6
315
+ wp_enqueue_script( 'wpbc-admin-main', wpbc_plugin_url( '/js/admin.js'), array( 'wpbc-global-vars' ), WP_BK_VERSION_NUM ); // Admin
316
  wp_enqueue_script( 'wpbc-admin-support', wpbc_plugin_url( '/core/any/js/admin-support.js'), array( 'wpbc-global-vars' ), WP_BK_VERSION_NUM );
317
+
318
+ wp_enqueue_script( 'wpbc-chosen', wpbc_plugin_url( '/assets/libs/chosen/chosen.jquery.min.js'), array( 'wpbc-global-vars' ), WP_BK_VERSION_NUM ); // Chosen Library
 
319
  }
320
 
321
  }
326
  // Support JavaScript functions
327
  ////////////////////////////////////////////////////////////////////////////////
328
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
  /**
330
  * Get URL Datepicker Localization JS File
331
  *
358
  }
359
 
360
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  /**
362
  * Check if we activated loading of JS/CSS only on specific pages and then load or no it
363
  *
395
  }
396
  return true;
397
  }
398
+ add_filter( 'wpbc_is_load_script_on_this_page', 'wpbc_is_load_css_js_on_client_page' );
core/wpbc-translation.php CHANGED
@@ -58,7 +58,9 @@ function wpbc_load_translation(){
58
  */
59
  function wpbc_check_ajax_locale__reload_it( $reloaded_locale ) { //FixIn: 8.4.5.1
60
 
61
- if ( isset( $_REQUEST['wpdev_active_locale'] ) ) { // Reload locale according request parameter
 
 
62
 
63
  unload_textdomain( 'booking' );
64
 
@@ -268,15 +270,21 @@ function wpbc_get_maybe_reloaded_booking_locale() {
268
  }
269
  }
270
 
 
 
 
 
 
 
 
271
 
272
  // Reload locale ONLY in AJAX, and if `isset $_REQUEST['wpdev_active_locale']
273
  if (
274
  ( ! defined( 'WPBC_LOCALE_RELOAD' ) )
275
  && ( $is_ajax )
276
- && ( isset( $_REQUEST['wpdev_active_locale'] ) )
277
  ){ // Reload locale according request parameter
278
-
279
- define( 'WPBC_LOCALE_RELOAD', esc_js( $_REQUEST['wpdev_active_locale'] ) );
280
  }
281
 
282
 
58
  */
59
  function wpbc_check_ajax_locale__reload_it( $reloaded_locale ) { //FixIn: 8.4.5.1
60
 
61
+ if ( ( isset( $_REQUEST['wpdev_active_locale'] ) ) || // Reload locale according request parameter
62
+ ( isset( $_REQUEST['wpbc_ajx_locale'] ) )
63
+ ) { // Reload locale according request parameter
64
 
65
  unload_textdomain( 'booking' );
66
 
270
  }
271
  }
272
 
273
+ $wpbc_ajx_locale = false;
274
+ if ( isset( $_REQUEST['wpdev_active_locale'] ) ) {
275
+ $wpbc_ajx_locale = esc_js( $_REQUEST['wpdev_active_locale'] );
276
+ }
277
+ if ( isset( $_REQUEST['wpbc_ajx_locale'] ) ) {
278
+ $wpbc_ajx_locale = esc_js( $_REQUEST['wpbc_ajx_locale'] );
279
+ }
280
 
281
  // Reload locale ONLY in AJAX, and if `isset $_REQUEST['wpdev_active_locale']
282
  if (
283
  ( ! defined( 'WPBC_LOCALE_RELOAD' ) )
284
  && ( $is_ajax )
285
+ && ( ! empty( $wpbc_ajx_locale ) )
286
  ){ // Reload locale according request parameter
287
+ define( 'WPBC_LOCALE_RELOAD', $wpbc_ajx_locale );
 
288
  }
289
 
290
 
css/print.css CHANGED
@@ -66,15 +66,15 @@
66
  }
67
  @media print {
68
  body * {
69
- visibility:hidden;
70
  }
71
  /* Completely Hide WP interface - for having corrrect width and height in print loyout and number of pages */
72
- #adminmenumain
73
- #adminmenumain *,
74
- #wpcontent,
75
  #wpcontent *{
76
  display:none;
77
- }
78
  #wpbc_print_section, #wpbc_print_section * {
79
  visibility:visible;
80
  }
66
  }
67
  @media print {
68
  body * {
69
+ /*visibility:hidden;*/ /* //FixIn: 9.2.1.6 */
70
  }
71
  /* Completely Hide WP interface - for having corrrect width and height in print loyout and number of pages */
72
+ #adminmenumain
73
+ #adminmenumain *,
74
+ #wpcontent,
75
  #wpcontent *{
76
  display:none;
77
+ }
78
  #wpbc_print_section, #wpbc_print_section * {
79
  visibility:visible;
80
  }
js/client.js CHANGED
@@ -100,17 +100,9 @@ function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_
100
  return false;
101
  } //FixIn: 8.0.1.2 end
102
 
103
- //console.log( jQuery.fn.popover.Constructor.VERSION ); // Check if this minimum BS version, and then proced
104
- //Deprecated: FixIn: 9.0.1.1.1
105
- // if ( 'function' === typeof( jQuery( ".datepick-days-cell" ).popover ) ){ //FixIn: 7.0.1.2 - 2016-12-10
106
- // jQuery( '.datepick-days-cell' ).popover( 'hide' );
107
- // }
108
-
109
  jQuery( '#date_booking' + bk_type ).val( date );
110
 
111
  if ( typeof( bkDisableBookedTimeSlots ) == 'function' ){
112
- //Deprecated: FixIn: 9.0.1.1.1
113
- //if(typeof( prepare_tooltip ) == 'function') {setTimeout("prepare_tooltip("+bk_type+");",1000);}
114
  // HERE WE WILL DISABLE ALL OPTIONS IN RANGE TIME INTERVALS FOR SINGLE DAYS SELECTIONS FOR THAT DAYS WHERE HOURS ALREADY BOOKED
115
  bkDisableBookedTimeSlots( jQuery( '#date_booking' + bk_type ).val(), bk_type );
116
  }
@@ -122,8 +114,8 @@ function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_
122
 
123
  function hoverDay(value, date){
124
 
125
- if ( typeof( hoverDayTime ) == 'function' ){
126
- hoverDayTime( value, date, bk_type );
127
  }
128
 
129
  if ( (location.href.indexOf( 'page=wpbc' ) == -1) ||
@@ -309,15 +301,6 @@ function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_
309
  }
310
 
311
  var is_datepick_unselectable = '';
312
- //FixIn: 8.0.1.2
313
- /*
314
- var is_calendar_booking_unselectable = jQuery('#calendar_booking_unselectable' + bk_type);
315
- var is_booking_form_also = jQuery('#booking_form_div' + bk_type);
316
- // Set unselectable, if only Availability Calendar here (and we do not insert Booking form by mistake).
317
- if ( ( is_calendar_booking_unselectable.length == 1 ) && ( is_booking_form_also.length != 1 ) ){
318
- is_datepick_unselectable = 'datepick-unselectable'; // 'ui-datepicker-unselectable ui-state-disabled';
319
- }*/
320
-
321
 
322
  //FixIn: 8.1.2.3
323
  if ( false ){
@@ -334,21 +317,10 @@ function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_
334
 
335
  if ( ( time_return_value !== false ) && ( is_exist_check_in_out_for_parent_resource == 0 ) ) { // Check this only for single booking resources - is_exist_check_in_out_for_parent_resource == 0
336
  if ( is_booking_used_check_in_out_time === true ) {
337
- // If the date is cehck in/out and the check in/out time is activated so then this date is unavailbale
338
  if ( ( additional_class.indexOf('check_in_time') != -1 ) && ( additional_class.indexOf('check_out_time') != -1 ) ){
339
- // Make this date unavailbale
340
- time_return_value[0] = false;
341
- //FixIn: 6.0.1.2
342
- if ( ! (
343
- ( ( additional_class.indexOf('check_in_time_date_approved') != -1 ) && ( additional_class.indexOf('check_out_time_date2approve') != -1 ) )
344
- || ( ( additional_class.indexOf('check_out_time_date_approved') != -1 ) && ( additional_class.indexOf('check_in_time_date2approve') != -1 ) )
345
- ) ) {
346
- // Remove CSS classes from this date
347
- /* //FixIn: 8.9.4.13.1 - Show diagonal line in dates, where we have check in/out bookings with the same status (pending or approved) */
348
- // time_return_value[1]=time_return_value[1].replace("check_in_time","");
349
- // time_return_value[1]=time_return_value[1].replace("check_out_time","");
350
- // time_return_value[1]=time_return_value[1].replace("timespartly","");
351
- }
352
  time_return_value[1]=time_return_value[1].replace("date_available","");
353
  }
354
  }
@@ -393,15 +365,12 @@ function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_
393
  }
394
  }
395
 
396
- function changeMonthYear(year, month){
397
- //Deprecated: FixIn: 9.0.1.1.1
398
- // if(typeof( prepare_tooltip ) == 'function') {
399
- // setTimeout("prepare_tooltip("+bk_type+");",1000);
400
- // }
401
- if(typeof( prepare_highlight ) == 'function') {
402
- setTimeout("prepare_highlight();",1000);
403
  }
404
  }
 
405
  // Configure and show calendar
406
  jQuery('#calendar_booking'+ bk_type).text('');
407
  jQuery('#calendar_booking'+ bk_type).datepick(
@@ -453,10 +422,6 @@ function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_
453
  jQuery.datepick._showDate(inst);
454
  jQuery.datepick._updateDatepick(inst);
455
  }
456
- //Deprecated: FixIn: 9.0.1.1.1
457
- // if ( typeof( prepare_tooltip ) == 'function' ){
458
- // setTimeout( "prepare_tooltip(" + bk_type + ");", 1000 );
459
- // }
460
  }
461
 
462
 
@@ -464,33 +429,38 @@ function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_
464
  // Days Selections - support functions
465
  ////////////////////////////////////////////////////////////////////////////
466
 
467
- // Get fisrst day of selection
 
 
 
 
 
468
  function get_first_day_of_selection(dates) {
469
 
470
  // Multiple days selections
471
- if ( dates.indexOf(',') != -1 ){
472
- var dates_array =dates.split(/,\s*/);
473
  var length = dates_array.length;
474
  var element = null;
475
  var new_dates_array = [];
476
 
477
- for (var i = 0; i < length; i++) {
478
 
479
- element = dates_array[i].split(/\./);
480
 
481
- new_dates_array[new_dates_array.length] = element[2]+'.' + element[1]+'.' + element[0]; //2013.12.20
482
- }
483
  new_dates_array.sort();
484
 
485
- element = new_dates_array[0].split(/\./);
486
 
487
- return element[2]+'.' + element[1]+'.' + element[0]; //20.12.2013
488
  }
489
 
490
  // Range days selection
491
- if ( dates.indexOf(' - ') != -1 ){
492
- var start_end_date = dates.split(" - ");
493
- return start_end_date[0];
494
  }
495
 
496
  // Single day selection
@@ -498,7 +468,7 @@ function get_first_day_of_selection(dates) {
498
  }
499
 
500
 
501
- // Get fisrst day of selection
502
  function get_last_day_of_selection(dates) {
503
 
504
  // Multiple days selections
@@ -534,13 +504,13 @@ function get_last_day_of_selection(dates) {
534
 
535
  // Set selected days at calendar as UnAvailable
536
  function setUnavailableSelectedDays( bk_type ){
537
- var sel_dates = jQuery('#calendar_booking'+bk_type).datepick('getDate');
538
  var class_day2;
539
- for( var i =0; i <sel_dates.length; i++) {
540
- class_day2 = (sel_dates[i].getMonth()+1) + '-' + sel_dates[i].getDate() + '-' + sel_dates[i].getFullYear();
541
- date_approved[ bk_type ][ class_day2 ] = [ (sel_dates[i].getMonth()+1) , sel_dates[i].getDate(), sel_dates[i].getFullYear(),0,0,0];
542
- jQuery('#calendar_booking'+bk_type+' td.cal4date-'+class_day2).html(sel_dates[i].getDate());
543
- // jQuery('#calendar_booking'+bk_type).datepick('refresh');
544
  }
545
  }
546
 
@@ -849,7 +819,7 @@ function mybooking_submit( submit_form , bk_type, wpdev_active_locale){
849
  } // End Fields Loop
850
 
851
  //FixIn:6.1.1.3
852
- if( typeof( is_this_time_selections_not_available ) == 'function' ) {
853
 
854
  if ( document.getElementById('date_booking' + bk_type).value == '' ) { // Primary calendar not selected.
855
 
@@ -861,7 +831,7 @@ function mybooking_submit( submit_form , bk_type, wpdev_active_locale){
861
  for ( var ia=0;ia<id_additional_arr.length;ia++ ) {
862
  if (
863
  ( document.getElementById('date_booking' + id_additional_arr[ia] ).value != '' )
864
- && ( ! is_this_time_selections_not_available( id_additional_arr[ia], submit_form.elements ) )
865
  ){
866
  is_times_dates_ok = true;
867
  }
@@ -869,7 +839,7 @@ function mybooking_submit( submit_form , bk_type, wpdev_active_locale){
869
  if ( ! is_times_dates_ok ) return;
870
  }
871
  } else { //Primary calendar selected.
872
- if ( is_this_time_selections_not_available( bk_type, submit_form.elements ) )
873
  return;
874
  }
875
  }
@@ -1206,12 +1176,12 @@ jQuery(document).ready( function(){
1206
 
1207
  // Scroll to script
1208
  function makeScroll(object_name) {
1209
- var targetOffset = jQuery( object_name ).offset().top;
1210
- //targetOffset = targetOffset - 50;
1211
- if (targetOffset<0) targetOffset = 0;
1212
- if ( jQuery('#wpadminbar').length > 0 ) targetOffset = targetOffset - 50;
1213
- else targetOffset = targetOffset - 20;
1214
- jQuery('html,body').animate({scrollTop: targetOffset}, 500);
1215
  }
1216
 
1217
 
@@ -1281,10 +1251,6 @@ function wpbc_timeline_nav( timeline_obj, nav_step ){
1281
 
1282
  jQuery('#'+timeline_obj.html_client_id + ' .wpbc_tl_title').html( '<span class="glyphicon glyphicon-refresh wpbc_spin"></span> &nbsp Loading...' ); // '<div style="height:20px;width:100%;text-align:center;margin:15px auto;">Loading ... <img style="vertical-align:middle;box-shadow:none;width:14px;" src="'+wpdev_bk_plugin_url+'/assets/img/ajax-loader.gif"><//div>'
1283
 
1284
- //Deprecated: FixIn: 9.0.1.1.1
1285
- // if ( 'function' === typeof( jQuery(".popover_click.popover_bottom" ).popover ) ) //FixIn: 7.0.1.2 - 2016-12-10
1286
- // jQuery('.popover_click.popover_bottom').popover( 'hide' ); //Hide all opned popovers
1287
-
1288
  jQuery.ajax({
1289
  url: wpbc_ajaxurl,
1290
  type:'POST',
@@ -1555,7 +1521,7 @@ function wpbc_wizard_step( el, step_num, step_from ){
1555
  }
1556
 
1557
  if ( wpbc_is_some_elements_visible( br_id, ['rangetime', 'durationtime', 'starttime', 'endtime'] ) ){
1558
- if ( is_this_time_selections_not_available( br_id, document.getElementById( 'booking_form' + br_id ) ) ){
1559
  return false;
1560
  }
1561
  }
100
  return false;
101
  } //FixIn: 8.0.1.2 end
102
 
 
 
 
 
 
 
103
  jQuery( '#date_booking' + bk_type ).val( date );
104
 
105
  if ( typeof( bkDisableBookedTimeSlots ) == 'function' ){
 
 
106
  // HERE WE WILL DISABLE ALL OPTIONS IN RANGE TIME INTERVALS FOR SINGLE DAYS SELECTIONS FOR THAT DAYS WHERE HOURS ALREADY BOOKED
107
  bkDisableBookedTimeSlots( jQuery( '#date_booking' + bk_type ).val(), bk_type );
108
  }
114
 
115
  function hoverDay(value, date){
116
 
117
+ if ( typeof( wpbc_prepare_tooltip_content ) == 'function' ){
118
+ wpbc_prepare_tooltip_content( value, date, bk_type );
119
  }
120
 
121
  if ( (location.href.indexOf( 'page=wpbc' ) == -1) ||
301
  }
302
 
303
  var is_datepick_unselectable = '';
 
 
 
 
 
 
 
 
 
304
 
305
  //FixIn: 8.1.2.3
306
  if ( false ){
317
 
318
  if ( ( time_return_value !== false ) && ( is_exist_check_in_out_for_parent_resource == 0 ) ) { // Check this only for single booking resources - is_exist_check_in_out_for_parent_resource == 0
319
  if ( is_booking_used_check_in_out_time === true ) {
320
+ // If the date is check in/out and the check in/out time is activated so then this date is unavailable
321
  if ( ( additional_class.indexOf('check_in_time') != -1 ) && ( additional_class.indexOf('check_out_time') != -1 ) ){
322
+ // Make this date unavailable
323
+ time_return_value[0] = false;
 
 
 
 
 
 
 
 
 
 
 
324
  time_return_value[1]=time_return_value[1].replace("date_available","");
325
  }
326
  }
365
  }
366
  }
367
 
368
+ function changeMonthYear( year, month ){
369
+ if ( typeof (prepare_highlight) == 'function' ){
370
+ setTimeout( "prepare_highlight();", 1000 );
 
 
 
 
371
  }
372
  }
373
+
374
  // Configure and show calendar
375
  jQuery('#calendar_booking'+ bk_type).text('');
376
  jQuery('#calendar_booking'+ bk_type).datepick(
422
  jQuery.datepick._showDate(inst);
423
  jQuery.datepick._updateDatepick(inst);
424
  }
 
 
 
 
425
  }
426
 
427
 
429
  // Days Selections - support functions
430
  ////////////////////////////////////////////////////////////////////////////
431
 
432
+ /**
433
+ * Get first day of selection
434
+ *
435
+ * @param dates
436
+ * @returns {string|*}
437
+ */
438
  function get_first_day_of_selection(dates) {
439
 
440
  // Multiple days selections
441
+ if ( dates.indexOf( ',' ) != -1 ){
442
+ var dates_array = dates.split( /,\s*/ );
443
  var length = dates_array.length;
444
  var element = null;
445
  var new_dates_array = [];
446
 
447
+ for ( var i = 0; i < length; i++ ){
448
 
449
+ element = dates_array[ i ].split( /\./ );
450
 
451
+ new_dates_array[ new_dates_array.length ] = element[ 2 ] + '.' + element[ 1 ] + '.' + element[ 0 ]; //2013.12.20
452
+ }
453
  new_dates_array.sort();
454
 
455
+ element = new_dates_array[ 0 ].split( /\./ );
456
 
457
+ return element[ 2 ] + '.' + element[ 1 ] + '.' + element[ 0 ]; //20.12.2013
458
  }
459
 
460
  // Range days selection
461
+ if ( dates.indexOf( ' - ' ) != -1 ){
462
+ var start_end_date = dates.split( " - " );
463
+ return start_end_date[ 0 ];
464
  }
465
 
466
  // Single day selection
468
  }
469
 
470
 
471
+ // Get last day of selection
472
  function get_last_day_of_selection(dates) {
473
 
474
  // Multiple days selections
504
 
505
  // Set selected days at calendar as UnAvailable
506
  function setUnavailableSelectedDays( bk_type ){
507
+ var sel_dates = jQuery( '#calendar_booking' + bk_type ).datepick( 'getDate' );
508
  var class_day2;
509
+ for ( var i = 0; i < sel_dates.length; i++ ){
510
+ class_day2 = (sel_dates[ i ].getMonth() + 1) + '-' + sel_dates[ i ].getDate() + '-' + sel_dates[ i ].getFullYear();
511
+ date_approved[ bk_type ][ class_day2 ] = [(sel_dates[ i ].getMonth() + 1), sel_dates[ i ].getDate(), sel_dates[ i ].getFullYear(), 0, 0, 0];
512
+ jQuery( '#calendar_booking' + bk_type + ' td.cal4date-' + class_day2 ).html( sel_dates[ i ].getDate() );
513
+ // jQuery('#calendar_booking'+bk_type).datepick('refresh');
514
  }
515
  }
516
 
819
  } // End Fields Loop
820
 
821
  //FixIn:6.1.1.3
822
+ if( typeof( wpbc_is_this_time_selection_not_available ) == 'function' ) {
823
 
824
  if ( document.getElementById('date_booking' + bk_type).value == '' ) { // Primary calendar not selected.
825
 
831
  for ( var ia=0;ia<id_additional_arr.length;ia++ ) {
832
  if (
833
  ( document.getElementById('date_booking' + id_additional_arr[ia] ).value != '' )
834
+ && ( ! wpbc_is_this_time_selection_not_available( id_additional_arr[ia], submit_form.elements ) )
835
  ){
836
  is_times_dates_ok = true;
837
  }
839
  if ( ! is_times_dates_ok ) return;
840
  }
841
  } else { //Primary calendar selected.
842
+ if ( wpbc_is_this_time_selection_not_available( bk_type, submit_form.elements ) )
843
  return;
844
  }
845
  }
1176
 
1177
  // Scroll to script
1178
  function makeScroll(object_name) {
1179
+ var targetOffset = jQuery( object_name ).offset().top;
1180
+ //targetOffset = targetOffset - 50;
1181
+ if ( targetOffset < 0 ) targetOffset = 0;
1182
+ if ( jQuery( '#wpadminbar' ).length > 0 ) targetOffset = targetOffset - 50;
1183
+ else targetOffset = targetOffset - 20;
1184
+ jQuery( 'html,body' ).animate( {scrollTop: targetOffset}, 500 );
1185
  }
1186
 
1187
 
1251
 
1252
  jQuery('#'+timeline_obj.html_client_id + ' .wpbc_tl_title').html( '<span class="glyphicon glyphicon-refresh wpbc_spin"></span> &nbsp Loading...' ); // '<div style="height:20px;width:100%;text-align:center;margin:15px auto;">Loading ... <img style="vertical-align:middle;box-shadow:none;width:14px;" src="'+wpdev_bk_plugin_url+'/assets/img/ajax-loader.gif"><//div>'
1253
 
 
 
 
 
1254
  jQuery.ajax({
1255
  url: wpbc_ajaxurl,
1256
  type:'POST',
1521
  }
1522
 
1523
  if ( wpbc_is_some_elements_visible( br_id, ['rangetime', 'durationtime', 'starttime', 'endtime'] ) ){
1524
+ if ( wpbc_is_this_time_selection_not_available( br_id, document.getElementById( 'booking_form' + br_id ) ) ){
1525
  return false;
1526
  }
1527
  }
js/datepick/jquery.datepick.wpbc.9.0.js CHANGED
@@ -1849,7 +1849,7 @@ $.extend(Datepick.prototype, {
1849
  (defaultDate.getTime() == printDate.getTime() &&
1850
  defaultDate.getTime() == cursorDate.getTime()) ?
1851
  // Or defaultDate is selected printedDate and defaultDate is cursorDate
1852
- ' ' + $.datepick._dayOverClass[useTR] : '') + // Highlight selected day
1853
  (unselectable ? ' ' + this._unselectableClass[useTR] :
1854
  ' ' + this._selectableClass[useTR]) + // Highlight unselectable days
1855
  (empty ? '' : ' ' + daySettings[1] + // Highlight custom dates
1849
  (defaultDate.getTime() == printDate.getTime() &&
1850
  defaultDate.getTime() == cursorDate.getTime()) ?
1851
  // Or defaultDate is selected printedDate and defaultDate is cursorDate
1852
+ ' ' /*+ $.datepick._dayOverClass[useTR]*/ : '') + // Highlight selected day //FixIn: 9.2.1.7
1853
  (unselectable ? ' ' + this._unselectableClass[useTR] :
1854
  ' ' + this._selectableClass[useTR]) + // Highlight unselectable days
1855
  (empty ? '' : ' ' + daySettings[1] + // Highlight custom dates
js/wpbc_bs_no_conflict.js DELETED
@@ -1,2 +0,0 @@
1
- var wpbc_my_modal = jQuery.fn.wpbc_my_modal.noConflict();
2
- jQuery.fn.wpbc_my_modal = wpbc_my_modal;
 
 
js/wpbc_times.js CHANGED
@@ -3,24 +3,6 @@ var is_check_start_time_gone = false; // Check start time or end time for the
3
  var start_time_checking_index;
4
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5
 
6
- //Deprecated: FixIn: 9.0.1.1.1
7
- // function prepare_tooltip( myParam ){
8
- // //wpbc_set_popover_in_cal( myParam ); //Deprecated: FixIn: 9.0.1.1.1
9
- // }
10
-
11
- //FixIn: Deprecated
12
- function hoverDayTime( value, date_obj, resource_id ){
13
-
14
- wpbc_prepare_tooltip_content( value, date_obj, resource_id );
15
- }
16
-
17
- //FixIn: Deprecated
18
- function is_this_time_selections_not_available( resource_id, form_elements ){
19
- var reslt = wpbc_is_this_time_selection_not_available( resource_id, form_elements );
20
- return reslt;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
23
-
24
 
25
  function wpbc_show_date_info_top( param_calendar_id, my_thisDateTime ){
26
 
@@ -78,50 +60,6 @@ function wpbc_show_date_info_bottom( param_calendar_id, my_thisDateTime ) {
78
  }
79
 
80
 
81
-
82
-
83
-
84
- /**
85
- * Prepare for showing popovers in calendar at front-end side
86
- *
87
- * @param resource_id
88
- */
89
- //Deprecated: FixIn: 9.0.1.1.1
90
- /*
91
- function wpbc_set_popover_in_cal( resource_id ){
92
-
93
- var tooltip_day_class_4_show = " .timespartly";
94
-
95
- if ( is_show_availability_in_tooltips ){
96
- if ( wpdev_in_array( parent_booking_resources, resource_id ) )
97
- tooltip_day_class_4_show = " .datepick-days-cell"; //" .datepick-days-cell a"; // each day
98
- }
99
-
100
- if ( is_show_cost_in_tooltips ){
101
- tooltip_day_class_4_show = " .datepick-days-cell"; //" .datepick-days-cell a"; // each day
102
- }
103
-
104
- // Show tooltip at each day if time availability filter is set
105
- if ( typeof(global_avalaibility_times[ resource_id ]) != "undefined" ){
106
- if ( global_avalaibility_times[ resource_id ].length > 0 ) tooltip_day_class_4_show = " .datepick-days-cell"; // each day
107
- }
108
-
109
-
110
- if ( 'function' === typeof( jQuery( "#calendar_booking" + resource_id + tooltip_day_class_4_show ).popover ) ){ //FixIn: 7.0.1.2 - 2016-12-10
111
- jQuery( "#calendar_booking" + resource_id + tooltip_day_class_4_show ).popover( {
112
- placement: 'top auto'
113
- , trigger : 'hover'
114
- , delay : {show: 500, hide: 1}
115
- , content : ''
116
- , template : '<div class="popover popover_calendar_hover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
117
- , container: '#calendar_booking' + resource_id
118
- , html : 'true'
119
- } );
120
- }
121
- }
122
- */
123
-
124
-
125
  /**
126
  * Sort times array - prevent issue with same start/end times.
127
  * @param times_array [
@@ -312,13 +250,23 @@ function wpbc_prepare_tooltip_content( value, date_obj, resource_id ){
312
  placement : 'top',
313
  delay : [400, 0],
314
  ignoreAttributes : true,
315
- touch : ['hold', 500], // 500ms delay
316
  appendTo: () => document.body,
317
  });
318
- }
319
 
 
320
  }
321
 
 
 
 
 
 
 
 
 
 
 
322
 
323
  /**
324
  * Get Times array [ [ h, m, s ], ... ] from Dates array ( date_approved || date2approve ), or return empty array otherwise
3
  var start_time_checking_index;
4
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  function wpbc_show_date_info_top( param_calendar_id, my_thisDateTime ){
8
 
60
  }
61
 
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  /**
64
  * Sort times array - prevent issue with same start/end times.
65
  * @param times_array [
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,
255
  });
 
256
 
257
+ }
258
  }
259
 
260
+ /**
261
+ * Hide Tippy tooltip on scroll, to prevent issue on mobile touch devices of showing tooltip at top left corner!
262
+ * @param evt
263
+ */
264
+ jQuery( window ).scroll( function ( event ){ //FixIn: 9.2.1.5
265
+ if ( 'function' === typeof( wpbc_tippy ) ){
266
+ wpbc_tippy.hideAll();
267
+ }
268
+ } );
269
+
270
 
271
  /**
272
  * Get Times array [ [ h, m, s ], ... ] from Dates array ( date_approved || date2approve ), or return empty array otherwise
readme.txt CHANGED
@@ -4,16 +4,16 @@ Donate link: https://wpbookingcalendar.com/buy/
4
  Tags: booking calendar, booking system, availability calendar, events calendar, appointments , booking form, reservation, availability, booking, calendar, bookings, ical
5
  Requires at least: 4.0
6
  Requires PHP: 5.6
7
- Tested up to: 5.9
8
- Stable tag: 9.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- Booking Calendar - original 1st booking plugin for WordPress. Easily receive reservations and show availability in clean and powerful booking system.
13
 
14
  == Description ==
15
 
16
- ####The original "**Booking Calendar**" plugin is the 1st booking system for WordPress, **downloaded over 2,150,000** times [since 2009](https://wpbookingcalendar.com/changelog/).
17
 
18
  **Booking Calendar** plugin enable awesome **booking system** for your site. Simply show availability and receive bookings for your property or service in easy to use booking system with clean and smooth interface.
19
 
@@ -169,11 +169,11 @@ Please see [FAQ](https://wpbookingcalendar.com/faq/).
169
  = Support Languages (local) =
170
 
171
  - English
 
172
  - German 99.74% [ 1906 / 1911 ], fuzzy 4, not translated 1
173
  - French (France) 99.74% [ 1906 / 1911 ], fuzzy 4, not translated 1
174
  - Romanian 97.85% [ 1870 / 1911 ], fuzzy 24, not translated 17
175
  - Arabic 97.49% [ 1863 / 1911 ], fuzzy 30, not translated 18
176
- - Greek 97.33% [ 1860 / 1911 ], fuzzy 33, not translated 18
177
  - Finnish 97.28% [ 1859 / 1911 ], fuzzy 34, not translated 18
178
  - Portuguese (Brazil) 97.23% [ 1858 / 1911 ], fuzzy 35, not translated 18
179
  - Spanish (Mexico) 97.17% [ 1857 / 1911 ], fuzzy 36, not translated 18
@@ -230,6 +230,18 @@ Please see [Video Guides](https://wpbookingcalendar.com/help/).
230
  13. **Time Slots**. Simple configuration of **time slots** selection in booking form.
231
 
232
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
233
  = 9.1 =
234
  - Changes in **all** versions:
235
  * **New**. Icons for UI elements at booking admin panel. (9.0.1.4)
4
  Tags: booking calendar, booking system, availability calendar, events calendar, appointments , booking form, reservation, availability, booking, calendar, bookings, ical
5
  Requires at least: 4.0
6
  Requires PHP: 5.6
7
+ Tested up to: 6.0
8
+ Stable tag: 9.1.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ Booking Calendar - best booking plugin. Easily get full day or time slot bookings and show availability in a clean and powerful booking system.
13
 
14
  == Description ==
15
 
16
+ ####The original "**Booking Calendar**" plugin is the 1st booking system for WordPress, **downloaded over 2,200,000** times [since 2009](https://wpbookingcalendar.com/changelog/).
17
 
18
  **Booking Calendar** plugin enable awesome **booking system** for your site. Simply show availability and receive bookings for your property or service in easy to use booking system with clean and smooth interface.
19
 
169
  = Support Languages (local) =
170
 
171
  - English
172
+ - Greek 100% [ 1936 / 1936 ], fuzzy 0, not translated 0
173
  - German 99.74% [ 1906 / 1911 ], fuzzy 4, not translated 1
174
  - French (France) 99.74% [ 1906 / 1911 ], fuzzy 4, not translated 1
175
  - Romanian 97.85% [ 1870 / 1911 ], fuzzy 24, not translated 17
176
  - Arabic 97.49% [ 1863 / 1911 ], fuzzy 30, not translated 18
 
177
  - Finnish 97.28% [ 1859 / 1911 ], fuzzy 34, not translated 18
178
  - Portuguese (Brazil) 97.23% [ 1858 / 1911 ], fuzzy 35, not translated 18
179
  - Spanish (Mexico) 97.17% [ 1857 / 1911 ], fuzzy 36, not translated 18
230
  13. **Time Slots**. Simple configuration of **time slots** selection in booking form.
231
 
232
  == Changelog ==
233
+ = 9.1.1 =
234
+ - Changes in **all** versions:
235
+ * **New**. Ability to show tooltips of booked times at mobile devices. (9.2.1.5)
236
+ * **Under Hood** Separate section of code for '#bklnk' in search availability (9.2.1.2)
237
+ * **Fix**. Issue of highlighting today date in calendar, after scrolling calendar months (9.2.1.7)
238
+ * **Fix**. Vulnerability issue relative Deserialization and PHP object injection. (9.2.1.8)
239
+ - Changes in **Personal / Business Small / Business Medium / Business Large / MultiUser** versions:
240
+ * **Fix**. Issue of printing in MS Edge. (9.2.1.6)
241
+ * **Fix**. Error: "Uncaught ReferenceError: wpbc_timeline_obj is not defined" while using [visitorbookingslisting] shortcode in the emails. (9.2.1.3)
242
+ * **Fix**. Issue of not showing icons in popover in Timeline for editing and cancellation while using [visitorbookingslisting] shortcode in the emails. (9.2.1.4)
243
+ * **Fix**. Conflict issue with other plugins, relative generation of random hashes. (9.2.1.9)
244
+
245
  = 9.1 =
246
  - Changes in **all** versions:
247
  * **New**. Icons for UI elements at booking admin panel. (9.0.1.4)
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.1
11
  */
12
 
13
  /* Copyright 2009 - 2022 www.wpbookingcalendar.com (email: info@wpbookingcalendar.com),
@@ -29,7 +29,7 @@ Version: 9.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.1' ); }
33
 
34
  ////////////////////////////////////////////////////////////////////////////////
35
  // PRIMARY URL CONSTANTS
7
  Author URI: https://wpbookingcalendar.com/
8
  Text Domain: booking
9
  Domain Path: /languages/
10
+ Version: 9.1.1
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.1.1' ); }
33
 
34
  ////////////////////////////////////////////////////////////////////////////////
35
  // PRIMARY URL CONSTANTS