Booking Calendar - Version 4.1.4

Version Description

  • Fix several warning notices in the plugin, if the WP_DEBUG constant is set to true at the config.php file.
  • Showing one calendar and the warning message if at the same visible page is showing booking forms or calendars of the same booking resource more than one time.
  • Block loading of the unused JavaScript at the Booking Listing page.
Download this release

Release Info

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

Code changes from version 4.1.3 to 4.1.4

js/wpdev.bk.js CHANGED
@@ -15,6 +15,10 @@
15
 
16
  // Initialisation
17
  function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_of_week, start_bk_month ){
 
 
 
 
18
 
19
  var cl = document.getElementById('calendar_booking'+ bk_type);if (cl == null) return; // Get calendar instance and exit if its not exist
20
 
15
 
16
  // Initialisation
17
  function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_of_week, start_bk_month ){
18
+
19
+ if ( jQuery('#calendar_booking'+ bk_type).hasClass('hasDatepick') == true ) { // If the calendar with the same Booking resource is activated already, then exist.
20
+ return false;
21
+ }
22
 
23
  var cl = document.getElementById('calendar_booking'+ bk_type);if (cl == null) return; // Get calendar instance and exit if its not exist
24
 
lib/wpdev-bk-lib.php CHANGED
@@ -1409,6 +1409,7 @@
1409
  wpdevbk_get_default_bk_listing_filter_set_to_params('default'); // Get saved filters set
1410
 
1411
  if ($_REQUEST['view_mode'] == 'vm_calendar') { // { vm_listing | vm_calendar}
 
1412
  bookings_overview_in_calendar($args); // If shoing the Calendar Overview, so then return from this function
1413
  return;
1414
  }
@@ -2576,7 +2577,7 @@
2576
  default: // 30
2577
  $days_num = 1;
2578
  $cell_width = '99%';;
2579
- //$dwa = array(1=>__('Mon'),2=>__('Tue'),3=>__('Wed'),4=>__('Thu'),5=>__('Fri'),6=>__('Sat'),7=>__('Sun'),);
2580
  $time_selles_num = 24;//25;
2581
  //$view_days_num = 1;
2582
  break;
@@ -2641,6 +2642,8 @@
2641
 
2642
  <div class="calendar_timeline_frame" style="<?php if ($is_show_cell_content) echo 'border-bottom: 1px solid #DD8800;height: 33px !important;'; if ($resource_id == '-1') echo ' width:100%; '; ?>">
2643
  <?php
 
 
2644
  for ($d_inc = 0; $d_inc < $days_num; $d_inc++) {
2645
 
2646
  $real_date = mktime(0, 0, 0, $start_month, ($start_day+$d_inc) , $start_year);
1409
  wpdevbk_get_default_bk_listing_filter_set_to_params('default'); // Get saved filters set
1410
 
1411
  if ($_REQUEST['view_mode'] == 'vm_calendar') { // { vm_listing | vm_calendar}
1412
+ $args = wpdev_get_args_from_request_in_bk_listing(); // Get safy PARAMS from REQUEST
1413
  bookings_overview_in_calendar($args); // If shoing the Calendar Overview, so then return from this function
1414
  return;
1415
  }
2577
  default: // 30
2578
  $days_num = 1;
2579
  $cell_width = '99%';;
2580
+ $dwa = array(1=>__('Mon'),2=>__('Tue'),3=>__('Wed'),4=>__('Thu'),5=>__('Fri'),6=>__('Sat'),7=>__('Sun'),);
2581
  $time_selles_num = 24;//25;
2582
  //$view_days_num = 1;
2583
  break;
2642
 
2643
  <div class="calendar_timeline_frame" style="<?php if ($is_show_cell_content) echo 'border-bottom: 1px solid #DD8800;height: 33px !important;'; if ($resource_id == '-1') echo ' width:100%; '; ?>">
2644
  <?php
2645
+ $is_approved = false;
2646
+ $previous_month = '';
2647
  for ($d_inc = 0; $d_inc < $days_num; $d_inc++) {
2648
 
2649
  $real_date = mktime(0, 0, 0, $start_month, ($start_day+$d_inc) , $start_year);
lib/wpdev-booking-class.php CHANGED
@@ -46,7 +46,7 @@ class wpdev_booking {
46
 
47
  // Load footer data
48
  add_action( 'wp_footer', array(&$this,'wp_footer') );
49
- add_action( 'admin_footer', array(&$this,'print_js_at_footer') );
50
 
51
  // User defined - hooks
52
  add_action( 'wpdev_bk_add_calendar', array(&$this,'add_calendar_action') ,10 , 2);
@@ -3537,12 +3537,13 @@ if ( jQuery('#togle_settings_range_times').length > 0 ) { jQuery('#togle_set
3537
  // Check according already shown Booking Calendar and set do not visible of it
3538
  $return_form .= '<script type="text/javascript">
3539
  jQuery(document).ready( function(){
 
3540
  var visible_booking_id_on_page_num = visible_booking_id_on_page.length;
3541
  if (visible_booking_id_on_page_num !== null ) {
3542
  for (var i=0;i< visible_booking_id_on_page_num ;i++){
3543
  if ( visible_booking_id_on_page[i]=="booking_form_div'.$my_boook_type.'" ) {
3544
- document.getElementById("'.$my_random_id.'").innerHTML = "'.__('Booking calendar for this booking resource are already at the page','wpdev-booking').'";
3545
- jQuery("#'.$my_random_id.'").fadeOut(5000);
3546
  return;
3547
  }
3548
  }
46
 
47
  // Load footer data
48
  add_action( 'wp_footer', array(&$this,'wp_footer') );
49
+ //add_action( 'admin_footer', array(&$this,'print_js_at_footer') );
50
 
51
  // User defined - hooks
52
  add_action( 'wpdev_bk_add_calendar', array(&$this,'add_calendar_action') ,10 , 2);
3537
  // Check according already shown Booking Calendar and set do not visible of it
3538
  $return_form .= '<script type="text/javascript">
3539
  jQuery(document).ready( function(){
3540
+ jQuery(".widget_wpdev_booking .booking_form.form-horizontal").removeClass("form-horizontal");
3541
  var visible_booking_id_on_page_num = visible_booking_id_on_page.length;
3542
  if (visible_booking_id_on_page_num !== null ) {
3543
  for (var i=0;i< visible_booking_id_on_page_num ;i++){
3544
  if ( visible_booking_id_on_page[i]=="booking_form_div'.$my_boook_type.'" ) {
3545
+ document.getElementById("'.$my_random_id.'").innerHTML = "'.sprintf(__('%sWarning! Booking calendar for this booking resource are already at the page, please check more about this issue at %sthis page%s','wpdev-booking'),"<span style='color:#A00;font-size:10px;'>","<a target='_blank' href='http://wpbookingcalendar.com/faq/why-the-booking-calendar-widget-not-show-on-page/'>",'</a></span>').'";
3546
+ jQuery("#'.$my_random_id.'").animate( {opacity: 1}, 10000 ).fadeOut(5000);
3547
  return;
3548
  }
3549
  }
lib/wpdev-booking-functions.php CHANGED
@@ -175,11 +175,14 @@
175
  }
176
 
177
  if ( ($type == 'checkbox') && (isset($checkbox_value)) ) {
178
- if (is_array( $checkbox_value[ str_replace('[]','',(string) $element_name) ] ))
179
- $current_checkbox_value = implode(', ', $checkbox_value[ str_replace('[]','',(string) $element_name) ] );
180
- else
181
- $current_checkbox_value = $checkbox_value[ str_replace('[]','',(string) $element_name) ] ;
182
-
 
 
 
183
  $all_fields_array[ str_replace('[]','',(string) $element_name) ] = $current_checkbox_value;
184
  $all_fields_array_without_types[ substr( str_replace('[]','',(string) $element_name), 0 , -1*strlen( $bktype ) ) ] = $current_checkbox_value;
185
 
175
  }
176
 
177
  if ( ($type == 'checkbox') && (isset($checkbox_value)) ) {
178
+ if (isset( $checkbox_value[ str_replace('[]','',(string) $element_name) ] )) {
179
+ if (is_array( $checkbox_value[ str_replace('[]','',(string) $element_name) ] ))
180
+ $current_checkbox_value = implode(', ', $checkbox_value[ str_replace('[]','',(string) $element_name) ] );
181
+ else
182
+ $current_checkbox_value = $checkbox_value[ str_replace('[]','',(string) $element_name) ] ;
183
+ } else {
184
+ $current_checkbox_value = '';
185
+ }
186
  $all_fields_array[ str_replace('[]','',(string) $element_name) ] = $current_checkbox_value;
187
  $all_fields_array_without_types[ substr( str_replace('[]','',(string) $element_name), 0 , -1*strlen( $bktype ) ) ] = $current_checkbox_value;
188
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wpbookingcalendar.com/buy/
4
  Tags: booking calendar, booking, bookings, to book, calendar, reservation, calendar, hotel, rooms, rent, appointment, scheduling, availability, availability calendar, event, events, event calendar, resource scheduling, rental, meeting scheduling, reservation plugin, accommodations, bookable, bookable events
5
  Requires at least: 2.7
6
  Tested up to: 3.5.2
7
- Stable tag: 4.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -65,6 +65,10 @@ If you have any further questions, please fill free to <a href="mailto:info@wpbo
65
  9. General Booking Settings page.
66
  10. Booking Listing (Filters tab) admin panel. Apply filter, for looking of your required bookings.
67
  == Changelog ==
 
 
 
 
68
  = 4.1.3 =
69
  * Translation of Booking Calendar Plugin, into Hebrew, by Eli Segev.
70
  * Fix issue of not submiting the booking form, when the blog is installed not to the root of site (when Site URL and WordPress URL at the WordPress Settings are different)
4
  Tags: booking calendar, booking, bookings, to book, calendar, reservation, calendar, hotel, rooms, rent, appointment, scheduling, availability, availability calendar, event, events, event calendar, resource scheduling, rental, meeting scheduling, reservation plugin, accommodations, bookable, bookable events
5
  Requires at least: 2.7
6
  Tested up to: 3.5.2
7
+ Stable tag: 4.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
65
  9. General Booking Settings page.
66
  10. Booking Listing (Filters tab) admin panel. Apply filter, for looking of your required bookings.
67
  == Changelog ==
68
+ = 4.1.4 =
69
+ * Fix several warning notices in the plugin, if the WP_DEBUG constant is set to true at the config.php file.
70
+ * Showing one calendar and the warning message if at the same visible page is showing booking forms or calendars of the same booking resource more than one time.
71
+ * Block loading of the unused JavaScript at the Booking Listing page.
72
  = 4.1.3 =
73
  * Translation of Booking Calendar Plugin, into Hebrew, by Eli Segev.
74
  * Fix issue of not submiting the booking form, when the blog is installed not to the root of site (when Site URL and WordPress URL at the WordPress Settings are different)
wpdev-booking.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Booking Calendar
4
  Plugin URI: http://wpbookingcalendar.com/demo/
5
  Description: Online reservation and availability checking service for your site.
6
- Version: 4.1.3
7
  Author: wpdevelop
8
  Author URI: http://wpbookingcalendar.com/
9
  Tested WordPress Versions: 2.8.3 - 3.5.2
@@ -33,6 +33,14 @@ Tested WordPress Versions: 2.8.3 - 3.5.2
33
  -----------------------------------------------
34
  Change Log and Features for Future Releases :
35
  -----------------------------------------------
 
 
 
 
 
 
 
 
36
  = 4.1.3 =
37
  * Personal / Business Small / Business Medium / Business Large / MultiUser versions features:
38
  *
3
  Plugin Name: Booking Calendar
4
  Plugin URI: http://wpbookingcalendar.com/demo/
5
  Description: Online reservation and availability checking service for your site.
6
+ Version: 4.1.4
7
  Author: wpdevelop
8
  Author URI: http://wpbookingcalendar.com/
9
  Tested WordPress Versions: 2.8.3 - 3.5.2
33
  -----------------------------------------------
34
  Change Log and Features for Future Releases :
35
  -----------------------------------------------
36
+ = 4.1.4 =
37
+ * Personal / Business Small / Business Medium / Business Large / MultiUser versions features:
38
+ *
39
+ * Features and issue fixings in All versions:
40
+ * Fix several warning notices in the plugin, if the WP_DEBUG constant is set to true at the config.php file.
41
+ * Showing one calendar and the "Warning" message if at the same visible page is showing booking forms or calendars of the same booking resource more than one time.
42
+ * Block loading of the unused JavaScript at the Booking Listing page.
43
+
44
  = 4.1.3 =
45
  * Personal / Business Small / Business Medium / Business Large / MultiUser versions features:
46
  *