Booking Calendar - Version 8.1

Version Description

  • Changes in all versions:
    • New Ability to define different structures of booking forms at Booking > Settings > Form page: "Vertical", "Side by side", "Centered", "Dark"
    • New Ability to insert modification/creation date or (Year, month, day, hours, minutes or seconds) of booking into email templates or in payment summary
    • Improvement Improve admin UI styles in Chrome browser, by setting more sleek view of UI elements (8.0.2.4/5)
    • Improvement Export to .ics feed bookings, that does not inside of Trash folder (8.0.2.7)
    • Translation Spanish translation [100% completed] by Martin Romero
    • Translation Galician (Spanish) translation [100% completed] by Martin Romero
    • Fix showing booking listing correctly for "next 1 month" without bookings, that include past ("yesterday day") bookings (8.0.1.1)
    • Fix force to load jquery-migrate in case, if we do not know the version of jQuery which was loaded. (8.0.1.2)
    • Fix issue of showing warning "parsererror ~ SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" during import process, when some bookings already was imported (8.0.2.1)
    • Fix add support of Apache 2.4 directives relative captcha saving.
    • Fix issue of showing warning: "Email different from website DNS, its can be a reason of not delivery emails" at Booking > Settings > Emails page, in case if website DNS starting with "www." ot some other sub-domain. (8.0.2.9)
  • Changes in Personal / Business Small / Business Medium / Business Large / MultiUser versions:
    • New Integration with Stripe payment gateway. (Business Small/Medium/Large, MultiUser)
    • New. Shortcode for showing check out date plus one additional day: [check_out_plus1day_hint] at Booking > Settings > Form page. (8.0.2.12) (Business Medium/Large, MultiUser)
    • Fix showing correctly change-over days (triangles), when inserted only "availability calendar", without booking form (8.0.1.2) (Business Small/Medium/Large, MultiUser)
    • Fix ability to use symbol / in placeholders in booking form fields shortcodes at Settings Form page (8.0.1.13) (Personal Business Small/Medium/Large, MultiUser)
    • Fix correctly showing single and double quotes (' and ") symbols in textarea during editing booking (8.0.1.3) (Personal Business Small/Medium/Large, MultiUser)
    • Fix issue of not saving changes during editing, if you try to search some booking resource (or other item), and this booking resource was not at the 1st page (during usual listing) (8.0.1.12) (Personal Business Small/Medium/Large, MultiUser)
    • Fix issue of incorrect cost calculation, during editing booking, when selected days from 1 to 9 and used some rates. Issue relative of not using leading 0 in textarea. (8.0.2.2) (Business Medium/Large, MultiUser)
    • Fix issue of showing coupon discount description, does not depend from uppercase or lowercase of entered coupon code (8.0.2.7) (Business Large, MultiUser)
Download this release

Release Info

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

Code changes from version 8.0.1 to 8.1

Files changed (82) hide show
  1. core/admin/api-settings.php +46 -9
  2. core/admin/page-bookings.php +2 -1
  3. core/admin/page-email-approved.php +18 -7
  4. core/admin/page-email-deleted.php +18 -7
  5. core/admin/page-email-deny.php +19 -8
  6. core/admin/page-email-new-admin.php +20 -9
  7. core/admin/page-email-new-visitor.php +18 -7
  8. core/admin/page-email-trash.php +18 -7
  9. core/admin/page-form-free.php +295 -92
  10. core/admin/page-ics-export.php +13 -5
  11. core/admin/page-ics-import.php +14 -8
  12. core/admin/page-import-gcal.php +22 -10
  13. core/admin/page-new.php +4 -2
  14. core/admin/page-settings.php +4 -2
  15. core/admin/page-timeline.php +2 -1
  16. core/admin/page-up.php +101 -0
  17. core/admin/wpbc-class-listing.php +7 -4
  18. core/admin/wpbc-class-timeline.php +16 -8
  19. core/admin/wpbc-dashboard.php +6 -2
  20. core/admin/wpbc-sql.php +27 -15
  21. core/admin/wpbc-toolbar-tiny.php +4 -2
  22. core/admin/wpbc-toolbars.php +41 -7
  23. core/any/activation.php +8 -4
  24. core/any/admin-bs-ui.php +28 -14
  25. core/any/api-emails.php +38 -19
  26. core/any/class-admin-menu.php +10 -5
  27. core/any/class-admin-page-structure.php +26 -13
  28. core/any/class-admin-settings-api.php +14 -7
  29. core/any/class-css-js.php +4 -2
  30. core/any/css/admin-listing-table.css +1 -1
  31. core/any/js/admin-support.js +27 -18
  32. core/class/wpbc-class-welcome.php +106 -9
  33. core/lib/wpbc-booking-new.php +2 -1
  34. core/lib/wpdev-booking-class.php +58 -49
  35. core/lib/wpdev-booking-widget.php +4 -2
  36. core/wpbc-activation.php +16 -9
  37. core/wpbc-constants.php +3 -2
  38. core/wpbc-css.php +4 -2
  39. core/wpbc-dates.php +37 -19
  40. core/wpbc-debug.php +6 -3
  41. core/wpbc-dev-api.php +24 -5
  42. core/wpbc-emails.php +27 -9
  43. core/wpbc-functions.php +155 -50
  44. core/wpbc-include.php +2 -1
  45. core/wpbc-js.php +22 -5
  46. core/wpbc-translation.php +8 -4
  47. core/wpbc.php +50 -30
  48. css/admin-skin.css +152 -0
  49. css/admin.css +12 -1
  50. css/client.css +73 -0
  51. js/admin.js +12 -6
  52. js/client.js +81 -22
  53. languages/booking-ar_SA.mo +0 -0
  54. languages/booking-be_BY.mo +0 -0
  55. languages/booking-bg_BG.mo +0 -0
  56. languages/booking-ca.mo +0 -0
  57. languages/booking-cs_CZ.mo +0 -0
  58. languages/booking-da_DK.mo +0 -0
  59. languages/booking-de_DE.mo +0 -0
  60. languages/booking-el.mo +0 -0
  61. languages/booking-es_ES.mo +0 -0
  62. languages/booking-fi.mo +0 -0
  63. languages/booking-fr_FR.mo +0 -0
  64. languages/booking-gl_ES.mo +0 -0
  65. languages/booking-he_IL.mo +0 -0
  66. languages/booking-hr.mo +0 -0
  67. languages/booking-hu_HU.mo +0 -0
  68. languages/booking-it_IT.mo +0 -0
  69. languages/booking-nb_NO.mo +0 -0
  70. languages/booking-nl_NL.mo +0 -0
  71. languages/booking-pl_PL.mo +0 -0
  72. languages/booking-pt_BR.mo +0 -0
  73. languages/booking-pt_PT.mo +0 -0
  74. languages/booking-ru_RU.mo +0 -0
  75. languages/booking-sk_SK.mo +0 -0
  76. languages/booking-sv_SE.mo +0 -0
  77. languages/booking-tr_TR.mo +0 -0
  78. languages/booking-uk_UK.mo +0 -0
  79. languages/booking-zh_CN.mo +0 -0
  80. languages/booking-zh_TW.mo +0 -0
  81. readme.txt +58 -33
  82. wpdev-booking.php +2 -2
core/admin/api-settings.php CHANGED
@@ -17,7 +17,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
17
  class WPBC_Settings_API_General extends WPBC_Settings_API {
18
 
19
 
20
- /** Override Settings API Constructor
 
21
  * During creation, system try to load values from DB, if exist.
22
  *
23
  * @param type $id - of Settings
@@ -231,7 +232,26 @@ class WPBC_Settings_API_General extends WPBC_Settings_API {
231
 
232
 
233
  // <editor-fold defaultstate="collapsed" desc=" F o r m S e c t i o n " >
234
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  $this->fields['booking_is_use_captcha'] = array(
236
  'type' => 'checkbox'
237
  , 'default' => $default_options_values['booking_is_use_captcha'] //'Off'
@@ -931,9 +951,9 @@ class WPBC_Settings_API_General extends WPBC_Settings_API {
931
  , 'group' => 'permissions'
932
  , 'is_demo_safe' => wpbc_is_this_demo()
933
  );
934
- $this->fields['booking_user_role_settings'] = array(
935
  'type' => 'select'
936
- , 'default' => $default_options_values['booking_user_role_settings'] //'administrator'
937
  , 'title' => __('Settings', 'booking')
938
  , 'description' => __('Select user access level for the menu pages of plugin' ,'booking')
939
  , 'description_tag' => 'p'
@@ -941,8 +961,23 @@ class WPBC_Settings_API_General extends WPBC_Settings_API {
941
  , 'group' => 'permissions'
942
  , 'is_demo_safe' => wpbc_is_this_demo()
943
  );
944
-
945
- if ( wpbc_is_this_demo() )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
946
  $this->fields['booking_user_role_settings_demo'] = array( 'group' => 'permissions', 'type' => 'html', 'html' => wpbc_get_warning_text_in_demo_mode(), 'cols' => 2 );
947
 
948
 
@@ -990,7 +1025,8 @@ class WPBC_Settings_API_General extends WPBC_Settings_API {
990
  }
991
 
992
 
993
- /** Add Custon JavaScript - for some specific settings options
 
994
  * Need to executes after showing of entire settings page (on hook: wpbc_after_settings_content).
995
  * After initial definition of settings, and possible definition after POST request.
996
  *
@@ -1217,10 +1253,11 @@ class WPBC_Settings_API_General extends WPBC_Settings_API {
1217
  }
1218
 
1219
 
1220
- /** Override VALIDATED fields BEFORE saving to DB
 
1221
  * Description:
1222
  * Check "Thank you page" URL
1223
- *
1224
  * @param array $validated_fields
1225
  */
1226
  function wpbc_settings_validate_fields_before_saving__all( $validated_fields ) {
17
  class WPBC_Settings_API_General extends WPBC_Settings_API {
18
 
19
 
20
+ /**
21
+ * Override Settings API Constructor
22
  * During creation, system try to load values from DB, if exist.
23
  *
24
  * @param type $id - of Settings
232
 
233
 
234
  // <editor-fold defaultstate="collapsed" desc=" F o r m S e c t i o n " >
235
+
236
+
237
+ // Start Day of the week /////////////////////////////////////////////
238
+ /*
239
+ if ( ! class_exists('wpdev_bk_personal') )
240
+ $this->fields['booking_form_structure_type'] = array(
241
+ 'type' => 'select'
242
+ , 'default' => $default_options_values['booking_form_structure_type'] // '2'
243
+ // , 'value' => false
244
+ , 'title' => __('Booking form structure', 'booking')
245
+ , 'description' => __('Select how to show your booking form.' ,'booking')
246
+ , 'description_tag' => 'p'
247
+ , 'options' => array(
248
+ 'vertical' => __('Form under calendar' ,'booking')
249
+ , 'form_right' => __('Form at right side of calendar' ,'booking')
250
+ )
251
+ , 'group' => 'form'
252
+ );
253
+ */
254
+
255
  $this->fields['booking_is_use_captcha'] = array(
256
  'type' => 'checkbox'
257
  , 'default' => $default_options_values['booking_is_use_captcha'] //'Off'
951
  , 'group' => 'permissions'
952
  , 'is_demo_safe' => wpbc_is_this_demo()
953
  );
954
+ $this->fields['booking_user_role_settings'] = array(
955
  'type' => 'select'
956
+ , 'default' => $default_options_values['booking_user_role_settings'] //'administrator'
957
  , 'title' => __('Settings', 'booking')
958
  , 'description' => __('Select user access level for the menu pages of plugin' ,'booking')
959
  , 'description_tag' => 'p'
961
  , 'group' => 'permissions'
962
  , 'is_demo_safe' => wpbc_is_this_demo()
963
  );
964
+
965
+ if ( ! class_exists( 'wpdev_bk_personal' ) )
966
+ $this->fields['booking_menu_go_pro'] = array(
967
+ 'type' => 'select'
968
+ , 'default' => $default_options_values['booking_menu_go_pro'] //'administrator'
969
+ , 'title' => __('Premium', 'booking')
970
+ , 'description' => __('Show / hide menu' ,'booking')
971
+ , 'description_tag' => 'p'
972
+ , 'options' => array(
973
+ 'show' => __('Show', 'booking')
974
+ , 'hide' => __('Hide', 'booking')
975
+ )
976
+ , 'group' => 'permissions'
977
+ , 'is_demo_safe' => wpbc_is_this_demo()
978
+ );
979
+
980
+ if ( wpbc_is_this_demo() )
981
  $this->fields['booking_user_role_settings_demo'] = array( 'group' => 'permissions', 'type' => 'html', 'html' => wpbc_get_warning_text_in_demo_mode(), 'cols' => 2 );
982
 
983
 
1025
  }
1026
 
1027
 
1028
+ /**
1029
+ * Add Custon JavaScript - for some specific settings options
1030
  * Need to executes after showing of entire settings page (on hook: wpbc_after_settings_content).
1031
  * After initial definition of settings, and possible definition after POST request.
1032
  *
1253
  }
1254
 
1255
 
1256
+ /**
1257
+ * Override VALIDATED fields BEFORE saving to DB
1258
  * Description:
1259
  * Check "Thank you page" URL
1260
+ *
1261
  * @param array $validated_fields
1262
  */
1263
  function wpbc_settings_validate_fields_before_saving__all( $validated_fields ) {
core/admin/page-bookings.php CHANGED
@@ -14,7 +14,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
 
16
 
17
- /** Show Content
 
18
  * Update Content
19
  * Define Slug
20
  * Define where to show
14
 
15
 
16
 
17
+ /**
18
+ * Show Content
19
  * Update Content
20
  * Define Slug
21
  * Define where to show
core/admin/page-email-approved.php CHANGED
@@ -493,7 +493,8 @@ class WPBC_Settings_Page_Email_Approved extends WPBC_Page_Structure {
493
  public $email_settings_api = false;
494
 
495
 
496
- /** Define interface for Email API
 
497
  *
498
  * @param string $selected_email_name - name of Email template
499
  * @param array $init_fields_values - array of init form fields data
@@ -865,7 +866,8 @@ class WPBC_Settings_Page_Email_Approved extends WPBC_Page_Structure {
865
  }
866
 
867
 
868
- /** Add Custon JavaScript - for some specific settings options
 
869
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
870
  *
871
  * @param type $menu_slug
@@ -917,8 +919,12 @@ class WPBC_Settings_Page_Email_Approved extends WPBC_Page_Structure {
917
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
918
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
919
 
920
- $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // server.com
921
- $js_script .= " if ( wpbc_email_from != wpbc_website_dns ) {";
 
 
 
 
922
  $js_script .= " jQuery('#approved_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
923
  $js_script .= " }";
924
 
@@ -939,7 +945,8 @@ add_action('wpbc_menu_created', array( new WPBC_Settings_Page_Email_Approved()
939
 
940
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending" >
941
 
942
- /** Get ShortCodes to Replace
 
943
  *
944
  * @param int $booking_id - ID of booking
945
  * @param int $bktype - booking resource type
@@ -1011,14 +1018,18 @@ function wpbc__get_replace_shortcodes__email_approved( $booking_id, $bktype, $fo
1011
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
1012
 
1013
  ////////////////////////////////////////////////////////////////////////////
1014
-
 
 
 
1015
  return $replace;
1016
 
1017
 
1018
  }
1019
 
1020
 
1021
- /** Send email
 
1022
  *
1023
  * @param type $booking_id - ID of booking
1024
  * @param type $bktype - type
493
  public $email_settings_api = false;
494
 
495
 
496
+ /**
497
+ * Define interface for Email API
498
  *
499
  * @param string $selected_email_name - name of Email template
500
  * @param array $init_fields_values - array of init form fields data
866
  }
867
 
868
 
869
+ /**
870
+ * Add Custon JavaScript - for some specific settings options
871
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
872
  *
873
  * @param type $menu_slug
919
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
920
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
921
 
922
+ $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // www.server.com
923
+ //FixIn: 8.0.2.9
924
+ $js_script .= " var wpbc_website_dns_sub = jQuery(location).attr('hostname').split('.');"; // ['www', 'server', 'com']
925
+ $js_script .= " wpbc_website_dns_sub.shift();"; // ['server', 'com']
926
+ $js_script .= " wpbc_website_dns_sub = wpbc_website_dns_sub.join('.');"; // 'server.com'
927
+ $js_script .= " if ( ( wpbc_email_from != wpbc_website_dns_sub ) && ( wpbc_email_from != wpbc_website_dns ) ){";
928
  $js_script .= " jQuery('#approved_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
929
  $js_script .= " }";
930
 
945
 
946
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending" >
947
 
948
+ /**
949
+ * Get ShortCodes to Replace
950
  *
951
  * @param int $booking_id - ID of booking
952
  * @param int $bktype - booking resource type
1018
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
1019
 
1020
  ////////////////////////////////////////////////////////////////////////////
1021
+ // Get additional replace paramaters to the email shortcodes
1022
+ $replace = apply_filters( 'wpbc_replace_params_for_booking', $replace, $booking_id, $bktype, $formdata ); //FixIn: 8.0.1.7
1023
+
1024
+
1025
  return $replace;
1026
 
1027
 
1028
  }
1029
 
1030
 
1031
+ /**
1032
+ * Send email
1033
  *
1034
  * @param type $booking_id - ID of booking
1035
  * @param type $bktype - type
core/admin/page-email-deleted.php CHANGED
@@ -439,7 +439,8 @@ class WPBC_Settings_Page_Email_Deleted extends WPBC_Page_Structure {
439
  public $email_settings_api = false;
440
 
441
 
442
- /** Define interface for Email API
 
443
  *
444
  * @param string $selected_email_name - name of Email template
445
  * @param array $init_fields_values - array of init form fields data
@@ -811,7 +812,8 @@ class WPBC_Settings_Page_Email_Deleted extends WPBC_Page_Structure {
811
  }
812
 
813
 
814
- /** Add Custon JavaScript - for some specific settings options
 
815
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
816
  *
817
  * @param type $menu_slug
@@ -863,8 +865,12 @@ class WPBC_Settings_Page_Email_Deleted extends WPBC_Page_Structure {
863
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
864
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
865
 
866
- $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // server.com
867
- $js_script .= " if ( wpbc_email_from != wpbc_website_dns ) {";
 
 
 
 
868
  $js_script .= " jQuery('#deleted_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
869
  $js_script .= " }";
870
 
@@ -885,7 +891,8 @@ add_action('wpbc_menu_created', array( new WPBC_Settings_Page_Email_Deleted() ,
885
 
886
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending" >
887
 
888
- /** Get ShortCodes to Replace
 
889
  *
890
  * @param int $booking_id - ID of booking
891
  * @param int $bktype - booking resource type
@@ -957,14 +964,18 @@ function wpbc__get_replace_shortcodes__email_deleted( $booking_id, $bktype, $for
957
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
958
 
959
  ////////////////////////////////////////////////////////////////////////////
960
-
 
 
 
961
  return $replace;
962
 
963
 
964
  }
965
 
966
 
967
- /** Send email
 
968
  *
969
  * @param type $booking_id - ID of booking
970
  * @param type $bktype - type
439
  public $email_settings_api = false;
440
 
441
 
442
+ /**
443
+ * Define interface for Email API
444
  *
445
  * @param string $selected_email_name - name of Email template
446
  * @param array $init_fields_values - array of init form fields data
812
  }
813
 
814
 
815
+ /**
816
+ * Add Custon JavaScript - for some specific settings options
817
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
818
  *
819
  * @param type $menu_slug
865
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
866
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
867
 
868
+ $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // www.server.com
869
+ //FixIn: 8.0.2.9
870
+ $js_script .= " var wpbc_website_dns_sub = jQuery(location).attr('hostname').split('.');"; // ['www', 'server', 'com']
871
+ $js_script .= " wpbc_website_dns_sub.shift();"; // ['server', 'com']
872
+ $js_script .= " wpbc_website_dns_sub = wpbc_website_dns_sub.join('.');"; // 'server.com'
873
+ $js_script .= " if ( ( wpbc_email_from != wpbc_website_dns_sub ) && ( wpbc_email_from != wpbc_website_dns ) ){";
874
  $js_script .= " jQuery('#deleted_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
875
  $js_script .= " }";
876
 
891
 
892
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending" >
893
 
894
+ /**
895
+ * Get ShortCodes to Replace
896
  *
897
  * @param int $booking_id - ID of booking
898
  * @param int $bktype - booking resource type
964
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
965
 
966
  ////////////////////////////////////////////////////////////////////////////
967
+ // Get additional replace paramaters to the email shortcodes
968
+ $replace = apply_filters( 'wpbc_replace_params_for_booking', $replace, $booking_id, $bktype, $formdata ); //FixIn: 8.0.1.7
969
+
970
+
971
  return $replace;
972
 
973
 
974
  }
975
 
976
 
977
+ /**
978
+ * Send email
979
  *
980
  * @param type $booking_id - ID of booking
981
  * @param type $bktype - type
core/admin/page-email-deny.php CHANGED
@@ -439,7 +439,8 @@ class WPBC_Settings_Page_Email_Deny extends WPBC_Page_Structure {
439
  public $email_settings_api = false;
440
 
441
 
442
- /** Define interface for Email API
 
443
  *
444
  * @param string $selected_email_name - name of Email template
445
  * @param array $init_fields_values - array of init form fields data
@@ -498,7 +499,7 @@ class WPBC_Settings_Page_Email_Deny extends WPBC_Page_Structure {
498
  'type' => 'subtab' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
499
  , 'title' => $icon . __('Pending' ,'booking') . $sufix // Title of TAB
500
  , 'page_title' => __('Emails Settings', 'booking') // Title of Page
501
- , 'hint' => __('Customization of email template, which is sending to Visitor after Cancellation of booking' ,'booking') // Hint
502
  , 'link' => '' // link
503
  , 'position' => '' // 'left' || 'right' || ''
504
  , 'css_classes' => '' // CSS class(es)
@@ -811,7 +812,8 @@ class WPBC_Settings_Page_Email_Deny extends WPBC_Page_Structure {
811
  }
812
 
813
 
814
- /** Add Custon JavaScript - for some specific settings options
 
815
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
816
  *
817
  * @param type $menu_slug
@@ -863,8 +865,12 @@ class WPBC_Settings_Page_Email_Deny extends WPBC_Page_Structure {
863
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
864
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
865
 
866
- $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // server.com
867
- $js_script .= " if ( wpbc_email_from != wpbc_website_dns ) {";
 
 
 
 
868
  $js_script .= " jQuery('#deny_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
869
  $js_script .= " }";
870
 
@@ -885,7 +891,8 @@ add_action('wpbc_menu_created', array( new WPBC_Settings_Page_Email_Deny() , '_
885
 
886
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending" >
887
 
888
- /** Get ShortCodes to Replace
 
889
  *
890
  * @param int $booking_id - ID of booking
891
  * @param int $bktype - booking resource type
@@ -957,14 +964,18 @@ function wpbc__get_replace_shortcodes__email_deny( $booking_id, $bktype, $formda
957
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
958
 
959
  ////////////////////////////////////////////////////////////////////////////
960
-
 
 
 
961
  return $replace;
962
 
963
 
964
  }
965
 
966
 
967
- /** Send email
 
968
  *
969
  * @param type $booking_id - ID of booking
970
  * @param type $bktype - type
439
  public $email_settings_api = false;
440
 
441
 
442
+ /**
443
+ * Define interface for Email API
444
  *
445
  * @param string $selected_email_name - name of Email template
446
  * @param array $init_fields_values - array of init form fields data
499
  'type' => 'subtab' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
500
  , 'title' => $icon . __('Pending' ,'booking') . $sufix // Title of TAB
501
  , 'page_title' => __('Emails Settings', 'booking') // Title of Page
502
+ , 'hint' => __('Customization of email template, which is sending to Visitor, when booking status is set to Pending' ,'booking') // Hint
503
  , 'link' => '' // link
504
  , 'position' => '' // 'left' || 'right' || ''
505
  , 'css_classes' => '' // CSS class(es)
812
  }
813
 
814
 
815
+ /**
816
+ * Add Custon JavaScript - for some specific settings options
817
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
818
  *
819
  * @param type $menu_slug
865
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
866
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
867
 
868
+ $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // www.server.com
869
+ //FixIn: 8.0.2.9
870
+ $js_script .= " var wpbc_website_dns_sub = jQuery(location).attr('hostname').split('.');"; // ['www', 'server', 'com']
871
+ $js_script .= " wpbc_website_dns_sub.shift();"; // ['server', 'com']
872
+ $js_script .= " wpbc_website_dns_sub = wpbc_website_dns_sub.join('.');"; // 'server.com'
873
+ $js_script .= " if ( ( wpbc_email_from != wpbc_website_dns_sub ) && ( wpbc_email_from != wpbc_website_dns ) ){";
874
  $js_script .= " jQuery('#deny_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
875
  $js_script .= " }";
876
 
891
 
892
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending" >
893
 
894
+ /**
895
+ * Get ShortCodes to Replace
896
  *
897
  * @param int $booking_id - ID of booking
898
  * @param int $bktype - booking resource type
964
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
965
 
966
  ////////////////////////////////////////////////////////////////////////////
967
+ // Get additional replace paramaters to the email shortcodes
968
+ $replace = apply_filters( 'wpbc_replace_params_for_booking', $replace, $booking_id, $bktype, $formdata ); //FixIn: 8.0.1.7
969
+
970
+
971
  return $replace;
972
 
973
 
974
  }
975
 
976
 
977
+ /**
978
+ * Send email
979
  *
980
  * @param type $booking_id - ID of booking
981
  * @param type $bktype - type
core/admin/page-email-new-admin.php CHANGED
@@ -474,7 +474,8 @@ class WPBC_Settings_Page_Email_NewAdmin extends WPBC_Page_Structure {
474
  public $email_settings_api = false;
475
 
476
 
477
- /** Define interface for Email API
 
478
  *
479
  * @param string $selected_email_name - name of Email template
480
  * @param array $init_fields_values - array of init form fields data
@@ -922,7 +923,8 @@ class WPBC_Settings_Page_Email_NewAdmin extends WPBC_Page_Structure {
922
 
923
 
924
 
925
- /** Add Custon JavaScript - for some specific settings options
 
926
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
927
  *
928
  * @param type $menu_slug
@@ -974,8 +976,12 @@ class WPBC_Settings_Page_Email_NewAdmin extends WPBC_Page_Structure {
974
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
975
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
976
 
977
- $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // server.com
978
- $js_script .= " if ( wpbc_email_from != wpbc_website_dns ) {";
 
 
 
 
979
  $js_script .= " jQuery('#new_admin_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
980
  $js_script .= " }";
981
 
@@ -996,13 +1002,14 @@ add_action('wpbc_menu_created', array( new WPBC_Settings_Page_Email_NewAdmin()
996
 
997
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending After New Booking " >
998
 
999
- /** Get ShortCodes to Replace
 
1000
  *
1001
  * @param int $booking_id - ID of booking
1002
  * @param int $bktype - booking resource type
1003
  * @param string $formdata - booking form data content
1004
  */
1005
- function wpbc__get_replace_shortcodes__email_new_admin( $booking_id, $bktype, $formdata ) {
1006
 
1007
  $replace = array();
1008
 
@@ -1074,8 +1081,11 @@ function wpbc__get_replace_shortcodes__email_new_admin( $booking_id, $bktype, $f
1074
  $replace[ 'add_to_google_cal_url' ] = htmlspecialchars_decode( esc_url(
1075
  wpbc_btn_add_booking_to_google_calendar( $booking_data , array( 'is_only_url' => true ), false )
1076
  ) );
1077
-
1078
-
 
 
 
1079
  ////////////////////////////////////////////////////////////////////////////
1080
 
1081
  return $replace;
@@ -1084,7 +1094,8 @@ function wpbc__get_replace_shortcodes__email_new_admin( $booking_id, $bktype, $f
1084
  }
1085
 
1086
 
1087
- /** Send email about New Booking to Admin
 
1088
  *
1089
  * @param type $booking_id - ID of booking
1090
  * @param type $bktype - type
474
  public $email_settings_api = false;
475
 
476
 
477
+ /**
478
+ * Define interface for Email API
479
  *
480
  * @param string $selected_email_name - name of Email template
481
  * @param array $init_fields_values - array of init form fields data
923
 
924
 
925
 
926
+ /**
927
+ * Add Custon JavaScript - for some specific settings options
928
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
929
  *
930
  * @param type $menu_slug
976
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
977
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
978
 
979
+ $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // www.server.com
980
+ //FixIn: 8.0.2.9
981
+ $js_script .= " var wpbc_website_dns_sub = jQuery(location).attr('hostname').split('.');"; // ['www', 'server', 'com']
982
+ $js_script .= " wpbc_website_dns_sub.shift();"; // ['server', 'com']
983
+ $js_script .= " wpbc_website_dns_sub = wpbc_website_dns_sub.join('.');"; // 'server.com'
984
+ $js_script .= " if ( ( wpbc_email_from != wpbc_website_dns_sub ) && ( wpbc_email_from != wpbc_website_dns ) ){";
985
  $js_script .= " jQuery('#new_admin_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
986
  $js_script .= " }";
987
 
1002
 
1003
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending After New Booking " >
1004
 
1005
+ /**
1006
+ * Get ShortCodes to Replace
1007
  *
1008
  * @param int $booking_id - ID of booking
1009
  * @param int $bktype - booking resource type
1010
  * @param string $formdata - booking form data content
1011
  */
1012
+ function wpbc__get_replace_shortcodes__email_new_admin( $booking_id, $bktype, $formdata ) {
1013
 
1014
  $replace = array();
1015
 
1081
  $replace[ 'add_to_google_cal_url' ] = htmlspecialchars_decode( esc_url(
1082
  wpbc_btn_add_booking_to_google_calendar( $booking_data , array( 'is_only_url' => true ), false )
1083
  ) );
1084
+
1085
+
1086
+ // Get additional replace paramaters to the email shortcodes
1087
+ $replace = apply_filters( 'wpbc_replace_params_for_booking', $replace, $booking_id, $bktype, $formdata ); //FixIn: 8.0.1.7
1088
+
1089
  ////////////////////////////////////////////////////////////////////////////
1090
 
1091
  return $replace;
1094
  }
1095
 
1096
 
1097
+ /**
1098
+ * Send email about New Booking to Admin
1099
  *
1100
  * @param type $booking_id - ID of booking
1101
  * @param type $bktype - type
core/admin/page-email-new-visitor.php CHANGED
@@ -481,7 +481,8 @@ class WPBC_Settings_Page_Email_NewVisitor extends WPBC_Page_Structure {
481
  public $email_settings_api = false;
482
 
483
 
484
- /** Define interface for Email API
 
485
  *
486
  * @param string $selected_email_name - name of Email template
487
  * @param array $init_fields_values - array of init form fields data
@@ -847,7 +848,8 @@ class WPBC_Settings_Page_Email_NewVisitor extends WPBC_Page_Structure {
847
  }
848
 
849
 
850
- /** Add Custon JavaScript - for some specific settings options
 
851
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
852
  *
853
  * @param type $menu_slug
@@ -899,8 +901,12 @@ class WPBC_Settings_Page_Email_NewVisitor extends WPBC_Page_Structure {
899
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
900
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
901
 
902
- $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // server.com
903
- $js_script .= " if ( wpbc_email_from != wpbc_website_dns ) {";
 
 
 
 
904
  $js_script .= " jQuery('#new_visitor_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
905
  $js_script .= " }";
906
 
@@ -921,7 +927,8 @@ add_action('wpbc_menu_created', array( new WPBC_Settings_Page_Email_NewVisitor(
921
 
922
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending After New Booking " >
923
 
924
- /** Get ShortCodes to Replace
 
925
  *
926
  * @param int $booking_id - ID of booking
927
  * @param int $bktype - booking resource type
@@ -995,14 +1002,18 @@ function wpbc__get_replace_shortcodes__email_new_visitor( $booking_id, $bktype,
995
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
996
 
997
  ////////////////////////////////////////////////////////////////////////////
998
-
 
 
 
999
  return $replace;
1000
 
1001
 
1002
  }
1003
 
1004
 
1005
- /** Send email about New Booking to Visitor
 
1006
  *
1007
  * @param type $booking_id - ID of booking
1008
  * @param type $bktype - type
481
  public $email_settings_api = false;
482
 
483
 
484
+ /**
485
+ * Define interface for Email API
486
  *
487
  * @param string $selected_email_name - name of Email template
488
  * @param array $init_fields_values - array of init form fields data
848
  }
849
 
850
 
851
+ /**
852
+ * Add Custon JavaScript - for some specific settings options
853
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
854
  *
855
  * @param type $menu_slug
901
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
902
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
903
 
904
+ $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // www.server.com
905
+ //FixIn: 8.0.2.9
906
+ $js_script .= " var wpbc_website_dns_sub = jQuery(location).attr('hostname').split('.');"; // ['www', 'server', 'com']
907
+ $js_script .= " wpbc_website_dns_sub.shift();"; // ['server', 'com']
908
+ $js_script .= " wpbc_website_dns_sub = wpbc_website_dns_sub.join('.');"; // 'server.com'
909
+ $js_script .= " if ( ( wpbc_email_from != wpbc_website_dns_sub ) && ( wpbc_email_from != wpbc_website_dns ) ){";
910
  $js_script .= " jQuery('#new_visitor_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
911
  $js_script .= " }";
912
 
927
 
928
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending After New Booking " >
929
 
930
+ /**
931
+ * Get ShortCodes to Replace
932
  *
933
  * @param int $booking_id - ID of booking
934
  * @param int $bktype - booking resource type
1002
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
1003
 
1004
  ////////////////////////////////////////////////////////////////////////////
1005
+ // Get additional replace paramaters to the email shortcodes
1006
+ $replace = apply_filters( 'wpbc_replace_params_for_booking', $replace, $booking_id, $bktype, $formdata ); //FixIn: 8.0.1.7
1007
+
1008
+
1009
  return $replace;
1010
 
1011
 
1012
  }
1013
 
1014
 
1015
+ /**
1016
+ * Send email about New Booking to Visitor
1017
  *
1018
  * @param type $booking_id - ID of booking
1019
  * @param type $bktype - type
core/admin/page-email-trash.php CHANGED
@@ -444,7 +444,8 @@ class WPBC_Settings_Page_Email_Trash extends WPBC_Page_Structure {
444
  public $email_settings_api = false;
445
 
446
 
447
- /** Define interface for Email API
 
448
  *
449
  * @param string $selected_email_name - name of Email template
450
  * @param array $init_fields_values - array of init form fields data
@@ -816,7 +817,8 @@ class WPBC_Settings_Page_Email_Trash extends WPBC_Page_Structure {
816
  }
817
 
818
 
819
- /** Add Custon JavaScript - for some specific settings options
 
820
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
821
  *
822
  * @param type $menu_slug
@@ -868,8 +870,12 @@ class WPBC_Settings_Page_Email_Trash extends WPBC_Page_Structure {
868
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
869
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
870
 
871
- $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // server.com
872
- $js_script .= " if ( wpbc_email_from != wpbc_website_dns ) {";
 
 
 
 
873
  $js_script .= " jQuery('#trash_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
874
  $js_script .= " }";
875
 
@@ -890,7 +896,8 @@ add_action('wpbc_menu_created', array( new WPBC_Settings_Page_Email_Trash() , '
890
 
891
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending" >
892
 
893
- /** Get ShortCodes to Replace
 
894
  *
895
  * @param int $booking_id - ID of booking
896
  * @param int $bktype - booking resource type
@@ -962,14 +969,18 @@ function wpbc__get_replace_shortcodes__email_trash( $booking_id, $bktype, $formd
962
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
963
 
964
  ////////////////////////////////////////////////////////////////////////////
965
-
 
 
 
966
  return $replace;
967
 
968
 
969
  }
970
 
971
 
972
- /** Send email
 
973
  *
974
  * @param type $booking_id - ID of booking
975
  * @param type $bktype - type
444
  public $email_settings_api = false;
445
 
446
 
447
+ /**
448
+ * Define interface for Email API
449
  *
450
  * @param string $selected_email_name - name of Email template
451
  * @param array $init_fields_values - array of init form fields data
817
  }
818
 
819
 
820
+ /**
821
+ * Add Custon JavaScript - for some specific settings options
822
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
823
  *
824
  * @param type $menu_slug
870
  $js_script .= " wpbc_email_from.shift();"; // ['wpbookingcalendar.com']
871
  $js_script .= " wpbc_email_from = wpbc_email_from.join('');"; // 'wpbookingcalendar.com'
872
 
873
+ $js_script .= " var wpbc_website_dns = jQuery(location).attr('hostname');"; // www.server.com
874
+ //FixIn: 8.0.2.9
875
+ $js_script .= " var wpbc_website_dns_sub = jQuery(location).attr('hostname').split('.');"; // ['www', 'server', 'com']
876
+ $js_script .= " wpbc_website_dns_sub.shift();"; // ['server', 'com']
877
+ $js_script .= " wpbc_website_dns_sub = wpbc_website_dns_sub.join('.');"; // 'server.com'
878
+ $js_script .= " if ( ( wpbc_email_from != wpbc_website_dns_sub ) && ( wpbc_email_from != wpbc_website_dns ) ){";
879
  $js_script .= " jQuery('#trash_from').parent().append('<div class=\'updated\' style=\'border-left-color:#ffb900;padding:5px 10px;\'>". esc_js(__('Email different from website DNS, its can be a reason of not delivery emails. Please use the email withing the same domain as your website!', 'booking' ))."</div>')";
880
  $js_script .= " }";
881
 
896
 
897
  // <editor-fold defaultstate="collapsed" desc=" Emails Sending" >
898
 
899
+ /**
900
+ * Get ShortCodes to Replace
901
  *
902
  * @param int $booking_id - ID of booking
903
  * @param int $bktype - booking resource type
969
  $replace[ 'bookinghash' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[bookinghash]', $booking_id );
970
 
971
  ////////////////////////////////////////////////////////////////////////////
972
+ // Get additional replace paramaters to the email shortcodes
973
+ $replace = apply_filters( 'wpbc_replace_params_for_booking', $replace, $booking_id, $bktype, $formdata ); //FixIn: 8.0.1.7
974
+
975
+
976
  return $replace;
977
 
978
 
979
  }
980
 
981
 
982
+ /**
983
+ * Send email
984
  *
985
  * @param type $booking_id - ID of booking
986
  * @param type $bktype - type
core/admin/page-form-free.php CHANGED
@@ -13,7 +13,8 @@
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
 
15
 
16
- /** Show Content
 
17
  * Update Content
18
  * Define Slug
19
  * Define where to show
@@ -32,7 +33,8 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
32
  add_bk_filter('wpbc_get_free_booking_form_shortcodes', array( $this, 'get_form_in__shortcodes' ) );
33
 
34
 
35
- /** We need to update these fields after usual update process :
 
36
  * 'booking_form'
37
  * 'booking_form_show'
38
  * 'booking_form_visual'
@@ -71,7 +73,7 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
71
  'title' => __('Check Premium Features','booking') // Title of TAB
72
  , 'hint' => __('Upgrade to higher versions', 'booking') // Hint
73
  //, 'page_title' => __('Upgrade', 'booking') // Title of Page
74
- , 'link' => 'http://wpbookingcalendar.com/' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
75
  , 'position' => 'right' // 'left' || 'right' || ''
76
  //, 'css_classes' => '' // CSS class(es)
77
  //, 'icon' => '' // Icon - link to the real PNG img
@@ -130,7 +132,9 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
130
  $this->toolbar_select_field(); // Select Field Type
131
 
132
  $this->toolbar_reset_booking_form(); // Reset button
133
-
 
 
134
  $save_button = array( 'title' => __('Save Changes', 'booking'), 'form' => 'wpbc_form_field_free' );
135
  $this->toolbar_save_button( $save_button ); // Save Button
136
 
@@ -176,7 +180,8 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
176
  ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php
177
 
178
  ?><input type="hidden" name="reset_to_default_form" id="reset_to_default_form" value="" /><?php
179
-
 
180
  $this->show_booking_form_fields_table( $booking_form_structure );
181
 
182
  ?>
@@ -200,12 +205,17 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
200
 
201
  if ( $_POST['reset_to_default_form'] == 'standard' ) {
202
 
 
 
203
  $visual_form_structure = $this->import_old_booking_form(); // We are importing old structure to have default booking form.
204
  update_bk_option( 'booking_form_visual', $visual_form_structure );
205
  wpbc_show_changes_saved_message();
206
  return;
207
  }
208
 
 
 
 
209
  $skip_obligatory_field_types = array( 'calendar', 'submit', 'captcha', 'email' );
210
 
211
  $visual_form_structure = array();
@@ -249,7 +259,6 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
249
  , 'required' => 'On'
250
  , 'label' => __('Send', 'booking')
251
  );
252
-
253
 
254
  update_bk_option( 'booking_form_visual', $visual_form_structure );
255
 
@@ -393,9 +402,40 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
393
 
394
  $visual_form_structure = $this->get_booking_form_structure_for_visual();
395
  $visual_form_structure = maybe_unserialize( $visual_form_structure );
396
-
397
- $my_form = '[calendar]' . "\n";
398
- //$my_form = '<div style="float:left;margin-right:35px;" >[calendar]</div><div style="float:left;margin-top:-20px;" >';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  $skip_already_exist_field_types = array( 'calendar', 'submit', 'captcha' );
400
 
401
  foreach ( $visual_form_structure as $key => $form_field ) {
@@ -497,11 +537,38 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
497
  }
498
  }
499
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  $my_form.='<div class="form-group">[captcha]</div>' . "\n";
501
- $my_form.='<div class="form-group"><button class="btn btn-default" type="button" onclick="mybooking_submit(this.form,'.$my_boook_type.',\''.wpbc_get_booking_locale().'\');" >'.__('Send' ,'booking').'</button></div>' . "\n";
502
- //$my_form .= ' </div><div style="clear:both;"></div>' ;
 
 
 
 
 
 
 
 
 
 
 
 
503
  return $my_form;
504
-
505
  }
506
 
507
  /** Get Booking form in Shortcodes - format compatible with premium versions */
@@ -512,10 +579,27 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
512
 
513
  $visual_form_structure = maybe_unserialize( $visual_form_structure );
514
 
515
- $my_form = '[calendar]' . "\n";
516
- $my_form.= '<div class="standard-form">' . "\n";
517
 
518
- $skip_already_exist_field_types = array( 'calendar', 'submit', 'captcha' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
 
520
  foreach ( $visual_form_structure as $key => $form_field ) {
521
 
@@ -599,11 +683,16 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
599
  }
600
 
601
  }
602
-
 
603
  $my_form.=' <p>[captcha]</p>' . "\n";
604
  $my_form.=' <p>[submit class:btn "Send"]</p>' . "\n";
605
- $my_form.='</div>' . "\n";
606
-
 
 
 
 
607
  return $my_form;
608
 
609
  }
@@ -674,7 +763,8 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
674
  }
675
 
676
 
677
- /** Button for Reseting to default booking form
 
678
  * (import form fields from OLD free version
679
  */
680
  private function toolbar_reset_booking_form() {
@@ -682,7 +772,7 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
682
  $params = array(
683
  'label_for' => 'min_cost' // "For" parameter of label element
684
  , 'label' => '' //__('Add New Field', 'booking') // Label above the input group
685
- , 'style' => '' // CSS Style of entire div element
686
  , 'items' => array( /*
687
  array(
688
  'type' => 'addon'
@@ -762,139 +852,249 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
762
  ?></div><?php
763
 
764
  }
765
-
766
-
767
  /** Show selectbox for selection Field Elements in Toolbar */
768
  private function toolbar_select_field() {
769
-
770
- $params = array(
771
  'label_for' => 'min_cost' // "For" parameter of label element
772
  , 'label' => '' //__('Add New Field', 'booking') // Label above the input group
773
  , 'style' => '' // CSS Style of entire div element
774
  , 'items' => array(
775
- array(
776
- 'type' => 'addon'
777
  , 'element' => 'text' // text | radio | checkbox
778
  , 'text' => __('Add New Field', 'booking') . ':'
779
  , 'class' => '' // Any CSS class here
780
  , 'style' => 'font-weight:600;' // CSS Style of entire div element
781
- )
782
- // Warning! Can be text or selectbox, not both OR you need to define width
783
- , array(
784
- 'type' => 'select'
785
- , 'id' => 'select_form_help_shortcode'
786
- , 'name' => 'select_form_help_shortcode'
787
- , 'style' => ''
788
- , 'class' => ''
789
  , 'multiple' => false
790
  , 'disabled' => false
791
- , 'disabled_options' => array() // If some options disbaled, then its must list here
792
- , 'attr' => array() // Any additional attributes, if this radio | checkbox element
793
- , 'options' => array( // Associated array of titles and values
794
- 'selector_hint' => array(
795
  'title' => __('Select', 'booking') . ' ' . __('Form Field', 'booking')
796
- , 'id' => ''
797
- , 'name' => ''
798
- , 'style' => 'font-weight: 400;border-bottom:1px dashed #ccc;'
799
- , 'class' => ''
800
  , 'disabled' => false
801
  , 'selected' => false
802
- , 'attr' => array()
803
  )
804
- // , 'info' => array(
805
  // 'title' => __('General Info', 'booking')
806
- // , 'id' => ''
807
- // , 'name' => ''
808
- // , 'style' => ''
809
- // , 'class' => ''
810
  // , 'disabled' => false
811
  // , 'selected' => false
812
- // , 'attr' => array()
813
  // )
814
- , 'optgroup_sf_s' => array(
815
  'optgroup' => true
816
  , 'close' => false
817
- , 'title' => '&nbsp;' . __('Standard Fields' ,'booking')
818
  )
819
- , 'text' => array(
820
  'title' => __('Text', 'booking')
821
- , 'id' => ''
822
- , 'name' => ''
823
  , 'style' => ''
824
- , 'class' => ''
825
  , 'disabled' => false
826
  , 'selected' => false
827
- , 'attr' => array()
828
  )
829
- , 'select' => array(
830
  'title' => __('Select', 'booking')
831
- , 'id' => ''
832
- , 'name' => ''
833
  , 'style' => ''
834
- , 'class' => ''
835
  , 'disabled' => false
836
  , 'selected' => false
837
- , 'attr' => array()
838
  )
839
- , 'textarea' => array(
840
  'title' => __('Textarea', 'booking')
841
- , 'id' => ''
842
- , 'name' => ''
843
  , 'style' => ''
844
- , 'class' => ''
845
  , 'disabled' => false
846
  , 'selected' => false
847
- , 'attr' => array()
848
  )
849
- , 'checkbox' => array(
850
  'title' => __('Checkbox', 'booking')
851
- , 'id' => ''
852
- , 'name' => ''
853
  , 'style' => ''
854
- , 'class' => ''
855
  , 'disabled' => false
856
  , 'selected' => false
857
- , 'attr' => array()
858
  )
859
  , 'optgroup_sf_e' => array( 'optgroup' => true, 'close' => true )
860
-
861
-
862
- , 'optgroup_af_s' => array(
863
  'optgroup' => true
864
  , 'close' => false
865
- , 'title' => '&nbsp;' . __('Advanced Fields' ,'booking')
866
  )
867
- , 'info_advanced' => array(
868
  'title' => __('Info', 'booking')
869
- , 'id' => ''
870
- , 'name' => ''
871
  , 'style' => ''
872
- , 'class' => ''
873
  , 'disabled' => false
874
  , 'selected' => false
875
- , 'attr' => array()
876
  )
877
  , 'optgroup_af_e' => array( 'optgroup' => true, 'close' => true )
878
-
879
  )
880
- , 'value' => '' // Some Value from optins array that selected by default
881
  , 'onfocus' => ''
882
  , 'onchange' => "wpbc_show_fields_generator( this.options[this.selectedIndex].value );"
883
- )
884
  )
885
  );
886
- ?>
887
- <?php
888
- ?><div class="control-group wpbc-no-padding"><?php
889
- wpbc_bs_input_group( $params );
890
  ?></div><?php
891
  }
892
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
893
  // </editor-fold>
894
 
895
 
896
  // <editor-fold defaultstate="collapsed" desc=" T a b l e of F i e l d s" >
897
- /** Show Fields Table */
 
898
  private function show_booking_form_fields_table( $booking_form_structure ) {
899
 
900
  $booking_form_structure = maybe_unserialize( $booking_form_structure );
@@ -1230,7 +1430,8 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
1230
  }( jQuery ) );
1231
 
1232
 
1233
- /** Show selected Add New Field form, and reset fields in this form
 
1234
  *
1235
  * @param string selected_field_value
1236
  */
@@ -1281,7 +1482,8 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
1281
  }
1282
 
1283
 
1284
- /** Add New Row with new Field to Table and Submit Saving chages.
 
1285
  *
1286
 
1287
  * @param {string} field_name
@@ -1377,7 +1579,8 @@ class WPBC_Page_SettingsFormFieldsFree extends WPBC_Page_Structure {
1377
  }
1378
 
1379
 
1380
- /** Check Name in "field form" about possible usage of this name and about any Duplicates in Filds Table
 
1381
  * @param {string} field_name
1382
  */
1383
  function wpbc_check_typed_name( field_name ){
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
 
15
 
16
+ /**
17
+ * Show Content
18
  * Update Content
19
  * Define Slug
20
  * Define where to show
33
  add_bk_filter('wpbc_get_free_booking_form_shortcodes', array( $this, 'get_form_in__shortcodes' ) );
34
 
35
 
36
+ /**
37
+ * We need to update these fields after usual update process :
38
  * 'booking_form'
39
  * 'booking_form_show'
40
  * 'booking_form_visual'
73
  'title' => __('Check Premium Features','booking') // Title of TAB
74
  , 'hint' => __('Upgrade to higher versions', 'booking') // Hint
75
  //, 'page_title' => __('Upgrade', 'booking') // Title of Page
76
+ , 'link' => 'http://wpbookingcalendar.com/overview/' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
77
  , 'position' => 'right' // 'left' || 'right' || ''
78
  //, 'css_classes' => '' // CSS class(es)
79
  //, 'icon' => '' // Icon - link to the real PNG img
132
  $this->toolbar_select_field(); // Select Field Type
133
 
134
  $this->toolbar_reset_booking_form(); // Reset button
135
+
136
+ $this->toolbar_select_form_structure(); // Select Form structure
137
+
138
  $save_button = array( 'title' => __('Save Changes', 'booking'), 'form' => 'wpbc_form_field_free' );
139
  $this->toolbar_save_button( $save_button ); // Save Button
140
 
180
  ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php
181
 
182
  ?><input type="hidden" name="reset_to_default_form" id="reset_to_default_form" value="" /><?php
183
+ ?><input type="hidden" name="booking_form_structure_type" id="booking_form_structure_type" value="<?php echo get_bk_option( 'booking_form_structure_type' ); ?>" /><?php
184
+
185
  $this->show_booking_form_fields_table( $booking_form_structure );
186
 
187
  ?>
205
 
206
  if ( $_POST['reset_to_default_form'] == 'standard' ) {
207
 
208
+ update_bk_option( 'booking_form_structure_type', 'vertical' );
209
+
210
  $visual_form_structure = $this->import_old_booking_form(); // We are importing old structure to have default booking form.
211
  update_bk_option( 'booking_form_visual', $visual_form_structure );
212
  wpbc_show_changes_saved_message();
213
  return;
214
  }
215
 
216
+ // Update booking form structure
217
+ update_bk_option( 'booking_form_structure_type', WPBC_Settings_API::validate_text_post_static( 'booking_form_structure_type' ) );
218
+
219
  $skip_obligatory_field_types = array( 'calendar', 'submit', 'captcha', 'email' );
220
 
221
  $visual_form_structure = array();
259
  , 'required' => 'On'
260
  , 'label' => __('Send', 'booking')
261
  );
 
262
 
263
  update_bk_option( 'booking_form_visual', $visual_form_structure );
264
 
402
 
403
  $visual_form_structure = $this->get_booking_form_structure_for_visual();
404
  $visual_form_structure = maybe_unserialize( $visual_form_structure );
405
+
406
+ //FixIn: 8.0.1.5
407
+ $booking_form_structure = get_bk_option( 'booking_form_structure_type' );
408
+ if ( empty( $booking_form_structure ) ) {
409
+ $booking_form_structure = 'vertical';
410
+ }
411
+ $booking_form_structure = 'wpbc_' . $booking_form_structure;
412
+
413
+
414
+ $my_form = '<div class="wpbc_booking_form_structure '. $booking_form_structure . '">' . "\n";
415
+
416
+ //if ( 'wpbc_wizard' === $booking_form_structure ) {
417
+ // $my_form .= ' <div class="wpbc-form-header-section well">' . "\n";
418
+ // $my_form .= ' <span>1.</span> ' . __( 'Please select day(s) in calendar', 'booking' ) . "\n";
419
+ // $my_form .= ' </div>' . "\n";
420
+ //}
421
+
422
+ $my_form .= ' <div class="wpbc_structure_calendar">' . "\n";
423
+ $my_form .= ' [calendar]' . "\n";
424
+
425
+ //if ( 'wpbc_wizard' === $booking_form_structure ) {
426
+ // $my_form .= ' <div class="wpbc-form-btn-section">' . "\n";
427
+ // $my_form .= ' <a href="javascript:void(0)" class="wpbc_wizard_btn wpbc_wizard_btn_1 btn btn-standard">' . __( 'Next', 'booking' ) . '</a>' . "\n";
428
+ // $my_form .= ' </div>' . "\n";
429
+ //}
430
+ $my_form .= ' </div>' . "\n";
431
+ $my_form .= ' <div class="wpbc_structure_form">' . "\n";
432
+
433
+ //if ( 'wpbc_wizard' === $booking_form_structure ) {
434
+ // $my_form .= ' <div class="wpbc-form-header-section well">' . "\n";
435
+ // $my_form .= ' <span>2.</span> ' . __( 'Please fill the booking form fields', 'booking' ) . "\n";
436
+ // $my_form .= ' </div>' . "\n";
437
+ //}
438
+
439
  $skip_already_exist_field_types = array( 'calendar', 'submit', 'captcha' );
440
 
441
  foreach ( $visual_form_structure as $key => $form_field ) {
537
  }
538
  }
539
 
540
+ //if ( 'wpbc_wizard' === $booking_form_structure ) {
541
+ // $my_form .= ' <div class="wpbc-form-btn-section">' . "\n";
542
+ // $my_form .= ' <a href="javascript:void(0)" class="wpbc_wizard_btn wpbc_wizard_btn_2 btn btn-standard">' . __( 'Back', 'booking' ) . '</a> ' . "\n";
543
+ // $my_form .= ' <a href="javascript:void(0)" class="wpbc_wizard_btn wpbc_wizard_btn_3 btn btn-standard">' . __( 'Next', 'booking' ) . '</a>' . "\n";
544
+ // $my_form .= ' </div>' . "\n";
545
+ // $my_form .= ' </div>' . "\n"; // .wpbc_structure_form
546
+ // $my_form .= ' <div class="wpbc_structure_submit">' . "\n";
547
+ // $my_form .= ' <div class="wpbc-form-header-section well">' . "\n";
548
+ // $my_form .= ' <span>3.</span> ' . __( 'Check booking details and submit form', 'booking' ) . "\n";
549
+ // $my_form .= ' </div>' . "\n";
550
+ // $my_form .= ' <div class="wpbc_structure_summary">' . "\n";
551
+ // $my_form .= ' <strong>' . __('Summary', 'booking') . '</strong>' . "\n";
552
+ // $my_form .= ' </div>' . "\n";
553
+ //}
554
+
555
+
556
  $my_form.='<div class="form-group">[captcha]</div>' . "\n";
557
+ //if ( 'wpbc_wizard' === $booking_form_structure ) {
558
+ // $my_form .= ' <div class="wpbc-form-btn-section">' . "\n";
559
+ // $my_form .= ' <a href="javascript:void(0)" class="wpbc_wizard_btn wpbc_wizard_btn_4 btn btn-standard">' . __( 'Back', 'booking' ) . '</a> ' . "\n";
560
+ // $my_form .= ' <button class="btn btn-default" type="button" onclick="mybooking_submit(this.form,'.$my_boook_type.',\''.wpbc_get_booking_locale().'\');" >'.__('Send' ,'booking').'</button>' . "\n";
561
+ // $my_form .= ' </div>' . "\n";
562
+ //} else {
563
+ $my_form.='<div class="form-group"><button class="btn btn-default" type="button" onclick="mybooking_submit(this.form,'.$my_boook_type.',\''.wpbc_get_booking_locale().'\');" >'.__('Send' ,'booking').'</button></div>' . "\n";
564
+ //}
565
+
566
+ //FixIn: 8.0.1.5
567
+ $my_form .= ' </div>' . "\n"; // .wpbc_structure_form || .wpbc_structure_submit
568
+ $my_form .= '</div>' . "\n"; // .wpbc_booking_form_structure
569
+ $my_form .= '<div class="wpbc_booking_form_footer"></div>';
570
+
571
  return $my_form;
 
572
  }
573
 
574
  /** Get Booking form in Shortcodes - format compatible with premium versions */
579
 
580
  $visual_form_structure = maybe_unserialize( $visual_form_structure );
581
 
 
 
582
 
583
+
584
+ //FixIn: 8.0.1.5
585
+ $booking_form_structure = get_bk_option( 'booking_form_structure_type' );
586
+ if ( empty( $booking_form_structure ) ) {
587
+ $booking_form_structure = 'vertical';
588
+ }
589
+ $booking_form_structure = 'wpbc_' . $booking_form_structure;
590
+
591
+
592
+ $my_form = '<div class="wpbc_booking_form_structure '. $booking_form_structure . '">' . "\n";
593
+ $my_form .= ' <div class="wpbc_structure_calendar">' . "\n";
594
+ $my_form .= ' [calendar]' . "\n";
595
+ $my_form .= ' </div>' . "\n";
596
+ $my_form .= ' <div class="wpbc_structure_form">' . "\n";
597
+
598
+ //$my_form = '<div style="float:left;margin-right:10px;">[calendar]</div>' . "\n"; //FixIn: 8.0.1.5 //Fix: Form2collumns
599
+ //$my_form.= '<div style="float:left;" class="standard-form">' . "\n"; //FixIn: 8.0.1.5 //Fix: Form2collumns
600
+
601
+
602
+ $skip_already_exist_field_types = array( 'calendar', 'submit', 'captcha' );
603
 
604
  foreach ( $visual_form_structure as $key => $form_field ) {
605
 
683
  }
684
 
685
  }
686
+
687
+
688
  $my_form.=' <p>[captcha]</p>' . "\n";
689
  $my_form.=' <p>[submit class:btn "Send"]</p>' . "\n";
690
+
691
+ //FixIn: 8.0.1.5
692
+ $my_form .= ' </div>' . "\n"; // .wpbc_structure_form
693
+ $my_form .= '</div>' . "\n"; // .wpbc_booking_form_structure
694
+ $my_form .= '<div class="wpbc_booking_form_footer"></div>';
695
+
696
  return $my_form;
697
 
698
  }
763
  }
764
 
765
 
766
+ /**
767
+ * Button for Reseting to default booking form
768
  * (import form fields from OLD free version
769
  */
770
  private function toolbar_reset_booking_form() {
772
  $params = array(
773
  'label_for' => 'min_cost' // "For" parameter of label element
774
  , 'label' => '' //__('Add New Field', 'booking') // Label above the input group
775
+ , 'style' => 'margin-right:20px;' // CSS Style of entire div element
776
  , 'items' => array( /*
777
  array(
778
  'type' => 'addon'
852
  ?></div><?php
853
 
854
  }
855
+
856
+
857
  /** Show selectbox for selection Field Elements in Toolbar */
858
  private function toolbar_select_field() {
859
+
860
+ $params = array(
861
  'label_for' => 'min_cost' // "For" parameter of label element
862
  , 'label' => '' //__('Add New Field', 'booking') // Label above the input group
863
  , 'style' => '' // CSS Style of entire div element
864
  , 'items' => array(
865
+ array(
866
+ 'type' => 'addon'
867
  , 'element' => 'text' // text | radio | checkbox
868
  , 'text' => __('Add New Field', 'booking') . ':'
869
  , 'class' => '' // Any CSS class here
870
  , 'style' => 'font-weight:600;' // CSS Style of entire div element
871
+ )
872
+ // Warning! Can be text or selectbox, not both OR you need to define width
873
+ , array(
874
+ 'type' => 'select'
875
+ , 'id' => 'select_form_help_shortcode'
876
+ , 'name' => 'select_form_help_shortcode'
877
+ , 'style' => ''
878
+ , 'class' => ''
879
  , 'multiple' => false
880
  , 'disabled' => false
881
+ , 'disabled_options' => array() // If some options disbaled, then its must list here
882
+ , 'attr' => array() // Any additional attributes, if this radio | checkbox element
883
+ , 'options' => array( // Associated array of titles and values
884
+ 'selector_hint' => array(
885
  'title' => __('Select', 'booking') . ' ' . __('Form Field', 'booking')
886
+ , 'id' => ''
887
+ , 'name' => ''
888
+ , 'style' => 'font-weight: 400;border-bottom:1px dashed #ccc;'
889
+ , 'class' => ''
890
  , 'disabled' => false
891
  , 'selected' => false
892
+ , 'attr' => array()
893
  )
894
+ // , 'info' => array(
895
  // 'title' => __('General Info', 'booking')
896
+ // , 'id' => ''
897
+ // , 'name' => ''
898
+ // , 'style' => ''
899
+ // , 'class' => ''
900
  // , 'disabled' => false
901
  // , 'selected' => false
902
+ // , 'attr' => array()
903
  // )
904
+ , 'optgroup_sf_s' => array(
905
  'optgroup' => true
906
  , 'close' => false
907
+ , 'title' => '&nbsp;' . __('Standard Fields' ,'booking')
908
  )
909
+ , 'text' => array(
910
  'title' => __('Text', 'booking')
911
+ , 'id' => ''
912
+ , 'name' => ''
913
  , 'style' => ''
914
+ , 'class' => ''
915
  , 'disabled' => false
916
  , 'selected' => false
917
+ , 'attr' => array()
918
  )
919
+ , 'select' => array(
920
  'title' => __('Select', 'booking')
921
+ , 'id' => ''
922
+ , 'name' => ''
923
  , 'style' => ''
924
+ , 'class' => ''
925
  , 'disabled' => false
926
  , 'selected' => false
927
+ , 'attr' => array()
928
  )
929
+ , 'textarea' => array(
930
  'title' => __('Textarea', 'booking')
931
+ , 'id' => ''
932
+ , 'name' => ''
933
  , 'style' => ''
934
+ , 'class' => ''
935
  , 'disabled' => false
936
  , 'selected' => false
937
+ , 'attr' => array()
938
  )
939
+ , 'checkbox' => array(
940
  'title' => __('Checkbox', 'booking')
941
+ , 'id' => ''
942
+ , 'name' => ''
943
  , 'style' => ''
944
+ , 'class' => ''
945
  , 'disabled' => false
946
  , 'selected' => false
947
+ , 'attr' => array()
948
  )
949
  , 'optgroup_sf_e' => array( 'optgroup' => true, 'close' => true )
950
+
951
+
952
+ , 'optgroup_af_s' => array(
953
  'optgroup' => true
954
  , 'close' => false
955
+ , 'title' => '&nbsp;' . __('Advanced Fields' ,'booking')
956
  )
957
+ , 'info_advanced' => array(
958
  'title' => __('Info', 'booking')
959
+ , 'id' => ''
960
+ , 'name' => ''
961
  , 'style' => ''
962
+ , 'class' => ''
963
  , 'disabled' => false
964
  , 'selected' => false
965
+ , 'attr' => array()
966
  )
967
  , 'optgroup_af_e' => array( 'optgroup' => true, 'close' => true )
968
+
969
  )
970
+ , 'value' => '' // Some Value from optins array that selected by default
971
  , 'onfocus' => ''
972
  , 'onchange' => "wpbc_show_fields_generator( this.options[this.selectedIndex].value );"
973
+ )
974
  )
975
  );
976
+ ?>
977
+ <?php
978
+ ?><div class="control-group wpbc-no-padding"><?php
979
+ wpbc_bs_input_group( $params );
980
  ?></div><?php
981
  }
982
+
983
+
984
+ /** Show selectbox for selection Field Elements in Toolbar */
985
+ private function toolbar_select_form_structure() {
986
+
987
+ $params = array(
988
+ 'label_for' => 'form_structure' // "For" parameter of label element
989
+ , 'label' => '' //__('Add New Field', 'booking') // Label above the input group
990
+ , 'style' => '' // CSS Style of entire div element
991
+ , 'items' => array(
992
+ array(
993
+ 'type' => 'addon'
994
+ , 'element' => 'text' // text | radio | checkbox
995
+ , 'text' => __('View', 'booking') . ':'
996
+ , 'class' => '' // Any CSS class here
997
+ , 'style' => 'font-weight:600;' // CSS Style of entire div element
998
+ )
999
+ // Warning! Can be text or selectbox, not both OR you need to define width
1000
+ , array(
1001
+ 'type' => 'select'
1002
+ , 'id' => 'form_structure'
1003
+ , 'name' => 'form_structure'
1004
+ , 'style' => ''
1005
+ , 'class' => ''
1006
+ , 'multiple' => false
1007
+ , 'disabled' => false
1008
+ , 'disabled_options' => array() // If some options disbaled, then its must list here
1009
+ , 'attr' => array() // Any additional attributes, if this radio | checkbox element
1010
+ , 'options' => array( // Associated array of titles and values
1011
+ 'optgroup_sf_s' => array(
1012
+ 'optgroup' => true
1013
+ , 'close' => false
1014
+ , 'title' => '&nbsp;' . __('Standard Forms' ,'booking')
1015
+ )
1016
+ , 'vertical' => array(
1017
+ 'title' => __('Form under calendar', 'booking')
1018
+ , 'id' => ''
1019
+ , 'name' => ''
1020
+ , 'style' => ''
1021
+ , 'class' => ''
1022
+ , 'disabled' => false
1023
+ , 'selected' => false
1024
+ , 'attr' => array()
1025
+ )
1026
+ , 'form_right' => array(
1027
+ 'title' => __('Form at right side of calendar', 'booking')
1028
+ , 'id' => ''
1029
+ , 'name' => ''
1030
+ , 'style' => ''
1031
+ , 'class' => ''
1032
+ , 'disabled' => false
1033
+ , 'selected' => false
1034
+ , 'attr' => array()
1035
+ )
1036
+ , 'form_center' => array(
1037
+ 'title' => __('Form and calendar are centered', 'booking')
1038
+ , 'id' => ''
1039
+ , 'name' => ''
1040
+ , 'style' => ''
1041
+ , 'class' => ''
1042
+ , 'disabled' => false
1043
+ , 'selected' => false
1044
+ , 'attr' => array()
1045
+ )
1046
+ , 'form_dark' => array(
1047
+ 'title' => __('Form for dark background', 'booking')
1048
+ , 'id' => ''
1049
+ , 'name' => ''
1050
+ , 'style' => ''
1051
+ , 'class' => ''
1052
+ , 'disabled' => false
1053
+ , 'selected' => false
1054
+ , 'attr' => array()
1055
+ )
1056
+ , 'optgroup_sf_e' => array( 'optgroup' => true, 'close' => true )
1057
+ /*
1058
+ , 'optgroup_af_s' => array(
1059
+ 'optgroup' => true
1060
+ , 'close' => false
1061
+ , 'title' => '&nbsp;' . __('Advanced Fields' ,'booking')
1062
+ )
1063
+ , 'wizard' => array(
1064
+ 'title' => __('Step by step wizard', 'booking')
1065
+ , 'id' => ''
1066
+ , 'name' => ''
1067
+ , 'style' => ''
1068
+ , 'class' => ''
1069
+ , 'disabled' => false
1070
+ , 'selected' => false
1071
+ , 'attr' => array()
1072
+ )
1073
+ , 'optgroup_af_e' => array( 'optgroup' => true, 'close' => true )
1074
+ */
1075
+ )
1076
+ , 'value' => get_bk_option( 'booking_form_structure_type' ) //'' // Some Value from optins array that selected by default
1077
+ , 'onfocus' => ''
1078
+ , 'onchange' => "var selected_val = jQuery('#form_structure').val();"
1079
+ . "jQuery('#booking_form_structure_type').val( selected_val );"
1080
+ //. "jQuery('#wpbc_form_field_free').submit();"
1081
+
1082
+ )
1083
+ )
1084
+ );
1085
+ ?>
1086
+ <?php
1087
+ ?><div class="control-group wpbc-no-padding"><?php
1088
+ wpbc_bs_input_group( $params );
1089
+ ?></div><?php
1090
+ }
1091
+
1092
  // </editor-fold>
1093
 
1094
 
1095
  // <editor-fold defaultstate="collapsed" desc=" T a b l e of F i e l d s" >
1096
+ /**
1097
+ * Show Fields Table */
1098
  private function show_booking_form_fields_table( $booking_form_structure ) {
1099
 
1100
  $booking_form_structure = maybe_unserialize( $booking_form_structure );
1430
  }( jQuery ) );
1431
 
1432
 
1433
+ /**
1434
+ * Show selected Add New Field form, and reset fields in this form
1435
  *
1436
  * @param string selected_field_value
1437
  */
1482
  }
1483
 
1484
 
1485
+ /**
1486
+ * Add New Row with new Field to Table and Submit Saving chages.
1487
  *
1488
 
1489
  * @param {string} field_name
1579
  }
1580
 
1581
 
1582
+ /**
1583
+ * Check Name in "field form" about possible usage of this name and about any Duplicates in Filds Table
1584
  * @param {string} field_name
1585
  */
1586
  function wpbc_check_typed_name( field_name ){
core/admin/page-ics-export.php CHANGED
@@ -17,7 +17,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
17
 
18
  //FixIn: 8.0
19
 
20
- /** Show Content
 
21
  * Update Content
22
  * Define Slug
23
  * Define where to show
@@ -163,7 +164,7 @@ class WPBC_Page_SettingsExportFeeds extends WPBC_Page_Structure {
163
  wpbc_ics_import_export__show_help_info( false );
164
 
165
  wpbc_close_meta_box_section();
166
- ?></div<?php
167
 
168
  } else { // Exist
169
 
@@ -187,6 +188,11 @@ class WPBC_Page_SettingsExportFeeds extends WPBC_Page_Structure {
187
  ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php
188
  ?>
189
  <div class="clear" style="margin-top:10px;"></div>
 
 
 
 
 
190
  <div id="wpbc_resources_link" class="clear"></div>
191
  <?php if ( class_exists('wpdev_bk_personal') ) { ?>
192
  <div id="wpbc_resource_table_gcal_id" class="wpbc_settings_row wpbc_settings_row_rightNO"><?php
@@ -235,7 +241,7 @@ class WPBC_Page_SettingsExportFeeds extends WPBC_Page_Structure {
235
  }
236
 
237
 
238
- /** Save Chanages */
239
  public function update() {
240
 
241
  if ( function_exists( 'wpbc_export_feeds__update') )
@@ -314,7 +320,8 @@ class WPBC_Page_SettingsExportFeeds extends WPBC_Page_Structure {
314
 
315
 
316
 
317
- /** Add Custon JavaScript - for some specific settings options
 
318
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
319
  *
320
  * @param type $menu_slug
@@ -447,7 +454,8 @@ function wpbc_export_ics_feed__table() {
447
  }
448
 
449
 
450
- /** Save changes to URL in Free version
 
451
  *
452
  * @return string - validated value
453
  */
17
 
18
  //FixIn: 8.0
19
 
20
+ /**
21
+ * Show Content
22
  * Update Content
23
  * Define Slug
24
  * Define where to show
164
  wpbc_ics_import_export__show_help_info( false );
165
 
166
  wpbc_close_meta_box_section();
167
+ ?></span><?php
168
 
169
  } else { // Exist
170
 
188
  ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php
189
  ?>
190
  <div class="clear" style="margin-top:10px;"></div>
191
+ <?php
192
+ // Add hidden input SEARCH KEY field into main form, if previosly was searching by ID or Title
193
+ if ( class_exists('wpdev_bk_personal') )
194
+ wpbc_hidden_search_by_id_field_in_main_form( array( 'search_get_key' => 'wh_resource_id' ) ); //FixIn: 8.0.1.12
195
+ ?>
196
  <div id="wpbc_resources_link" class="clear"></div>
197
  <?php if ( class_exists('wpdev_bk_personal') ) { ?>
198
  <div id="wpbc_resource_table_gcal_id" class="wpbc_settings_row wpbc_settings_row_rightNO"><?php
241
  }
242
 
243
 
244
+ /** Save Chanages */
245
  public function update() {
246
 
247
  if ( function_exists( 'wpbc_export_feeds__update') )
320
 
321
 
322
 
323
+ /**
324
+ * Add Custon JavaScript - for some specific settings options
325
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
326
  *
327
  * @param type $menu_slug
454
  }
455
 
456
 
457
+ /**
458
+ * Save changes to URL in Free version
459
  *
460
  * @return string - validated value
461
  */
core/admin/page-ics-import.php CHANGED
@@ -17,7 +17,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
17
 
18
  //FixIn: 8.0
19
 
20
- /** Show Content
 
21
  * Update Content
22
  * Define Slug
23
  * Define where to show
@@ -314,7 +315,8 @@ class WPBC_Page_SettingsImportFeeds extends WPBC_Page_Structure {
314
 
315
 
316
 
317
- /** Add Custon JavaScript - for some specific settings options
 
318
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
319
  *
320
  * @param type $menu_slug
@@ -484,7 +486,8 @@ add_action('wpbc_menu_created', array( new WPBC_Page_SettingsImportFeeds() , '__
484
 
485
 
486
 
487
- /** Show Help info about .ics import/export at Booking > Settings > Sync pages
 
488
  *
489
  * @param bool $is_import
490
  */
@@ -616,7 +619,7 @@ function wpbc_ics_import_export__show_help_info( $is_import = true ) {
616
  </li>
617
  <li>
618
  <?php
619
- $message_ics = sprintf( __( 'Visit these (previosly configured URL feeds) pages for downloading .ics files.', 'booking' ) );
620
  $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
621
  echo $message_ics;
622
  ?>
@@ -682,7 +685,7 @@ function wpbc_ics_import_ajax_js() {
682
  wpbc_admin_show_message( '<strong style="text-transform: uppercase;">' + textStatus + '</strong> ~ ' + errorThrown , 'error', 5000 );
683
  if ( window.console && window.console.log ){ console.log( 'Ajax_Error', jqXHR, textStatus, errorThrown ); }
684
  })
685
- // .done( function ( data, textStatus, jqXHR ) { if ( window.console && window.console.log ){ console.log( 'second success', data, textStatus, jqXHR ); } })
686
  // .always( function ( data_jqXHR, textStatus, jqXHR_errorThrown ) { if ( window.console && window.console.log ){ console.log( 'always finished', data_jqXHR, textStatus, jqXHR_errorThrown ); } })
687
  ;
688
 
@@ -732,7 +735,10 @@ function wpbc_ajax_WPBC_IMPORT_ICS_URL() {
732
  ?><script type="text/javascript"> jQuery( '.wpbc_system_info_log' ).show(); </script><?php
733
  }
734
  */
735
-
736
- // send JSON
737
- wp_send_json( array( 'response' => 'success' ) ); // Return JS OBJ: response_data = { response: "success" }
 
 
 
738
  }
17
 
18
  //FixIn: 8.0
19
 
20
+ /**
21
+ * Show Content
22
  * Update Content
23
  * Define Slug
24
  * Define where to show
315
 
316
 
317
 
318
+ /**
319
+ * Add Custon JavaScript - for some specific settings options
320
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
321
  *
322
  * @param type $menu_slug
486
 
487
 
488
 
489
+ /**
490
+ * Show Help info about .ics import/export at Booking > Settings > Sync pages
491
  *
492
  * @param bool $is_import
493
  */
619
  </li>
620
  <li>
621
  <?php
622
+ $message_ics = sprintf( __( 'Visit these (previously configured URL feeds) pages for downloading .ics files.', 'booking' ) );
623
  $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
624
  echo $message_ics;
625
  ?>
685
  wpbc_admin_show_message( '<strong style="text-transform: uppercase;">' + textStatus + '</strong> ~ ' + errorThrown , 'error', 5000 );
686
  if ( window.console && window.console.log ){ console.log( 'Ajax_Error', jqXHR, textStatus, errorThrown ); }
687
  })
688
+ // .done( function ( data, textStatus, jqXHR ) { if ( window.console && window.console.log ){ console.log( 'second success', data, textStatus, jqXHR ); } })
689
  // .always( function ( data_jqXHR, textStatus, jqXHR_errorThrown ) { if ( window.console && window.console.log ){ console.log( 'always finished', data_jqXHR, textStatus, jqXHR_errorThrown ); } })
690
  ;
691
 
735
  ?><script type="text/javascript"> jQuery( '.wpbc_system_info_log' ).show(); </script><?php
736
  }
737
  */
738
+
739
+ // send JSON
740
+ // FixIn: 8.0.2.1 //Fix: We need to comment this line, because previously its possible that we already sent some messages, and its does not correct json format in this case.
741
+ //Fix: of showing "parsererror ~ SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"
742
+ //wp_send_json( array( 'response' => 'success' ) ); // Return JS OBJ: response_data = { response: "success" }
743
+ wp_die( '', '', array( 'response' => null ) );
744
  }
core/admin/page-import-gcal.php CHANGED
@@ -19,7 +19,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
19
  /** API for Settings Page */
20
  class WPBC_API_SettingsImportGCal extends WPBC_Settings_API {
21
 
22
- /** Settings API Constructor
 
23
  * During creation, system try to load values from DB, if exist.
24
  *
25
  * @param type $id - "Pure Name"
@@ -33,7 +34,8 @@ class WPBC_API_SettingsImportGCal extends WPBC_Settings_API {
33
  // separate_prefix: update_bk_option( $this->options['db_prefix_option'] . $settings_id . '_' . $field_name , $value );
34
  $options = wp_parse_args( $options, $default_options );
35
 
36
- /** Activation and deactivation of these options already done at the wpbc-gcal.php file
 
37
  //
38
  // add_bk_action( 'wpbc_other_versions_activation', array( $this, 'activate' ) ); // Activate
39
  // add_bk_action( 'wpbc_other_versions_deactivation', array( $this, 'deactivate' ) ); // Deactivate
@@ -457,7 +459,8 @@ class WPBC_API_SettingsImportGCal extends WPBC_Settings_API {
457
 
458
 
459
 
460
- /** Show Content
 
461
  * Update Content
462
  * Define Slug
463
  * Define where to show
@@ -467,7 +470,8 @@ class WPBC_Page_SettingsImportGCal extends WPBC_Page_Structure {
467
 
468
  public $settings_api = false;
469
 
470
- /** API - for Fields of this Settings Page
 
471
  *
472
  * @param array $init_fields_values - array of init form fields data - this array can ovveride "default" fields and loaded data.
473
  * @return object API
@@ -553,7 +557,8 @@ class WPBC_Page_SettingsImportGCal extends WPBC_Page_Structure {
553
 
554
  $this->get_api(); // Load fields Data from DB
555
 
556
- /** O v e r l o a d some values for our pseudo options - during normal opening of page
 
557
  * if we making saving, so we need to overload these options
558
  * one more time
559
  */
@@ -636,8 +641,12 @@ class WPBC_Page_SettingsImportGCal extends WPBC_Page_Structure {
636
  // N o n c e field, and key for checking S u b m i t
637
  wp_nonce_field( 'wpbc_settings_page_' . $submit_form_name );
638
  ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php
639
- ?><div class="clear"></div><?php
640
-
 
 
 
 
641
  ?><div class="clear" style="height:10px;"></div><?php /* ?>
642
  <div class="wpbc-settings-notice notice-info" style="text-align:left;">
643
  <strong><?php _e('Note!' ,'booking'); ?></strong> <?php
@@ -778,7 +787,8 @@ class WPBC_Page_SettingsImportGCal extends WPBC_Page_Structure {
778
 
779
 
780
 
781
- /** Add Custon JavaScript - for some specific settings options
 
782
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
783
  *
784
  * @param type $menu_slug
@@ -871,7 +881,8 @@ class WPBC_Page_SettingsImportGCal extends WPBC_Page_Structure {
871
  add_action('wpbc_menu_created', array( new WPBC_Page_SettingsImportGCal() , '__construct') ); // Executed after creation of Menu
872
 
873
 
874
- /** Validate some fields during saving to DB
 
875
  * Skip saving some pseudo options, instead of that creare new real option.
876
  *
877
  * @param array $validated_fields
@@ -895,7 +906,8 @@ function wpbc_fields_before_saving_to_db__import_gcal( $validated_fields ) {
895
  add_filter('wpbc_fields_before_saving_to_db__import_gcal', 'wpbc_fields_before_saving_to_db__import_gcal');
896
 
897
 
898
- /** Override fields array of Settings page, AFTER saving to DB. Some fields have to have different Values.
 
899
  * Set here values for our pseudo-options, after saving to DB
900
  * Because they was not overloading during this saving
901
  *
19
  /** API for Settings Page */
20
  class WPBC_API_SettingsImportGCal extends WPBC_Settings_API {
21
 
22
+ /**
23
+ * Settings API Constructor
24
  * During creation, system try to load values from DB, if exist.
25
  *
26
  * @param type $id - "Pure Name"
34
  // separate_prefix: update_bk_option( $this->options['db_prefix_option'] . $settings_id . '_' . $field_name , $value );
35
  $options = wp_parse_args( $options, $default_options );
36
 
37
+ /**
38
+ * Activation and deactivation of these options already done at the wpbc-gcal.php file
39
  //
40
  // add_bk_action( 'wpbc_other_versions_activation', array( $this, 'activate' ) ); // Activate
41
  // add_bk_action( 'wpbc_other_versions_deactivation', array( $this, 'deactivate' ) ); // Deactivate
459
 
460
 
461
 
462
+ /**
463
+ * Show Content
464
  * Update Content
465
  * Define Slug
466
  * Define where to show
470
 
471
  public $settings_api = false;
472
 
473
+ /**
474
+ * API - for Fields of this Settings Page
475
  *
476
  * @param array $init_fields_values - array of init form fields data - this array can ovveride "default" fields and loaded data.
477
  * @return object API
557
 
558
  $this->get_api(); // Load fields Data from DB
559
 
560
+ /**
561
+ * O v e r l o a d some values for our pseudo options - during normal opening of page
562
  * if we making saving, so we need to overload these options
563
  * one more time
564
  */
641
  // N o n c e field, and key for checking S u b m i t
642
  wp_nonce_field( 'wpbc_settings_page_' . $submit_form_name );
643
  ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php
644
+ ?><div class="clear"></div><?php
645
+
646
+ // Add hidden input SEARCH KEY field into main form, if previosly was searching by ID or Title
647
+ if ( class_exists('wpdev_bk_personal') )
648
+ wpbc_hidden_search_by_id_field_in_main_form( array( 'search_get_key' => 'wh_resource_id' ) ); //FixIn: 8.0.1.12
649
+
650
  ?><div class="clear" style="height:10px;"></div><?php /* ?>
651
  <div class="wpbc-settings-notice notice-info" style="text-align:left;">
652
  <strong><?php _e('Note!' ,'booking'); ?></strong> <?php
787
 
788
 
789
 
790
+ /**
791
+ * Add Custon JavaScript - for some specific settings options
792
  * Executed After post content, after initial definition of settings, and possible definition after POST request.
793
  *
794
  * @param type $menu_slug
881
  add_action('wpbc_menu_created', array( new WPBC_Page_SettingsImportGCal() , '__construct') ); // Executed after creation of Menu
882
 
883
 
884
+ /**
885
+ * Validate some fields during saving to DB
886
  * Skip saving some pseudo options, instead of that creare new real option.
887
  *
888
  * @param array $validated_fields
906
  add_filter('wpbc_fields_before_saving_to_db__import_gcal', 'wpbc_fields_before_saving_to_db__import_gcal');
907
 
908
 
909
+ /**
910
+ * Override fields array of Settings page, AFTER saving to DB. Some fields have to have different Values.
911
  * Set here values for our pseudo-options, after saving to DB
912
  * Because they was not overloading during this saving
913
  *
core/admin/page-new.php CHANGED
@@ -13,7 +13,8 @@
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
 
15
 
16
- /** Show Content
 
17
  * Update Content
18
  * Define Slug
19
  * Define where to show
@@ -101,7 +102,8 @@ class WPBC_Page_AddNewBooking extends WPBC_Page_Structure {
101
  }
102
 
103
 
104
- /** Get Calendar Options of specific User
 
105
  *
106
  * @return array (number of months, options parameter
107
  */
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
 
15
 
16
+ /**
17
+ * Show Content
18
  * Update Content
19
  * Define Slug
20
  * Define where to show
102
  }
103
 
104
 
105
+ /**
106
+ * Get Calendar Options of specific User
107
  *
108
  * @return array (number of months, options parameter
109
  */
core/admin/page-settings.php CHANGED
@@ -13,7 +13,8 @@
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
 
15
 
16
- /** Show Content
 
17
  * Update Content
18
  * Define Slug
19
  * Define where to show
@@ -51,7 +52,8 @@ class WPBC_Page_SettingsGeneral extends WPBC_Page_Structure {
51
  }
52
 
53
 
54
- /** Get Settings API class - define, show, update "Fields".
 
55
  *
56
  * @return object Settings API
57
  */
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
 
15
 
16
+ /**
17
+ * Show Content
18
  * Update Content
19
  * Define Slug
20
  * Define where to show
52
  }
53
 
54
 
55
+ /**
56
+ * Get Settings API class - define, show, update "Fields".
57
  *
58
  * @return object Settings API
59
  */
core/admin/page-timeline.php CHANGED
@@ -14,7 +14,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
 
16
 
17
- /** Show Content
 
18
  * Update Content
19
  * Define Slug
20
  * Define where to show
14
 
15
 
16
 
17
+ /**
18
+ * Show Content
19
  * Update Content
20
  * Define Slug
21
  * Define where to show
core/admin/page-up.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /**
2
+ * @version 1.0
3
+ * @package Booking Calendar
4
+ * @category Content of Up page
5
+ * @author wpdevelop
6
+ *
7
+ * @web-site http://wpbookingcalendar.com/
8
+ * @email info@wpbookingcalendar.com
9
+ *
10
+ * @modified 2017-10-16
11
+ */
12
+
13
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
+
15
+ //FixIn: 8.0.1.6
16
+
17
+ /**
18
+ * Show Content
19
+ * Update Content
20
+ * Define Slug
21
+ * Define where to show
22
+ */
23
+ class WPBC_Page_SettingsUp extends WPBC_Page_Structure {
24
+
25
+
26
+ public function in_page() {
27
+ return 'wpbc-go-pro';
28
+ }
29
+
30
+
31
+ public function tabs() {
32
+
33
+ $tabs = array();
34
+
35
+
36
+
37
+ $tabs[ 'upgrade' ] = array(
38
+ 'title' => __( 'Upgrade', 'booking') // Title of TAB
39
+ , 'page_title' => ''//sprintf( __( 'Need even more functionality? Check %s higher versions %s','booking'), '', '<a href="http://wpbookingcalendar.com/overview/" target="_blank" style="text-decoration: none;font-size:0.9em;">&gt;&gt;&gt;</a>' ) // Title of Page
40
+ , 'hint' => '' // Hint
41
+ , 'link' => '' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
42
+ , 'position' => 'right' // 'left' || 'right' || ''
43
+ , 'css_classes' => '' // CSS class(es)
44
+ , 'icon' => '' // Icon - link to the real PNG img
45
+ , 'font_icon' => 'glyphicon glyphicon-shopping-cart' // CSS definition of forn Icon
46
+ , 'default' => true // Is this tab activated by default or not: true || false.
47
+ , 'hided' => true // Is this tab hided: true || false.
48
+ );
49
+
50
+ return $tabs;
51
+ }
52
+
53
+
54
+ public function content() {
55
+
56
+ $this->css();
57
+ ?>
58
+ <div class="wpbc_redirection_message">Redirection to <a href="http://wpbookingcalendar.com/overview/#content">Booking Calendar website</a> after <span class="wpbc_countdown">5</span> seconds...</div>
59
+ <script type="text/javascript">
60
+
61
+ var count = 5;
62
+ jQuery( ".wpbc_countdown" ).html( count );
63
+ var countdown = setInterval(
64
+ function(){
65
+ jQuery( ".wpbc_countdown" ).html( count );
66
+ if ( count == 0 ){
67
+ clearInterval( countdown );
68
+ window.location.href = "http://wpbookingcalendar.com/overview/#content";
69
+ //window.open( 'http://google.com', "_self" );
70
+ }
71
+ count--;
72
+ }
73
+ , 1000 );
74
+ </script>
75
+ <?php
76
+ do_action( 'wpbc_premium_content_overview' );
77
+ //wpbc_redirect( 'http://wpbookingcalendar.com/overview/#content' );
78
+ }
79
+
80
+ public function css(){
81
+ ?>
82
+ <style type="text/css">
83
+ .nav-tab-wrapper {
84
+ display:none;
85
+ }
86
+ .wpbc_countdown {
87
+ font-weight: 600;
88
+ font-size: 1.2em;
89
+ }
90
+ .wpbc_redirection_message {
91
+ width:100%;
92
+ text-align: center;
93
+
94
+ }
95
+ </style>
96
+ <?php
97
+
98
+ }
99
+ }
100
+
101
+ add_action('wpbc_menu_created', array( new WPBC_Page_SettingsUp() , '__construct') ); // Executed after creation of Menu
core/admin/wpbc-class-listing.php CHANGED
@@ -35,7 +35,8 @@ class WPBC_Booking_Listing_Table {
35
  }
36
 
37
 
38
- /** Get URL for specific menu
 
39
  *
40
  * @param sting $url - 'listing' | 'add' | 'resources' | 'settings' | 'request'
41
  * @return string - url
@@ -148,7 +149,8 @@ class WPBC_Booking_Listing_Table {
148
  }
149
 
150
 
151
- /** Show Listing Rows
 
152
  *
153
  * @param boolean $is_free
154
  */
@@ -281,7 +283,8 @@ class WPBC_Booking_Listing_Table {
281
  }
282
 
283
 
284
- /** Show 1 Listing Row
 
285
  *
286
  * @param array $row_data - Array of data to show
287
  * @param boolean $is_free
@@ -319,7 +322,7 @@ class WPBC_Booking_Listing_Table {
319
  </div><?php
320
 
321
  // Labels
322
- ?><div class="wpbc-no-margin col-sm-<?php echo $is_free ? '6' : '7'; ?> col-xs-10 text-left field-labels booking-labels wpbc_column_3" >
323
  <?php make_bk_action('wpbc_booking_listing_show_label_resource', $row_data['resource_name'], $this->url['request'] .'&wh_booking_type='. $row_data['resource'] ); ?>
324
  <span class="label label-default label-pending <?php if ($row_data['is_approved']) echo ' hidden_items '; ?> "><?php _e('Pending' ,'booking'); ?></span>
325
  <span class="label label-default label-approved <?php if (! $row_data['is_approved']) echo ' hidden_items '; ?>"><?php _e('Approved' ,'booking'); ?></span>
35
  }
36
 
37
 
38
+ /**
39
+ * Get URL for specific menu
40
  *
41
  * @param sting $url - 'listing' | 'add' | 'resources' | 'settings' | 'request'
42
  * @return string - url
149
  }
150
 
151
 
152
+ /**
153
+ * Show Listing Rows
154
  *
155
  * @param boolean $is_free
156
  */
283
  }
284
 
285
 
286
+ /**
287
+ * Show 1 Listing Row
288
  *
289
  * @param array $row_data - Array of data to show
290
  * @param boolean $is_free
322
  </div><?php
323
 
324
  // Labels
325
+ ?><div class="wpbc-no-margin col-sm-<?php echo $is_free ? '6' : '8'; ?> col-xs-10 text-left field-labels booking-labels wpbc_column_3" > <?php // FixIn: 8.0.2.5 $is_free ? '6' : '7' ?>
326
  <?php make_bk_action('wpbc_booking_listing_show_label_resource', $row_data['resource_name'], $this->url['request'] .'&wh_booking_type='. $row_data['resource'] ); ?>
327
  <span class="label label-default label-pending <?php if ($row_data['is_approved']) echo ' hidden_items '; ?> "><?php _e('Pending' ,'booking'); ?></span>
328
  <span class="label label-default label-approved <?php if (! $row_data['is_approved']) echo ' hidden_items '; ?>"><?php _e('Approved' ,'booking'); ?></span>
core/admin/wpbc-class-timeline.php CHANGED
@@ -98,7 +98,8 @@ class WPBC_Timeline {
98
 
99
  ////////////////////////////////////////////////////////////////////////////
100
 
101
- /** Init Timeline From page shortcode
 
102
  *
103
  * @param array $attr = array(
104
  'wh_booking_type' => ''
@@ -123,7 +124,8 @@ class WPBC_Timeline {
123
  $pattern_to_search='%\s*{([^\s]+)' . $param .'}\s*[,]?\s*%';
124
  preg_match_all($pattern_to_search, $bk_otions, $matches, PREG_SET_ORDER);
125
  //debuge($matches);
126
- /** [bookingtimeline ... options='{resource_link 3="http://beta/resource-apartment3-id3/"},{resource_link 4="http://beta/resource-3-id4/"}' ... ]
 
127
  [0] => {resource_link 3="http://beta/resource-apartment3-id3/"},
128
  [1] => resource_link // Name
129
  [2] => 3 // ID
@@ -182,7 +184,8 @@ class WPBC_Timeline {
182
  }
183
 
184
 
185
- /** Init parameters after Ajax Navigation actions
 
186
  *
187
  * @param array $attr
188
  * @return string html_client_id - exist from input parameters
@@ -422,7 +425,8 @@ class WPBC_Timeline {
422
  // S u p p o r t
423
  ////////////////////////////////////////////////////////////////////////////
424
 
425
- /** Get array of cleaned (limited number) paramas from request for getting bookings by "wpbc_get_bookings_objects"
 
426
  *
427
  * @return array
428
  */
@@ -653,7 +657,8 @@ class WPBC_Timeline {
653
  }
654
 
655
 
656
- /** Define Request View Params
 
657
  *
658
  * @param array $param = = array(
659
  'wh_booking_type' => ''
@@ -684,7 +689,8 @@ class WPBC_Timeline {
684
  }
685
 
686
 
687
- /** Get D A T E S and T I M E S from B o o k i n g s
 
688
  *
689
  * @param array $bookings - Booking input array
690
  * @return array - array( $dates_array, $time_array_new )
@@ -1650,7 +1656,8 @@ class WPBC_Timeline {
1650
  }
1651
 
1652
 
1653
- /** Show timeline
 
1654
  * All parameters must be defined.
1655
  */
1656
  public function show_timeline() {
@@ -2008,7 +2015,8 @@ class WPBC_Timeline {
2008
  // T O O L T I P
2009
  ////////////////////////////////////////////////////////////////////////////
2010
 
2011
- /** Get Booking Date for PopOver and inday cell text.
 
2012
  *
2013
  * @param int $bk_id
2014
  * @param array $bookings
98
 
99
  ////////////////////////////////////////////////////////////////////////////
100
 
101
+ /**
102
+ * Init Timeline From page shortcode
103
  *
104
  * @param array $attr = array(
105
  'wh_booking_type' => ''
124
  $pattern_to_search='%\s*{([^\s]+)' . $param .'}\s*[,]?\s*%';
125
  preg_match_all($pattern_to_search, $bk_otions, $matches, PREG_SET_ORDER);
126
  //debuge($matches);
127
+ /**
128
+ * [bookingtimeline ... options='{resource_link 3="http://beta/resource-apartment3-id3/"},{resource_link 4="http://beta/resource-3-id4/"}' ... ]
129
  [0] => {resource_link 3="http://beta/resource-apartment3-id3/"},
130
  [1] => resource_link // Name
131
  [2] => 3 // ID
184
  }
185
 
186
 
187
+ /**
188
+ * Init parameters after Ajax Navigation actions
189
  *
190
  * @param array $attr
191
  * @return string html_client_id - exist from input parameters
425
  // S u p p o r t
426
  ////////////////////////////////////////////////////////////////////////////
427
 
428
+ /**
429
+ * Get array of cleaned (limited number) paramas from request for getting bookings by "wpbc_get_bookings_objects"
430
  *
431
  * @return array
432
  */
657
  }
658
 
659
 
660
+ /**
661
+ * Define Request View Params
662
  *
663
  * @param array $param = = array(
664
  'wh_booking_type' => ''
689
  }
690
 
691
 
692
+ /**
693
+ * Get D A T E S and T I M E S from B o o k i n g s
694
  *
695
  * @param array $bookings - Booking input array
696
  * @return array - array( $dates_array, $time_array_new )
1656
  }
1657
 
1658
 
1659
+ /**
1660
+ * Show timeline
1661
  * All parameters must be defined.
1662
  */
1663
  public function show_timeline() {
2015
  // T O O L T I P
2016
  ////////////////////////////////////////////////////////////////////////////
2017
 
2018
+ /**
2019
+ * Get Booking Date for PopOver and inday cell text.
2020
  *
2021
  * @param int $bk_id
2022
  * @param array $bookings
core/admin/wpbc-dashboard.php CHANGED
@@ -362,11 +362,15 @@ function wpbc_dashboard_section_version() {
362
  if ( wpbc_is_this_demo() )
363
  $version = 'free';
364
 
 
 
 
 
365
  if ( ( $version !== 'free' ) && ( class_exists('wpdev_bk_multiuser') === false ) ) { ?>
366
  <div class="wpbc_dashboard_section border_orrange" id="bk_upgrade_section">
367
  <div style="padding:0px 10px;width:96%;">
368
  <h4><?php _e('Upgrade to higher versions' ,'booking') ?>:</h4>
369
- <p>Check additional advanced functionality, which exist in higher versions and can be interesting for you <a href="http://wpbookingcalendar.com/features/" target="_blank">here &raquo;</a></p>
370
  <p><a class="button button-primary" style="margin-top: 10px;font-weight: 600;" href="<?php echo wpbc_up_link(); ?>" target="_blank"><?php if ( wpbc_get_ver_sufix() == '' ) { _e('Purchase' ,'booking'); } else { _e('Upgrade Now' ,'booking'); } ?></a> </p>
371
  </div>
372
  </div>
@@ -379,7 +383,7 @@ function wpbc_dashboard_section_version() {
379
  </script>
380
  <?php } ?>
381
  <?php }
382
-
383
  ?>
384
  <div class="wpbc_dashboard_section" >
385
  <span class="bk_header"><?php _e('Current version' ,'booking');?>:</span>
362
  if ( wpbc_is_this_demo() )
363
  $version = 'free';
364
 
365
+ /*
366
+
367
+ Disbale hidded notice about Upgrade to higher version in paid versions
368
+ //FixIn: 8.0.1.6
369
  if ( ( $version !== 'free' ) && ( class_exists('wpdev_bk_multiuser') === false ) ) { ?>
370
  <div class="wpbc_dashboard_section border_orrange" id="bk_upgrade_section">
371
  <div style="padding:0px 10px;width:96%;">
372
  <h4><?php _e('Upgrade to higher versions' ,'booking') ?>:</h4>
373
+ <p>Check additional advanced functionality, which exist in higher versions and can be interesting for you <a href="http://wpbookingcalendar.com/overview/" target="_blank">here &raquo;</a></p>
374
  <p><a class="button button-primary" style="margin-top: 10px;font-weight: 600;" href="<?php echo wpbc_up_link(); ?>" target="_blank"><?php if ( wpbc_get_ver_sufix() == '' ) { _e('Purchase' ,'booking'); } else { _e('Upgrade Now' ,'booking'); } ?></a> </p>
375
  </div>
376
  </div>
383
  </script>
384
  <?php } ?>
385
  <?php }
386
+ */
387
  ?>
388
  <div class="wpbc_dashboard_section" >
389
  <span class="bk_header"><?php _e('Current version' ,'booking');?>:</span>
core/admin/wpbc-sql.php CHANGED
@@ -17,7 +17,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
17
  // R e q u e s t S u p p o r t
18
  ////////////////////////////////////////////////////////////////////////////////
19
 
20
- /** Get here default View mode saved in a General Booking Settings page or From REQUEST view_mode
 
21
  *
22
  * @return string = 'vm_calendar' | 'vm_listing'
23
  */
@@ -35,7 +36,8 @@ function wpbc_get_default_saved_view_mode_for_wpbc_page() {
35
  }
36
 
37
 
38
- /** Get from SETTINGS (if its not set in request yet) the "tab" & "view_mode" and set to $_REQUEST
 
39
  If we have the "saved" filter set so LOAD it and set to REQUEST, if REQUEST was not set previously
40
  & skip "wh_booking_type" from the saved filter set
41
  *
@@ -117,7 +119,8 @@ function wpbc_set_default_saved_params_to_request_for_booking_listing( $filter_n
117
 
118
 
119
 
120
- /** Clean Request Parameters
 
121
  *
122
  */
123
  function wpbc_check_request_paramters() { //FixIn:6.2.1.4
@@ -216,7 +219,8 @@ function wpbc_check_request_paramters() {
216
  }
217
 
218
 
219
- /** Get array of cleaned (limited number) paramas from REQUEST
 
220
  *
221
  * @return array
222
  */
@@ -250,7 +254,8 @@ function wpbc_get_clean_paramas_from_request_for_booking_listing(){
250
  return $args;
251
  }
252
 
253
- /** Get array of cleaned (limited number) paramas from REQUEST
 
254
  *
255
  * @return array
256
  */
@@ -509,7 +514,8 @@ function wpbc_set_default_resource_to__get() {
509
  }
510
 
511
 
512
- /** Get ID of default booking resource, or return false (in case if user have no access to this resource and show some warnings).
 
513
  *
514
  * @return boolean|int
515
  */
@@ -547,7 +553,8 @@ function wpbc_get_default_resource() {
547
  // S u p p o r t
548
  ////////////////////////////////////////////////////////////////////////////////
549
 
550
- /** Check if current WP user can be here
 
551
  * Checking if the user activated, and booking resource belong to specific user
552
  *
553
  * @param string $check_condition 'activated_user' | 'resource_owner' | 'only_super_admin'
@@ -575,9 +582,10 @@ function wpbc_is_mu_user_can_be_here( $check_condition, $booking_resource = ''
575
  // E n g i n e B o o k i n g L i s t i n g
576
  ////////////////////////////////////////////////////////////////////////////////
577
 
578
- /** E n g i n e for getting Bookings objects for Booking Listing pages
 
579
  *
580
- * @param type $args - Request paramters from filters
581
  * @return array(
582
  'bookings' => $bookings
583
  , 'resources' => $booking_types
@@ -591,7 +599,7 @@ function wpbc_get_bookings_objects( $args ){
591
  global $wpdb;
592
 
593
  // Initial variables //////////////////////////////////////////////////////
594
-
595
  $sql_boking_listing = wpbc_get_sql_for_booking_listing( $args );
596
 
597
  $sql_start_count = $sql_boking_listing[ 'sql_start_count' ];
@@ -851,7 +859,8 @@ function wpbc_get_bookings_objects( $args ){
851
  // S Q L
852
  ////////////////////////////////////////////////////////////////////////////////
853
 
854
- /** Get S Q L for bookings at Booking Listing page
 
855
  *
856
  * @param array $args - Request paramters from filters
857
  * @return array - Get array with SQL for getting bookings
@@ -975,7 +984,8 @@ function wpbc_get_sql_for_booking_listing( $args ){
975
  // S Q L W H E R E
976
  ////////////////////////////////////////////////////////////////////////////////
977
 
978
- /** Get SQL W H E R E conditions for D a t e s of bookings
 
979
  *
980
  * @param string $wh_booking_date - Parameter from Booking Listing request (usually its number)
981
  * @param string $wh_booking_date2 - Parameter from Booking Listing request (usually its number)
@@ -1005,7 +1015,8 @@ function wpbc_set_sql_where_for_dates( $wh_booking_date, $wh_booking_date2, $pre
1005
 
1006
  } else if ($wh_booking_date === '4') { // Next
1007
  $sql_where = $and_pre."( ".$pref."booking_date <= ( CURDATE() + INTERVAL ". $wh_booking_date2 . " DAY ) ) ".$and_suf ;
1008
- $sql_where .= $and_pre."( ".$pref."booking_date >= ( CURDATE() - INTERVAL 1 DAY ) ) ".$and_suf ;
 
1009
 
1010
  } else if ($wh_booking_date === '5') { // Prior
1011
  $wh_booking_date2 = str_replace('-', '', $wh_booking_date2);
@@ -1038,12 +1049,13 @@ function wpbc_set_sql_where_for_dates( $wh_booking_date, $wh_booking_date2, $pre
1038
  $sql_where.= $and_pre."( ".$pref."booking_date <= '" . $wh_booking_date2 . " 23:59:59' ) ".$and_suf;
1039
  else $sql_where.= $and_pre."( ".$pref."booking_date <= '" . $wh_booking_date2 . "' ) ".$and_suf;
1040
  }
1041
-
1042
  return $sql_where;
1043
  }
1044
 
1045
 
1046
- /** Get SQL W H E R E conditions for M o d i f i c a t i o n D a t e of bookings
 
1047
  *
1048
  * @param type $wh_modification_date - Parameter from Booking Listing request (usually its number)
1049
  * @param type $wh_modification_date2 - Parameter from Booking Listing request (usually its number)
17
  // R e q u e s t S u p p o r t
18
  ////////////////////////////////////////////////////////////////////////////////
19
 
20
+ /**
21
+ * Get here default View mode saved in a General Booking Settings page or From REQUEST view_mode
22
  *
23
  * @return string = 'vm_calendar' | 'vm_listing'
24
  */
36
  }
37
 
38
 
39
+ /**
40
+ * Get from SETTINGS (if its not set in request yet) the "tab" & "view_mode" and set to $_REQUEST
41
  If we have the "saved" filter set so LOAD it and set to REQUEST, if REQUEST was not set previously
42
  & skip "wh_booking_type" from the saved filter set
43
  *
119
 
120
 
121
 
122
+ /**
123
+ * Clean Request Parameters
124
  *
125
  */
126
  function wpbc_check_request_paramters() { //FixIn:6.2.1.4
219
  }
220
 
221
 
222
+ /**
223
+ * Get array of cleaned (limited number) paramas from REQUEST
224
  *
225
  * @return array
226
  */
254
  return $args;
255
  }
256
 
257
+ /**
258
+ * Get array of cleaned (limited number) paramas from REQUEST
259
  *
260
  * @return array
261
  */
514
  }
515
 
516
 
517
+ /**
518
+ * Get ID of default booking resource, or return false (in case if user have no access to this resource and show some warnings).
519
  *
520
  * @return boolean|int
521
  */
553
  // S u p p o r t
554
  ////////////////////////////////////////////////////////////////////////////////
555
 
556
+ /**
557
+ * Check if current WP user can be here
558
  * Checking if the user activated, and booking resource belong to specific user
559
  *
560
  * @param string $check_condition 'activated_user' | 'resource_owner' | 'only_super_admin'
582
  // E n g i n e B o o k i n g L i s t i n g
583
  ////////////////////////////////////////////////////////////////////////////////
584
 
585
+ /**
586
+ * E n g i n e for getting Bookings objects for Booking Listing pages
587
  *
588
+ * @param array $args - Request paramters from filters
589
  * @return array(
590
  'bookings' => $bookings
591
  , 'resources' => $booking_types
599
  global $wpdb;
600
 
601
  // Initial variables //////////////////////////////////////////////////////
602
+
603
  $sql_boking_listing = wpbc_get_sql_for_booking_listing( $args );
604
 
605
  $sql_start_count = $sql_boking_listing[ 'sql_start_count' ];
859
  // S Q L
860
  ////////////////////////////////////////////////////////////////////////////////
861
 
862
+ /**
863
+ * Get S Q L for bookings at Booking Listing page
864
  *
865
  * @param array $args - Request paramters from filters
866
  * @return array - Get array with SQL for getting bookings
984
  // S Q L W H E R E
985
  ////////////////////////////////////////////////////////////////////////////////
986
 
987
+ /**
988
+ * Get SQL W H E R E conditions for D a t e s of bookings
989
  *
990
  * @param string $wh_booking_date - Parameter from Booking Listing request (usually its number)
991
  * @param string $wh_booking_date2 - Parameter from Booking Listing request (usually its number)
1015
 
1016
  } else if ($wh_booking_date === '4') { // Next
1017
  $sql_where = $and_pre."( ".$pref."booking_date <= ( CURDATE() + INTERVAL ". $wh_booking_date2 . " DAY ) ) ".$and_suf ;
1018
+ // $sql_where .= $and_pre."( ".$pref."booking_date >= ( CURDATE() - INTERVAL 1 DAY ) ) ".$and_suf ;
1019
+ $sql_where .= $and_pre."( ".$pref."booking_date > ( CURDATE() ) ) ".$and_suf ; //FixIn: 8.0.1.1
1020
 
1021
  } else if ($wh_booking_date === '5') { // Prior
1022
  $wh_booking_date2 = str_replace('-', '', $wh_booking_date2);
1049
  $sql_where.= $and_pre."( ".$pref."booking_date <= '" . $wh_booking_date2 . " 23:59:59' ) ".$and_suf;
1050
  else $sql_where.= $and_pre."( ".$pref."booking_date <= '" . $wh_booking_date2 . "' ) ".$and_suf;
1051
  }
1052
+
1053
  return $sql_where;
1054
  }
1055
 
1056
 
1057
+ /**
1058
+ * Get SQL W H E R E conditions for M o d i f i c a t i o n D a t e of bookings
1059
  *
1060
  * @param type $wh_modification_date - Parameter from Booking Listing request (usually its number)
1061
  * @param type $wh_modification_date2 - Parameter from Booking Listing request (usually its number)
core/admin/wpbc-toolbar-tiny.php CHANGED
@@ -104,7 +104,8 @@ class WPBC_TinyMCE_Buttons {
104
 
105
  // <editor-fold defaultstate="collapsed" desc=" TinyMCE - Add Button " >
106
 
107
- /** Load JS file - TinyMCE plugin
 
108
  *
109
  * @param array $plugins
110
  * @return array
@@ -117,7 +118,8 @@ class WPBC_TinyMCE_Buttons {
117
  }
118
 
119
 
120
- /** Add the custom TinyMCE buttons
 
121
  *
122
  * @param array $buttons
123
  * @return array
104
 
105
  // <editor-fold defaultstate="collapsed" desc=" TinyMCE - Add Button " >
106
 
107
+ /**
108
+ * Load JS file - TinyMCE plugin
109
  *
110
  * @param array $plugins
111
  * @return array
118
  }
119
 
120
 
121
+ /**
122
+ * Add the custom TinyMCE buttons
123
  *
124
  * @param array $buttons
125
  * @return array
core/admin/wpbc-toolbars.php CHANGED
@@ -335,7 +335,8 @@ function wpbc_add_new_booking_toolbar() {
335
  // HTML elements for Toolbar
336
  ////////////////////////////////////////////////////////////////////////////////
337
 
338
- /** Expand or Collapse Advanced Filter set
 
339
  *
340
  * @param string $css_class_of_expand_element - CSS Class of element section to show or hide
341
  */
@@ -426,13 +427,13 @@ function wpbc_bs_dropdown_menu_help() {
426
  , 'font_icon' => 'glyphicon glyphicon-question-sign'
427
  , 'position' => 'right'
428
  , 'items' => array(
429
- array( 'type' => 'link', 'title' => __('About Booking Calendar', 'booking'), 'url' => esc_url( admin_url( add_query_arg( array( 'page' => 'wpbc-about' ), 'index.php' ) ) ) )
430
  , array( 'type' => 'divider' )
431
  , array( 'type' => 'link', 'title' => __('Help', 'booking'), 'url' => 'http://wpbookingcalendar.com/help/' )
432
  , array( 'type' => 'link', 'title' => __('FAQ', 'booking'), 'url' => 'http://wpbookingcalendar.com/faq/' )
433
  , array( 'type' => 'link', 'title' => __('Technical Support', 'booking'), 'url' => 'http://wpbookingcalendar.com/support/' )
434
  , array( 'type' => 'divider' )
435
- , array( 'type' => 'link', 'title' => __('Upgrade Now', 'booking'), 'url' => wpbc_up_link()
436
  , 'attr' => array(
437
  'target' => '_blank'
438
  , 'style' => 'font-weight: 600;font-size: 1em;'
@@ -1824,7 +1825,8 @@ function wpbc_toolbar_is_send_emails_btn_duplicated() {
1824
  }
1825
 
1826
 
1827
- /** Show Link (button) for adding booking to Google Calendar
 
1828
  *
1829
  * @param int $booking_id
1830
  * @param array $button_attr
@@ -1854,7 +1856,8 @@ function wpbc_btn_add_booking_to_google_calendar( $booking_data, $button_attr =
1854
  if ( is_serialized( $booking_gcal_events_form_fields ) )
1855
  $booking_gcal_events_form_fields = unserialize( $booking_gcal_events_form_fields );
1856
 
1857
- /** Array
 
1858
  (
1859
  [title] => text^name
1860
  [description] => textarea^details
@@ -2000,7 +2003,8 @@ sprop:
2000
  // Toolbar Other UI elements - General
2001
  ////////////////////////////////////////////////////////////////////////////////
2002
 
2003
- /** Selection elements in toolbar UI selectbox
 
2004
  *
2005
  * @param array $params
2006
  *
@@ -2066,7 +2070,37 @@ function wpbc_toolbar_btn__selection_element( $params ) {
2066
  // Toolbar S e a r c h F o r m at Top Right side of Settings page
2067
  ////////////////////////////////////////////////////////////////////////////////
2068
 
2069
- /** Real Search booking data by ID | Title (at top right side of page)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2070
  *
2071
  * @param array $params - array of parameters
2072
  * Exmaple:
335
  // HTML elements for Toolbar
336
  ////////////////////////////////////////////////////////////////////////////////
337
 
338
+ /**
339
+ * Expand or Collapse Advanced Filter set
340
  *
341
  * @param string $css_class_of_expand_element - CSS Class of element section to show or hide
342
  */
427
  , 'font_icon' => 'glyphicon glyphicon-question-sign'
428
  , 'position' => 'right'
429
  , 'items' => array(
430
+ array( 'type' => 'link', 'title' => "What's New"/*__('Get Started')*/, 'url' => esc_url( admin_url( add_query_arg( array( 'page' => 'wpbc-about' ), 'index.php' ) ) ) )
431
  , array( 'type' => 'divider' )
432
  , array( 'type' => 'link', 'title' => __('Help', 'booking'), 'url' => 'http://wpbookingcalendar.com/help/' )
433
  , array( 'type' => 'link', 'title' => __('FAQ', 'booking'), 'url' => 'http://wpbookingcalendar.com/faq/' )
434
  , array( 'type' => 'link', 'title' => __('Technical Support', 'booking'), 'url' => 'http://wpbookingcalendar.com/support/' )
435
  , array( 'type' => 'divider' )
436
+ , array( 'type' => 'link', 'title' => __('About Booking Calendar', 'booking'), 'url' => wpbc_up_link()
437
  , 'attr' => array(
438
  'target' => '_blank'
439
  , 'style' => 'font-weight: 600;font-size: 1em;'
1825
  }
1826
 
1827
 
1828
+ /**
1829
+ * Show Link (button) for adding booking to Google Calendar
1830
  *
1831
  * @param int $booking_id
1832
  * @param array $button_attr
1856
  if ( is_serialized( $booking_gcal_events_form_fields ) )
1857
  $booking_gcal_events_form_fields = unserialize( $booking_gcal_events_form_fields );
1858
 
1859
+ /**
1860
+ * Array
1861
  (
1862
  [title] => text^name
1863
  [description] => textarea^details
2003
  // Toolbar Other UI elements - General
2004
  ////////////////////////////////////////////////////////////////////////////////
2005
 
2006
+ /**
2007
+ * Selection elements in toolbar UI selectbox
2008
  *
2009
  * @param array $params
2010
  *
2070
  // Toolbar S e a r c h F o r m at Top Right side of Settings page
2071
  ////////////////////////////////////////////////////////////////////////////////
2072
 
2073
+ //FixIn: 8.0.1.12
2074
+ /**
2075
+ * Add hidden input SEARCH KEY field into main form, if previosly was searching by ID or Title
2076
+ * @param array $params => array( 'search_get_key' => 'wh_resource_id' )
2077
+ */
2078
+ function wpbc_hidden_search_by_id_field_in_main_form( $params = array() ){
2079
+
2080
+ $defaults = array(
2081
+ 'search_get_key' => 'wh_search_id'
2082
+ );
2083
+ $params = wp_parse_args( $params, $defaults );
2084
+
2085
+
2086
+ $search_form_value = '';
2087
+ if ( isset( $_REQUEST[ $params[ 'search_get_key' ] ] ) ) {
2088
+ $wh_resource_id = wpbc_clean_digit_or_csd( $_REQUEST[ $params[ 'search_get_key' ] ] ); // '12,0,45,9' or '10'
2089
+ $wh_resource_title = wpbc_clean_string_for_form( $_REQUEST[ $params[ 'search_get_key' ] ] ); // Clean string
2090
+ if ( ! empty( $wh_resource_id ) ) {
2091
+ $search_form_value = $wh_resource_id;
2092
+ } else {
2093
+ $search_form_value = $wh_resource_title;
2094
+ }
2095
+ }
2096
+
2097
+ if ( '' !== $search_form_value ) {
2098
+ ?><input name="<?php echo $params['search_get_key']; ?>" value="<?php echo $search_form_value; ?>" type="hidden"><?php
2099
+ }
2100
+ }
2101
+
2102
+ /**
2103
+ * Real Search booking data by ID | Title (at top right side of page)
2104
  *
2105
  * @param array $params - array of parameters
2106
  * Exmaple:
core/any/activation.php CHANGED
@@ -54,7 +54,8 @@ abstract class WPBC_Install {
54
  }
55
 
56
 
57
- /** Must be overloaded in child CLASS
 
58
  *
59
  * * Important! for correct loading of trasnaltions later, we must do not use here loacale of plugin. So here will be untranslated strings!!!
60
  *
@@ -73,7 +74,8 @@ abstract class WPBC_Install {
73
  abstract function get_init_option_names();
74
 
75
 
76
- /** Must be overloaded in child CLASS
 
77
  * Exmaple:
78
  *
79
  return false
@@ -189,7 +191,8 @@ abstract class WPBC_Install {
189
  }
190
 
191
 
192
- /** Upgrade during bulk upgrade of plugins
 
193
  *
194
  * @param type $return
195
  * @param type $hook_extra
@@ -212,7 +215,8 @@ abstract class WPBC_Install {
212
  }
213
 
214
 
215
- /** User clicked on "Activate" link at Plugins Menu.
 
216
  *
217
  * @return type
218
  */
54
  }
55
 
56
 
57
+ /**
58
+ * Must be overloaded in child CLASS
59
  *
60
  * * Important! for correct loading of trasnaltions later, we must do not use here loacale of plugin. So here will be untranslated strings!!!
61
  *
74
  abstract function get_init_option_names();
75
 
76
 
77
+ /**
78
+ * Must be overloaded in child CLASS
79
  * Exmaple:
80
  *
81
  return false
191
  }
192
 
193
 
194
+ /**
195
+ * Upgrade during bulk upgrade of plugins
196
  *
197
  * @param type $return
198
  * @param type $hook_extra
215
  }
216
 
217
 
218
+ /**
219
+ * User clicked on "Activate" link at Plugins Menu.
220
  *
221
  * @return type
222
  */
core/any/admin-bs-ui.php CHANGED
@@ -17,7 +17,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
17
  // Single elements //////////////////////////////////////////////////////
18
  ////////////////////////////////////////////////////////////////////////////////
19
 
20
- /** Show BS Button
 
21
  *
22
  * @param array $item
23
  array(
@@ -95,7 +96,8 @@ function wpbc_bs_button( $item ) {
95
  }
96
 
97
 
98
- /** Show BS text
 
99
  *
100
  * @param array $item
101
  array(
@@ -142,7 +144,8 @@ function wpbc_bs_text( $item ) {
142
  }
143
 
144
 
145
- /** Show BS selectbox
 
146
  *
147
  * @param array $item
148
  array(
@@ -252,7 +255,8 @@ function wpbc_bs_select( $item ) {
252
  }
253
 
254
 
255
- /** Show BS checkbox
 
256
  *
257
  * @param array $item
258
  array(
@@ -274,7 +278,8 @@ function wpbc_bs_radio( $item ) {
274
  }
275
 
276
 
277
- /** Show BS checkbox
 
278
  *
279
  * @param array $item
280
  array(
@@ -320,7 +325,8 @@ function wpbc_bs_checkbox( $item ) {
320
  }
321
 
322
 
323
- /** Show BS addon
 
324
  *
325
  * @param array $item
326
  array(
@@ -402,7 +408,8 @@ function wpbc_bs_addon( $item ) {
402
  }
403
 
404
 
405
- /** Show BS Dropdown
 
406
  *
407
  * @param array $item
408
  array(
@@ -672,7 +679,8 @@ function wpbc_bs_list_of_options_for_dropdown( $params, $dropdown_type = 'simple
672
  // Control elements //////////////////////////////////////////////////////
673
  ////////////////////////////////////////////////////////////////////////////////
674
 
675
- /** Button Groups
 
676
  *
677
  * @param array $args
678
  *
@@ -751,7 +759,8 @@ function wpbc_bs_button_group( $args = array() ) {
751
  }
752
 
753
 
754
- /** Show Input Group
 
755
  *
756
  * @param array $args
757
  *
@@ -1012,7 +1021,8 @@ function wpbc_bs_input_group( $args = array() ) {
1012
  }
1013
 
1014
 
1015
- /** Selectbox - Dropdown List with comple UI elements
 
1016
  *
1017
  * @param array $args = array(
1018
  'id' => '' // HTML ID of element
@@ -1485,7 +1495,8 @@ function wpbc_bs_dropdown_list( $args = array() ) {
1485
  // Drop Down Menu
1486
  ////////////////////////////////////////////////////////////////////////////////
1487
 
1488
- /** Show Dropdown Menu
 
1489
  *
1490
  * Usage:
1491
 
@@ -1574,7 +1585,8 @@ function wpbc_bs_dropdown_menu( $args = array() ) {
1574
  // Vertical Buttons Group
1575
  ////////////////////////////////////////////////////////////////////////////////
1576
 
1577
- /** Devine Vertical Buttons Group
 
1578
  *
1579
  * @param array $params
1580
  *
@@ -1646,7 +1658,8 @@ function wpbc_bs_vertical_buttons_group( $params ) {
1646
  // Navigation Toolbar Tabs
1647
  ////////////////////////////////////////////////////////////////////////////////
1648
 
1649
- /** Display Tab in Navigation line
 
1650
  *
1651
  * @param array $args
1652
  array(
@@ -2094,7 +2107,8 @@ function wpbc_bs_javascript_popover() {
2094
  // S U P P O R T
2095
  ////////////////////////////////////////////////////////////////////////////////
2096
 
2097
- /** Get custom atrributes for HTML elements
 
2098
  *
2099
  * @param array $field
2100
  * @return type
17
  // Single elements //////////////////////////////////////////////////////
18
  ////////////////////////////////////////////////////////////////////////////////
19
 
20
+ /**
21
+ * Show BS Button
22
  *
23
  * @param array $item
24
  array(
96
  }
97
 
98
 
99
+ /**
100
+ * Show BS text
101
  *
102
  * @param array $item
103
  array(
144
  }
145
 
146
 
147
+ /**
148
+ * Show BS selectbox
149
  *
150
  * @param array $item
151
  array(
255
  }
256
 
257
 
258
+ /**
259
+ * Show BS checkbox
260
  *
261
  * @param array $item
262
  array(
278
  }
279
 
280
 
281
+ /**
282
+ * Show BS checkbox
283
  *
284
  * @param array $item
285
  array(
325
  }
326
 
327
 
328
+ /**
329
+ * Show BS addon
330
  *
331
  * @param array $item
332
  array(
408
  }
409
 
410
 
411
+ /**
412
+ * Show BS Dropdown
413
  *
414
  * @param array $item
415
  array(
679
  // Control elements //////////////////////////////////////////////////////
680
  ////////////////////////////////////////////////////////////////////////////////
681
 
682
+ /**
683
+ * Button Groups
684
  *
685
  * @param array $args
686
  *
759
  }
760
 
761
 
762
+ /**
763
+ * Show Input Group
764
  *
765
  * @param array $args
766
  *
1021
  }
1022
 
1023
 
1024
+ /**
1025
+ * Selectbox - Dropdown List with comple UI elements
1026
  *
1027
  * @param array $args = array(
1028
  'id' => '' // HTML ID of element
1495
  // Drop Down Menu
1496
  ////////////////////////////////////////////////////////////////////////////////
1497
 
1498
+ /**
1499
+ * Show Dropdown Menu
1500
  *
1501
  * Usage:
1502
 
1585
  // Vertical Buttons Group
1586
  ////////////////////////////////////////////////////////////////////////////////
1587
 
1588
+ /**
1589
+ * Devine Vertical Buttons Group
1590
  *
1591
  * @param array $params
1592
  *
1658
  // Navigation Toolbar Tabs
1659
  ////////////////////////////////////////////////////////////////////////////////
1660
 
1661
+ /**
1662
+ * Display Tab in Navigation line
1663
  *
1664
  * @param array $args
1665
  array(
2107
  // S U P P O R T
2108
  ////////////////////////////////////////////////////////////////////////////////
2109
 
2110
+ /**
2111
+ * Get custom atrributes for HTML elements
2112
  *
2113
  * @param array $field
2114
  * @return type
core/any/api-emails.php CHANGED
@@ -20,7 +20,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
20
 
21
 
22
 
23
- /** Email Settings API Constructor
 
24
  * During creation, system try to load values from DB, if exist.
25
  *
26
  * @param type $id - "Pure Email Template name
@@ -43,7 +44,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
43
 
44
 
45
 
46
- /** This function must be overriden - Initialise Settings Form Fields
 
47
 
48
  public function init_settings_fields() {
49
 
@@ -66,7 +68,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
66
 
67
  // <editor-fold defaultstate="collapsed" desc=" Suport functions " >
68
 
69
- /** List of preg* regular expression patterns to search for replace in plain emails.
 
70
  * More: https://raw.github.com/ushahidi/wp-silcc/master/class.html2text.inc
71
  */
72
  private function get_plain_search_array() {
@@ -124,7 +127,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
124
  }
125
 
126
 
127
- /** Esacpe and replace any HTML entities
 
128
  *
129
  * @param type $string
130
  * @return string
@@ -141,7 +145,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
141
  }
142
 
143
 
144
- /** Set array for replacing shortcodes in Email Content and Subject
 
145
  *
146
  * @param array $replace - if this parameter skipped, then array reseted to empty array
147
  */
@@ -150,7 +155,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
150
  }
151
 
152
 
153
- /** Replace shortcodes in givven string. Usually its Email Content and Subject
 
154
  *
155
  * @param string $subject
156
  */
@@ -180,7 +186,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
180
 
181
  // <editor-fold defaultstate="collapsed" desc=" Pure Email functions " >
182
 
183
- /** For MultiPart email define plain text - AltBody
 
184
  *
185
  * Also additionaly fix Sender - its have to be same as From
186
  *
@@ -204,7 +211,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
204
  }
205
 
206
 
207
- /** Get type of Email: 'plain' | 'html' | 'multipart'
 
208
  *
209
  * @return string
210
  */
@@ -214,7 +222,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
214
  }
215
 
216
 
217
- /** Get Email Content Type: 'text/plain' | 'text/html' | 'multipart/alternative'
 
218
  *
219
  * @return string
220
  */
@@ -231,7 +240,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
231
  }
232
 
233
 
234
- /** Define Email Headers. For exmaple: "Conte type:" 'text/plain' | 'text/html' | 'multipart/alternative' or "From": Name <email@server.com>
 
235
  *
236
  * @return string
237
  */
@@ -260,7 +270,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
260
  }
261
 
262
 
263
- /** Get Content of Email
 
264
  *
265
  * @return string
266
  */
@@ -281,7 +292,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
281
  }
282
 
283
 
284
- /** Get Email Content as Text (from Plain Text template)
 
285
  *
286
  * @return string
287
  */
@@ -317,7 +329,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
317
  }
318
 
319
 
320
- /** Get Email Content as HTML (from HTML template)
 
321
  *
322
  * @return type
323
  */
@@ -351,7 +364,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
351
  }
352
 
353
 
354
- /** Get escaped Email Subject
 
355
  *
356
  * @return string
357
  */
@@ -369,7 +383,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
369
  }
370
 
371
 
372
- /** Get escapeed Name from any not supporting characters
 
373
  *
374
  * @return string
375
  */
@@ -378,7 +393,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
378
  }
379
 
380
 
381
- /** Get sanitized Email address
 
382
  *
383
  * @return type
384
  */
@@ -387,7 +403,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
387
  }
388
 
389
 
390
- /** For future support, right now does not support
 
391
  *
392
  * @return empty string
393
  */
@@ -396,7 +413,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
396
  }
397
 
398
 
399
- /** Check email and format it
 
400
  *
401
  * @param string $emails
402
  * @return string
@@ -502,7 +520,8 @@ abstract class WPBC_Emails_API extends WPBC_Settings_API {
502
  // </editor-fold>
503
 
504
 
505
- /** Show possible erros during sending emails.
 
506
  *
507
  * @param type $wp_error_object - new WP_Error( $e->getCode(), $e->getMessage(), $mail_error_data )
508
  */
20
 
21
 
22
 
23
+ /**
24
+ * Email Settings API Constructor
25
  * During creation, system try to load values from DB, if exist.
26
  *
27
  * @param type $id - "Pure Email Template name
44
 
45
 
46
 
47
+ /**
48
+ * This function must be overriden - Initialise Settings Form Fields
49
 
50
  public function init_settings_fields() {
51
 
68
 
69
  // <editor-fold defaultstate="collapsed" desc=" Suport functions " >
70
 
71
+ /**
72
+ * List of preg* regular expression patterns to search for replace in plain emails.
73
  * More: https://raw.github.com/ushahidi/wp-silcc/master/class.html2text.inc
74
  */
75
  private function get_plain_search_array() {
127
  }
128
 
129
 
130
+ /**
131
+ * Esacpe and replace any HTML entities
132
  *
133
  * @param type $string
134
  * @return string
145
  }
146
 
147
 
148
+ /**
149
+ * Set array for replacing shortcodes in Email Content and Subject
150
  *
151
  * @param array $replace - if this parameter skipped, then array reseted to empty array
152
  */
155
  }
156
 
157
 
158
+ /**
159
+ * Replace shortcodes in givven string. Usually its Email Content and Subject
160
  *
161
  * @param string $subject
162
  */
186
 
187
  // <editor-fold defaultstate="collapsed" desc=" Pure Email functions " >
188
 
189
+ /**
190
+ * For MultiPart email define plain text - AltBody
191
  *
192
  * Also additionaly fix Sender - its have to be same as From
193
  *
211
  }
212
 
213
 
214
+ /**
215
+ * Get type of Email: 'plain' | 'html' | 'multipart'
216
  *
217
  * @return string
218
  */
222
  }
223
 
224
 
225
+ /**
226
+ * Get Email Content Type: 'text/plain' | 'text/html' | 'multipart/alternative'
227
  *
228
  * @return string
229
  */
240
  }
241
 
242
 
243
+ /**
244
+ * Define Email Headers. For exmaple: "Conte type:" 'text/plain' | 'text/html' | 'multipart/alternative' or "From": Name <email@server.com>
245
  *
246
  * @return string
247
  */
270
  }
271
 
272
 
273
+ /**
274
+ * Get Content of Email
275
  *
276
  * @return string
277
  */
292
  }
293
 
294
 
295
+ /**
296
+ * Get Email Content as Text (from Plain Text template)
297
  *
298
  * @return string
299
  */
329
  }
330
 
331
 
332
+ /**
333
+ * Get Email Content as HTML (from HTML template)
334
  *
335
  * @return type
336
  */
364
  }
365
 
366
 
367
+ /**
368
+ * Get escaped Email Subject
369
  *
370
  * @return string
371
  */
383
  }
384
 
385
 
386
+ /**
387
+ * Get escapeed Name from any not supporting characters
388
  *
389
  * @return string
390
  */
393
  }
394
 
395
 
396
+ /**
397
+ * Get sanitized Email address
398
  *
399
  * @return type
400
  */
403
  }
404
 
405
 
406
+ /**
407
+ * For future support, right now does not support
408
  *
409
  * @return empty string
410
  */
413
  }
414
 
415
 
416
+ /**
417
+ * Check email and format it
418
  *
419
  * @param string $emails
420
  * @return string
520
  // </editor-fold>
521
 
522
 
523
+ /**
524
+ * Show possible erros during sending emails.
525
  *
526
  * @param type $wp_error_object - new WP_Error( $e->getCode(), $e->getMessage(), $mail_error_data )
527
  */
core/any/class-admin-menu.php CHANGED
@@ -82,7 +82,8 @@ class WPBC_Admin_Menus {
82
  }
83
 
84
 
85
- /** Define Plugin Menu Page
 
86
  *
87
  */
88
  public function new_admin_page(){
@@ -117,7 +118,8 @@ class WPBC_Admin_Menus {
117
  }
118
 
119
 
120
- /** Content of the Menu Page
 
121
  *
122
  Define page S t r u c t u r e, nav T A B s , set N O N C E: wpbc_ajax_admin_nonce field
123
 
@@ -134,7 +136,8 @@ class WPBC_Admin_Menus {
134
 
135
 
136
 
137
- /** Hack for changing Root 2nd Submenu Title
 
138
  *
139
  * @global type $submenu
140
  */
@@ -152,7 +155,8 @@ class WPBC_Admin_Menus {
152
  }
153
 
154
 
155
- /** Add Menu
 
156
  *
157
  * @param type $menu_page_title
158
  * @param type $menu_title
@@ -203,7 +207,8 @@ class WPBC_Admin_Menus {
203
  }
204
 
205
 
206
- /** Add Sub Menu
 
207
  *
208
  * @param type $parent_menu_slug - The slug name for the parent menu (or the file name of a standard WordPress admin page)
209
  * @param type $menu_page_title
82
  }
83
 
84
 
85
+ /**
86
+ * Define Plugin Menu Page
87
  *
88
  */
89
  public function new_admin_page(){
118
  }
119
 
120
 
121
+ /**
122
+ * Content of the Menu Page
123
  *
124
  Define page S t r u c t u r e, nav T A B s , set N O N C E: wpbc_ajax_admin_nonce field
125
 
136
 
137
 
138
 
139
+ /**
140
+ * Hack for changing Root 2nd Submenu Title
141
  *
142
  * @global type $submenu
143
  */
155
  }
156
 
157
 
158
+ /**
159
+ * Add Menu
160
  *
161
  * @param type $menu_page_title
162
  * @param type $menu_title
207
  }
208
 
209
 
210
+ /**
211
+ * Add Sub Menu
212
  *
213
  * @param type $parent_menu_slug - The slug name for the parent menu (or the file name of a standard WordPress admin page)
214
  * @param type $menu_page_title
core/any/class-admin-page-structure.php CHANGED
@@ -44,7 +44,8 @@ abstract class WPBC_Page_Structure {
44
  // Abstract Methods
45
  ////////////////////////////////////////////////////////////////////////////
46
 
47
- /** Define slug in what menu to show this page. // Parameter relative: $_GET['page'].
 
48
  *
49
  * @return string
50
  *
@@ -55,7 +56,8 @@ abstract class WPBC_Page_Structure {
55
  */
56
  abstract public function in_page();
57
 
58
- /** Define Tabs and Subtabs of this Admin Page
 
59
  *
60
  * @return array();
61
 
@@ -140,7 +142,8 @@ abstract class WPBC_Page_Structure {
140
  */
141
  abstract public function tabs();
142
 
143
- /** Show Content of this page - Main function.
 
144
  *
145
  * In top of this function have to be checking ubout Update (saving POST request).
146
  *
@@ -168,7 +171,8 @@ abstract class WPBC_Page_Structure {
168
  // C O N T E N T
169
  ////////////////////////////////////////////////////////////////////////////
170
 
171
- /** General Page Structure
 
172
  *
173
  * @param string $page_tag - its the same that return $this->in_page()
174
  */
@@ -231,7 +235,8 @@ abstract class WPBC_Page_Structure {
231
  // Active Page Parameters
232
  ////////////////////////////////////////////////////////////////////////////
233
 
234
- /** Check if this page selected (active), depend from the GET parameter
 
235
  * If selected, then define Current Page Parameters.
236
  *
237
  * @return boolean
@@ -297,7 +302,8 @@ abstract class WPBC_Page_Structure {
297
  }
298
 
299
 
300
- /** Define parameters for current selected page
 
301
  *
302
  * @param type $paramas
303
  */
@@ -310,7 +316,8 @@ abstract class WPBC_Page_Structure {
310
  }
311
 
312
 
313
- /** Get Header Title (H1) of this selected page
 
314
  * Firstly check in subtabs, otherwise get from tabs and if not exist then
315
  *
316
  * @return string
@@ -330,7 +337,8 @@ abstract class WPBC_Page_Structure {
330
  }
331
 
332
 
333
- /** Get all SubTabs of current opened page Tab
 
334
  *
335
  * @param string $menu_in_page_tag - Optional. Menu Tag, the same as $this->in_page();
336
  * @return array
@@ -353,7 +361,8 @@ abstract class WPBC_Page_Structure {
353
 
354
  // Define ------------------------------------------------------------------
355
 
356
- /** Define TABS structure.
 
357
  * General structure of tabs for every plugin menu page.
358
  */
359
  public function wpbc_define_nav_tabs() { // Function executed after creation menu in class WPBC_Admin_Menus
@@ -469,7 +478,8 @@ abstract class WPBC_Page_Structure {
469
  }
470
  }
471
 
472
- /** Get array of visible TABs
 
473
  * Tabs that do not hided or disbaled
474
  *
475
  * @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page();
@@ -541,7 +551,8 @@ abstract class WPBC_Page_Structure {
541
  }
542
 
543
 
544
- /** Show Top nav TABs line
 
545
  *
546
  * @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page();
547
  */
@@ -580,7 +591,8 @@ abstract class WPBC_Page_Structure {
580
  }
581
 
582
 
583
- /** Show Sub Menu Lines at the Settings page for Active Tab
 
584
  *
585
  * @param array $bottom_tabs
586
  * @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page();
@@ -644,7 +656,8 @@ abstract class WPBC_Page_Structure {
644
  // Support
645
  ////////////////////////////////////////////////////////////////////////////
646
 
647
- /** Get URL of settings page, based on Page Slug and Tab Slug
 
648
  *
649
  * @param string $page_tag
650
  * @param string $tab_name
44
  // Abstract Methods
45
  ////////////////////////////////////////////////////////////////////////////
46
 
47
+ /**
48
+ * Define slug in what menu to show this page. // Parameter relative: $_GET['page'].
49
  *
50
  * @return string
51
  *
56
  */
57
  abstract public function in_page();
58
 
59
+ /**
60
+ * Define Tabs and Subtabs of this Admin Page
61
  *
62
  * @return array();
63
 
142
  */
143
  abstract public function tabs();
144
 
145
+ /**
146
+ * Show Content of this page - Main function.
147
  *
148
  * In top of this function have to be checking ubout Update (saving POST request).
149
  *
171
  // C O N T E N T
172
  ////////////////////////////////////////////////////////////////////////////
173
 
174
+ /**
175
+ * General Page Structure
176
  *
177
  * @param string $page_tag - its the same that return $this->in_page()
178
  */
235
  // Active Page Parameters
236
  ////////////////////////////////////////////////////////////////////////////
237
 
238
+ /**
239
+ * Check if this page selected (active), depend from the GET parameter
240
  * If selected, then define Current Page Parameters.
241
  *
242
  * @return boolean
302
  }
303
 
304
 
305
+ /**
306
+ * Define parameters for current selected page
307
  *
308
  * @param type $paramas
309
  */
316
  }
317
 
318
 
319
+ /**
320
+ * Get Header Title (H1) of this selected page
321
  * Firstly check in subtabs, otherwise get from tabs and if not exist then
322
  *
323
  * @return string
337
  }
338
 
339
 
340
+ /**
341
+ * Get all SubTabs of current opened page Tab
342
  *
343
  * @param string $menu_in_page_tag - Optional. Menu Tag, the same as $this->in_page();
344
  * @return array
361
 
362
  // Define ------------------------------------------------------------------
363
 
364
+ /**
365
+ * Define TABS structure.
366
  * General structure of tabs for every plugin menu page.
367
  */
368
  public function wpbc_define_nav_tabs() { // Function executed after creation menu in class WPBC_Admin_Menus
478
  }
479
  }
480
 
481
+ /**
482
+ * Get array of visible TABs
483
  * Tabs that do not hided or disbaled
484
  *
485
  * @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page();
551
  }
552
 
553
 
554
+ /**
555
+ * Show Top nav TABs line
556
  *
557
  * @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page();
558
  */
591
  }
592
 
593
 
594
+ /**
595
+ * Show Sub Menu Lines at the Settings page for Active Tab
596
  *
597
  * @param array $bottom_tabs
598
  * @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page();
656
  // Support
657
  ////////////////////////////////////////////////////////////////////////////
658
 
659
+ /**
660
+ * Get URL of settings page, based on Page Slug and Tab Slug
661
  *
662
  * @param string $page_tag
663
  * @param string $tab_name
core/any/class-admin-settings-api.php CHANGED
@@ -50,7 +50,8 @@ abstract class WPBC_Settings_API {
50
  public $validated_fields = array();
51
 
52
 
53
- /** If setted, then we can validate all form fields, BEFORE post.
 
54
  * Each form field that we need to validate have to have parameter: "validate_as" which ia array, like array('required')
55
  * HTML fields elements will have additional CSS classes, like "validate-required"
56
  * If this $validated_form_id empty so then no validation procedure.
@@ -102,7 +103,8 @@ abstract class WPBC_Settings_API {
102
  }
103
 
104
 
105
- /** Validate Form Fields before $_POST request
 
106
  *
107
  * @param string $page_tag
108
  */
@@ -163,7 +165,8 @@ abstract class WPBC_Settings_API {
163
  // Functions
164
  ////////////////////////////////////////////////////////////////////////////
165
 
166
- /** Get array of Default fields Names and Values.
 
167
  * Example:
168
  * $default_values = array(
169
  * 'my_date_format' => get_option('date_format')
@@ -188,7 +191,8 @@ abstract class WPBC_Settings_API {
188
  }
189
 
190
 
191
- /** Define "Default Values" for all exist settings Fields.
 
192
  *
193
  * @param array $fields_values - Optional. Field values
194
  */
@@ -216,7 +220,8 @@ abstract class WPBC_Settings_API {
216
 
217
 
218
 
219
- /** Set Values to Fiels
 
220
  * Assign $this->fields_values to $fields[ 'some_field' ]['value']
221
  */
222
  public function set_values_to_fields() {
@@ -256,7 +261,8 @@ abstract class WPBC_Settings_API {
256
 
257
 
258
 
259
- /** Set Value to specfic Field
 
260
  * @param string $field_name
261
  * @return mixed or false, if field does not exist
262
  *
@@ -1323,7 +1329,8 @@ abstract class WPBC_Settings_API {
1323
  }
1324
 
1325
 
1326
- /** Get Description
 
1327
  *
1328
  * @param array $field
1329
  * @param string $html_tag - HTML element, which will be used as separator. Default - 'p'
50
  public $validated_fields = array();
51
 
52
 
53
+ /**
54
+ * If setted, then we can validate all form fields, BEFORE post.
55
  * Each form field that we need to validate have to have parameter: "validate_as" which ia array, like array('required')
56
  * HTML fields elements will have additional CSS classes, like "validate-required"
57
  * If this $validated_form_id empty so then no validation procedure.
103
  }
104
 
105
 
106
+ /**
107
+ * Validate Form Fields before $_POST request
108
  *
109
  * @param string $page_tag
110
  */
165
  // Functions
166
  ////////////////////////////////////////////////////////////////////////////
167
 
168
+ /**
169
+ * Get array of Default fields Names and Values.
170
  * Example:
171
  * $default_values = array(
172
  * 'my_date_format' => get_option('date_format')
191
  }
192
 
193
 
194
+ /**
195
+ * Define "Default Values" for all exist settings Fields.
196
  *
197
  * @param array $fields_values - Optional. Field values
198
  */
220
 
221
 
222
 
223
+ /**
224
+ * Set Values to Fiels
225
  * Assign $this->fields_values to $fields[ 'some_field' ]['value']
226
  */
227
  public function set_values_to_fields() {
261
 
262
 
263
 
264
+ /**
265
+ * Set Value to specfic Field
266
  * @param string $field_name
267
  * @return mixed or false, if field does not exist
268
  *
1329
  }
1330
 
1331
 
1332
+ /**
1333
+ * Get Description
1334
  *
1335
  * @param array $field
1336
  * @param string $html_tag - HTML element, which will be used as separator. Default - 'p'
core/any/class-css-js.php CHANGED
@@ -39,14 +39,16 @@ abstract class WPBC_JS_CSS {
39
  /** Define all Scripts or Styles here */
40
  abstract public function define();
41
 
42
- /** Enqueue Scripts or Styles.
 
43
  *
44
  * @param type $where_to_load - can be "admin" or "client"
45
  */
46
  abstract public function enqueue( $where_to_load );
47
 
48
 
49
- /** Deregister some Conflict scripts from other plugins.
 
50
  *
51
  * @param type $where_to_load - can be "admin" or "client"
52
  */
39
  /** Define all Scripts or Styles here */
40
  abstract public function define();
41
 
42
+ /**
43
+ * Enqueue Scripts or Styles.
44
  *
45
  * @param type $where_to_load - can be "admin" or "client"
46
  */
47
  abstract public function enqueue( $where_to_load );
48
 
49
 
50
+ /**
51
+ * Deregister some Conflict scripts from other plugins.
52
  *
53
  * @param type $where_to_load - can be "admin" or "client"
54
  */
core/any/css/admin-listing-table.css CHANGED
@@ -289,7 +289,7 @@
289
  }
290
  .wpbc-listing-collumn.field-action-buttons .cost-fields-group.control-group .btn-toolbar .input-group > input[type="text"].field-booking-cost {
291
  display: inline-block;
292
- margin: 0 5px 5px 0;
293
  width: 75px;
294
  font-weight: 600;
295
  border-radius: 2px;
289
  }
290
  .wpbc-listing-collumn.field-action-buttons .cost-fields-group.control-group .btn-toolbar .input-group > input[type="text"].field-booking-cost {
291
  display: inline-block;
292
+ margin: 0 5px 5px 0 !important;
293
  width: 75px;
294
  font-weight: 600;
295
  border-radius: 2px;
core/any/js/admin-support.js CHANGED
@@ -12,7 +12,8 @@
12
  */
13
 
14
 
15
- /** Scroll to specific HTML element
 
16
  *
17
  * @param {type} object_name
18
  * @returns {undefined}
@@ -68,7 +69,8 @@ function wpbc_field_highlight( object_name ) {
68
  }
69
  }
70
 
71
- /** Show Yes/No dialog
 
72
  *
73
  * @param {type} message_question
74
  * @returns {Boolean}
@@ -95,12 +97,13 @@ function wpbc_admin_show_message_processing( message_type ){
95
  if ( message == 'undefined' )
96
  message = 'Processing'
97
 
98
- message = ' <span class="wpdevelop"><span class="glyphicon glyphicon-refresh wpbc_spin wpbc_ajax_icon" aria-hidden="true"></span></span> ' + message + '...';
99
 
100
  wpbc_admin_show_message( message, 'info', 10000 );
101
  }
102
 
103
- /** Show Alert Messages
 
104
  *
105
  * @param {string} message
106
  * @param {string} m_type - notice (default) | error | warning | info | success
@@ -127,16 +130,19 @@ function wpbc_admin_show_message( message, m_type, m_delay, is_append ){
127
  var unique_div_id = new Date();
128
  unique_div_id = 'wpbc_notice_' + unique_div_id.getTime();
129
 
130
- if ( is_append )
131
- jQuery('#ajax_working').append(
132
- '<div id="' + unique_div_id + '"><div id="wpbc_alert_message" class="wpbc_alert_message">' +
133
- '<div class="wpbc_inner_message '+alert_class+'"> ' +
134
- '<a class="close" href="javascript:void(0)" onclick="javascript:jQuery(this).parent().hide();">&times;</a> ' +
135
- message +
136
- '</div>' +
137
- '</div></div>'
138
- );
139
- else
 
 
 
140
  jQuery('#ajax_working').html(
141
  '<div id="' + unique_div_id + '"><div id="wpbc_alert_message" class="wpbc_alert_message">' +
142
  '<div class="wpbc_inner_message '+alert_class+'"> ' +
@@ -247,7 +253,8 @@ function wpbc_set_checkbox_in_table( el_stutus, el_class ){
247
  });
248
  }( jQuery ) );
249
 
250
- /** Ajax Request
 
251
  *
252
  * @param {type} us_id
253
  * @param {type} window_id
@@ -286,7 +293,8 @@ function wpbc_verify_window_opening( us_id, window_id ){
286
 
287
 
288
 
289
- /** Ajax Request - Saving Custom Data for User
 
290
  *
291
  * @param {int} us_id
292
  * @param {string} data_name
@@ -477,7 +485,7 @@ function wpbc_submit_client_form( submit_form, wpdev_active_locale ){
477
  * @param {type} message_type "" | "alert-warning" | "alert-success" | "alert-info" | "alert-danger"
478
  */
479
  function wpbc_show_message_under_element( element , errorMessage , message_type) {
480
-
481
  wpbc_scroll_to( element );
482
 
483
  if ( jQuery( element ).attr('type') == "radio" ) {
@@ -678,7 +686,8 @@ function wpbc_reset_wp_editor_content( editor_textarea_id, editor_textarea_conte
678
  }
679
  }
680
 
681
- /** Dismiss window / panel in Welcome Page
 
682
  *
683
  * @param {type} us_id
684
  * @param {type} window_id
12
  */
13
 
14
 
15
+ /**
16
+ * Scroll to specific HTML element
17
  *
18
  * @param {type} object_name
19
  * @returns {undefined}
69
  }
70
  }
71
 
72
+ /**
73
+ * Show Yes/No dialog
74
  *
75
  * @param {type} message_question
76
  * @returns {Boolean}
97
  if ( message == 'undefined' )
98
  message = 'Processing'
99
 
100
+ message = ' <span class="wpdevelop"><span class="glyphicon glyphicon-refresh wpbc_spin wpbc_ajax_icon wpbc_processing" aria-hidden="true"></span></span> ' + message + '...';
101
 
102
  wpbc_admin_show_message( message, 'info', 10000 );
103
  }
104
 
105
+ /**
106
+ * Show Alert Messages
107
  *
108
  * @param {string} message
109
  * @param {string} m_type - notice (default) | error | warning | info | success
130
  var unique_div_id = new Date();
131
  unique_div_id = 'wpbc_notice_' + unique_div_id.getTime();
132
 
133
+ if ( is_append ){
134
+
135
+ jQuery( '#ajax_working .wpbc_processing' ).parent().parent().parent().hide();
136
+
137
+ jQuery( '#ajax_working' ).append(
138
+ '<div id="' + unique_div_id + '"><div id="wpbc_alert_message" class="wpbc_alert_message">' +
139
+ '<div class="wpbc_inner_message ' + alert_class + '"> ' +
140
+ '<a class="close" href="javascript:void(0)" onclick="javascript:jQuery(this).parent().hide();">&times;</a> ' +
141
+ message +
142
+ '</div>' +
143
+ '</div></div>'
144
+ );
145
+ } else
146
  jQuery('#ajax_working').html(
147
  '<div id="' + unique_div_id + '"><div id="wpbc_alert_message" class="wpbc_alert_message">' +
148
  '<div class="wpbc_inner_message '+alert_class+'"> ' +
253
  });
254
  }( jQuery ) );
255
 
256
+ /**
257
+ * Ajax Request
258
  *
259
  * @param {type} us_id
260
  * @param {type} window_id
293
 
294
 
295
 
296
+ /**
297
+ * Ajax Request - Saving Custom Data for User
298
  *
299
  * @param {int} us_id
300
  * @param {string} data_name
485
  * @param {type} message_type "" | "alert-warning" | "alert-success" | "alert-info" | "alert-danger"
486
  */
487
  function wpbc_show_message_under_element( element , errorMessage , message_type) {
488
+
489
  wpbc_scroll_to( element );
490
 
491
  if ( jQuery( element ).attr('type') == "radio" ) {
686
  }
687
  }
688
 
689
+ /**
690
+ * Dismiss window / panel in Welcome Page
691
  *
692
  * @param {type} us_id
693
  * @param {type} window_id
core/class/wpbc-class-welcome.php CHANGED
@@ -14,14 +14,16 @@ class WPBC_Welcome {
14
 
15
  public $minimum_capability = 'read'; //'manage_options';
16
 
17
- private $asset_path = 'http://wpbookingcalendar.com/assets/';
18
- //private $asset_path = 'http://beta/assets/';
19
 
20
 
21
  public function __construct() {
22
  add_action( 'admin_menu', array( $this, 'admin_menus' ) );
23
  add_action( 'admin_head', array( $this, 'admin_head' ) );
24
  add_action( 'admin_init', array( $this, 'welcome' ) );
 
 
25
  }
26
 
27
 
@@ -375,8 +377,103 @@ class WPBC_Welcome {
375
  </table>
376
  <?php
377
 
378
- $this->maintence_section();
379
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////
381
  // 8.0
382
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1279,7 +1376,7 @@ class WPBC_Welcome {
1279
  )
1280
  , array(
1281
  'text' => '<strong>' . sprintf( 'Need even more functionality?' ) . '</strong>'
1282
- . '<p>' . sprintf( ' Check %shigher versions%s of Booking Calendar', '<a href="http://wpbookingcalendar.com/features/" target="_blank">', '</a>' ) . '</p>'
1283
 
1284
  )
1285
 
@@ -1412,7 +1509,7 @@ at the popup configuration dialog, during inserting booking shortcode into post
1412
 
1413
  $this->show_separator();
1414
 
1415
- echo wpbc_recheck_strong_symbols( '<div style="font-size: 0.95em;font-style:italic;text-align:right;margin:5px 0 10px;">Check many other nice features in Booking Calendar Personal version at <a target="_blank" href="http://wpbookingcalendar.com/features/">features list</a> and test <a target="_blank" href="http://wpbookingcalendar.com/demo/">live demo</a>.</div>' );
1416
 
1417
  ?><div class="clear" style="height:30px;"></div><?php
1418
 
@@ -1521,7 +1618,7 @@ at the popup configuration dialog, during inserting booking shortcode into post
1521
 
1522
  $this->show_separator();
1523
 
1524
- echo wpbc_recheck_strong_symbols( '<div style="font-size: 0.95em;font-style:italic;text-align:right;margin:5px 0 10px;">Check many other nice features in Booking Calendar Business Small version at <a target="_blank" href="http://wpbookingcalendar.com/features/">features list</a> and test <a target="_blank" href="http://wpbookingcalendar.com/demo/">live demo</a>.</div>' );
1525
 
1526
  ?><div class="clear" style="height:30px;"></div><?php
1527
 
@@ -1652,7 +1749,7 @@ at the popup configuration dialog, during inserting booking shortcode into post
1652
 
1653
  $this->show_separator();
1654
 
1655
- echo wpbc_recheck_strong_symbols( '<div style="font-size: 0.95em;font-style:italic;text-align:right;margin:5px 0 10px;">Check many other nice features in Booking Calendar Business Medium version at <a target="_blank" href="http://wpbookingcalendar.com/features/">features list</a> and test <a target="_blank" href="http://wpbookingcalendar.com/demo/">live demo</a>.</div>' );
1656
 
1657
  ?><div class="clear" style="height:30px;"></div><?php
1658
 
@@ -1730,7 +1827,7 @@ at the popup configuration dialog, during inserting booking shortcode into post
1730
 
1731
  $this->show_separator();
1732
 
1733
- echo wpbc_recheck_strong_symbols( '<div style="font-size: 0.95em;font-style:italic;text-align:right;margin:5px 0 10px;">Check many other nice features in Booking Calendar Business Large version at <a target="_blank" href="http://wpbookingcalendar.com/features/">features list</a> and test <a target="_blank" href="http://wpbookingcalendar.com/demo/">live demo</a>.</div>' );
1734
 
1735
  ?><div class="clear" style="height:30px;"></div><?php
1736
 
14
 
15
  public $minimum_capability = 'read'; //'manage_options';
16
 
17
+ private $asset_path = 'http://wpbookingcalendar.com/assets/';
18
+ //private $asset_path = 'http://beta/assets/';
19
 
20
 
21
  public function __construct() {
22
  add_action( 'admin_menu', array( $this, 'admin_menus' ) );
23
  add_action( 'admin_head', array( $this, 'admin_head' ) );
24
  add_action( 'admin_init', array( $this, 'welcome' ) );
25
+
26
+ add_action( 'wpbc_premium_content_overview', array( $this, 'content_premium' ) );
27
  }
28
 
29
 
377
  </table>
378
  <?php
379
 
380
+ $this->maintence_section();
381
+
382
+
383
+
384
+
385
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
386
+ // 8.1
387
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////
388
+ ?>
389
+ <h2 style='font-size: 2.1em;'>What's New in Booking Calendar <span style="font-size: 1.1em;
390
+ font-weight: 600;font-family: Consolas,Monaco,monospace;padding-left: 10px;color: #5F5F5F;">8.1</span></h2><?php
391
+ $this->show_separator();
392
+
393
+ $this->show_col_section( array(
394
+
395
+ array( 'h4' => wpbc_recheck_strong_symbols( 'Different structures of booking forms' ),
396
+ 'text' => wpbc_recheck_strong_symbols( '<ul style="list-style: none;padding: 5px;margin:0;">'
397
+ . '<li>' . 'Ability to define different structures of booking forms at Booking > Settings > Form page' . '</li>'
398
+ . '<li style="list-style: disc inside;">' . '**Vertical** - form under calendar' . '</li>'
399
+ . '<li style="list-style: disc inside;">' . '**Side by side** - form at right side of calendar' . '</li>'
400
+ . '<li style="list-style: disc inside;">' . '**Centered** - form and calendar are centered' . '</li>'
401
+ . '<li style="list-style: disc inside;">' . '**Dark** - form for dark background' . '</li>'
402
+ . '</ul>' )
403
+
404
+ . '<span style="font-size:0.85em;">' .wpbc_recheck_strong_symbols( 'Available in Booking Calendar **Free** version' ) . '</span>'
405
+
406
+ )
407
+ , array( 'img' => '8.1/booking-form-structure-2.png', 'img_style'=>'margin-top:20px;width: 85%;' )
408
+ )
409
+ );
410
+
411
+ $this->show_separator();
412
+
413
+ $this->show_col_section( array(
414
+
415
+ array( 'img' => '8.1/booking-calendar-stripe-gateway-2.png', 'img_style'=>'margin-top:20px;width: 85%;' )
416
+
417
+ , array( 'h4' => wpbc_recheck_strong_symbols( '**Stripe** payment system integration' ),
418
+ 'text' => wpbc_recheck_strong_symbols( '<ul style="list-style: none;padding: 5px;margin:0;">'
419
+ . '<li>' . 'Integration with **<a target="_blank" href="https://stripe.com/">Stripe</a>** payment gateway.' . '</li>'
420
+ . '<li>' . 'Showing on screen (same page) payment form, with ability to pay by cards.' . '</li>'
421
+ . '<li>' . 'Ability to auto approve or auto decline booking, after successful or failed payment.' . '</li>'
422
+ . '</ul>' )
423
+
424
+ . '<span style="font-size:0.85em;">' .wpbc_recheck_strong_symbols( 'Available in **Business Small / Business Medium / Business Large / MultiUser** versions' ) . '</span>'
425
+
426
+ )
427
+ )
428
+ );
429
+
430
+ $this->show_separator();
431
+
432
+
433
+ $this->show_col_section( array(
434
+ array( 'text' =>
435
+ '<h4>' .wpbc_recheck_strong_symbols( 'New' ) . '</h4>'
436
+ . '<ul style="list-style: disc outside;padding: 20px;margin:0;">'
437
+ . '<li>' . wpbc_recheck_strong_symbols( '**New** Ability to insert modification/creation date or (Year, month, day, hours, minutes or seconds) of booking into email templates or in payment summary' ) . '</li>'
438
+ . '<li>' . wpbc_recheck_strong_symbols( '**New.** Shortcode for showing check out date plus one additional day: <code>[check_out_plus1day_hint]</code> at Booking > Settings > Form page. (8.0.2.12) *(Business Medium/Large, MultiUser)*' ) . '</li>'
439
+ . '</ul>'
440
+ . '<h4>' .wpbc_recheck_strong_symbols( 'Translation' ) . '</h4>'
441
+ . '<ul style="list-style: disc outside;padding: 20px;margin:0;">'
442
+ . '<li>' . wpbc_recheck_strong_symbols( '**Translation** Spanish translation [100% completed] by Martin Romero' ) . '</li>'
443
+ . '<li>' . wpbc_recheck_strong_symbols( '**Translation** Galician (Spanish) translation [100% completed] by Martin Romero' ) . '</li>'
444
+ . '</ul>'
445
+
446
+ . '<h4>' .wpbc_recheck_strong_symbols( 'Improvement' ) . '</h4>'
447
+ . '<ul style="list-style: disc outside;padding: 20px;margin:0;">'
448
+ . '<li>' . wpbc_recheck_strong_symbols( '**Improvement** Improve admin UI styles in Chrome browser, by setting more sleek view of UI elements (8.0.2.4/5)' ) . '</li>'
449
+ . '<li>' . wpbc_recheck_strong_symbols( '**Improvement** Do not export to .ics feed bookings, that inside of Trash folder (8.0.2.7)' ) . '</li>'
450
+ . '</ul>'
451
+ )
452
+ , array( 'text' =>
453
+
454
+ '<h4>' .wpbc_recheck_strong_symbols( 'Fixes' ) . '</h4>'
455
+ . '<ul style="list-style: disc outside;padding: 20px;margin:0;">'
456
+
457
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** showing booking listing correctly for "next 1 month" without bookings, that include past ("yesterday day") bookings (8.0.1.1)' ) . '</li>'
458
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** force to load jquery-migrate in case, if we do not know the version of jQuery which was loaded. (8.0.1.2)' ) . '</li>'
459
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** issue of showing warning "parsererror ~ SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" during import process, when some bookings already was imported (8.0.2.1)' ) . '</li>'
460
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** add support of Apache 2.4 directives relative captcha saving.' ) . '</li>'
461
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** issue of showing warning: "Email different from website DNS, its can be a reason of not delivery emails" at Booking > Settings > Emails page, in case if website DNS starting with "www." ot some other sub-domain. (8.0.2.9)' ) . '</li>'
462
+
463
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** showing correctly change-over days (triangles), when inserted only "availability calendar", without booking form (8.0.1.2) *(Business Small/Medium/Large, MultiUser)*' ) . '</li>'
464
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** ability to use symbol **/** in placeholders in booking form fields shortcodes at Settings Form page (8.0.1.13) *(Personal Business Small/Medium/Large, MultiUser)*' ) . '</li>'
465
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** correctly showing single and double quotes (\' and ") symbols in textarea during editing booking (8.0.1.3) *(Personal Business Small/Medium/Large, MultiUser)*' ) . '</li>'
466
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** issue of not saving changes during editing, if you try to search some booking resource (or other item), and this booking resource was not at the 1st page (during usual listing) (8.0.1.12) *(Personal Business Small/Medium/Large, MultiUser)*' ) . '</li>'
467
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** issue of incorrect cost calculation, during editing booking, when selected days from 1 to 9 and used some rates. Issue relative of not using leading 0 in textarea. (8.0.2.2) *(Business Medium/Large, MultiUser)*' ) . '</li>'
468
+ . '<li>' . wpbc_recheck_strong_symbols( '**Fix** issue of showing coupon discount description, does not depend from uppercase or lowercase of entered coupon code (8.0.2.7) *(Business Large, MultiUser)*' ) . '</li>'
469
+ . '</ul>'
470
+ )
471
+ )
472
+ );
473
+ $this->show_separator();
474
+
475
+
476
+ //--
477
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////
478
  // 8.0
479
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////
1376
  )
1377
  , array(
1378
  'text' => '<strong>' . sprintf( 'Need even more functionality?' ) . '</strong>'
1379
+ . '<p>' . sprintf( ' Check %shigher versions%s of Booking Calendar', '<a href="http://wpbookingcalendar.com/overview/" target="_blank">', '</a>' ) . '</p>'
1380
 
1381
  )
1382
 
1509
 
1510
  $this->show_separator();
1511
 
1512
+ echo wpbc_recheck_strong_symbols( '<div style="font-size: 0.95em;font-style:italic;text-align:right;margin:5px 0 10px;">Check many other nice features in Booking Calendar Personal version at <a target="_blank" href="http://wpbookingcalendar.com/overview/">features list</a> and test <a target="_blank" href="http://wpbookingcalendar.com/demo/">live demo</a>.</div>' );
1513
 
1514
  ?><div class="clear" style="height:30px;"></div><?php
1515
 
1618
 
1619
  $this->show_separator();
1620
 
1621
+ echo wpbc_recheck_strong_symbols( '<div style="font-size: 0.95em;font-style:italic;text-align:right;margin:5px 0 10px;">Check many other nice features in Booking Calendar Business Small version at <a target="_blank" href="http://wpbookingcalendar.com/overview/">features list</a> and test <a target="_blank" href="http://wpbookingcalendar.com/demo/">live demo</a>.</div>' );
1622
 
1623
  ?><div class="clear" style="height:30px;"></div><?php
1624
 
1749
 
1750
  $this->show_separator();
1751
 
1752
+ echo wpbc_recheck_strong_symbols( '<div style="font-size: 0.95em;font-style:italic;text-align:right;margin:5px 0 10px;">Check many other nice features in Booking Calendar Business Medium version at <a target="_blank" href="http://wpbookingcalendar.com/overview/">features list</a> and test <a target="_blank" href="http://wpbookingcalendar.com/demo/">live demo</a>.</div>' );
1753
 
1754
  ?><div class="clear" style="height:30px;"></div><?php
1755
 
1827
 
1828
  $this->show_separator();
1829
 
1830
+ echo wpbc_recheck_strong_symbols( '<div style="font-size: 0.95em;font-style:italic;text-align:right;margin:5px 0 10px;">Check many other nice features in Booking Calendar Business Large version at <a target="_blank" href="http://wpbookingcalendar.com/overview/">features list</a> and test <a target="_blank" href="http://wpbookingcalendar.com/demo/">live demo</a>.</div>' );
1831
 
1832
  ?><div class="clear" style="height:30px;"></div><?php
1833
 
core/lib/wpbc-booking-new.php CHANGED
@@ -415,7 +415,8 @@ make_bk_action('wpbc_add_new_booking' , array(
415
 
416
 
417
 
418
- /** Check if dates intersect with other dates array
 
419
  *
420
  * @param array $dates_for_check - Dates Array of specific booking, which we checking - date in SQL format: '2014-11-21 10:00:01'
421
  * @param array $dates_exist - Other dates from booking resource(s), that already exist - date in SQL format: '2014-11-21 15:00:02'
415
 
416
 
417
 
418
+ /**
419
+ * Check if dates intersect with other dates array
420
  *
421
  * @param array $dates_for_check - Dates Array of specific booking, which we checking - date in SQL format: '2014-11-21 10:00:01'
422
  * @param array $dates_exist - Other dates from booking resource(s), that already exist - date in SQL format: '2014-11-21 15:00:02'
core/lib/wpdev-booking-class.php CHANGED
@@ -12,50 +12,45 @@ class wpdev_booking {
12
 
13
  function __construct() {
14
 
15
- $this->popover_front_end_js_is_writed = false;
16
-
17
-
18
-
19
-
20
- $this->captcha_instance = new wpdevReallySimpleCaptcha();
21
-
22
-
23
-
24
- if ( class_exists('wpdev_bk_personal')) $this->wpdev_bk_personal = new wpdev_bk_personal();
25
- else $this->wpdev_bk_personal = false;
26
-
27
-
28
- // Set loading translation
29
- add_action('plugins_loaded', 'wpbc_load_translation',1000);
30
-
31
- // Check content according language shortcodes
32
- add_bk_filter('wpdev_check_for_active_language', 'wpdev_check_for_active_language');
33
-
34
-
35
- // User defined - hooks
36
- add_action('wpdev_bk_add_calendar', array(&$this, 'add_calendar_action') ,10 , 2);
37
- add_action('wpdev_bk_add_form', array(&$this, 'add_booking_form_action') ,10 , 2);
38
- add_bk_action('wpdevbk_add_form', array(&$this, 'add_booking_form_action'));
39
- add_filter('wpdev_bk_get_form', array(&$this, 'get_booking_form_action') ,10 , 2);
40
- add_bk_filter('wpdevbk_get_booking_form', array(&$this, 'get_booking_form_action'));
41
- add_filter('wpdev_bk_get_showing_date_format', array(&$this,'get_showing_date_format') ,10 , 1);
42
-
43
-
44
- // Get script for calendar activation
45
- add_bk_filter('get_script_for_calendar', array(&$this, 'get_script_for_calendar'));
46
- add_bk_filter('pre_get_calendar_html', array(&$this, 'pre_get_calendar_html'));
47
-
48
- // S H O R T C O D E s - Booking
49
- add_shortcode('booking', array(&$this, 'booking_shortcode'));
50
- add_shortcode('bookingcalendar', array(&$this, 'booking_calendar_only_shortcode'));
51
- add_shortcode('bookingform', array(&$this, 'bookingform_shortcode'));
52
- add_shortcode('bookingedit', array(&$this, 'bookingedit_shortcode'));
53
- add_shortcode('bookingsearch', array(&$this, 'bookingsearch_shortcode'));
54
- add_shortcode('bookingsearchresults', array(&$this, 'bookingsearchresults_shortcode'));
55
- add_shortcode('bookingselect', array(&$this, 'bookingselect_shortcode'));
56
- add_shortcode('bookingresource', array(&$this, 'bookingresource_shortcode'));
57
- add_shortcode('bookingtimeline', array(&$this, 'bookingtimeline_shortcode'));
58
-
59
  }
60
  // </editor-fold>
61
 
@@ -109,7 +104,7 @@ class wpdev_booking {
109
  if (!empty($bkt)) { $additional_bk_types_1[] = $bkt; }
110
  }
111
  $additional_bk_types =$additional_bk_types_1;*/
112
- //return array(array(),array());
113
  // if ( ! defined('WP_ADMIN') ) if ($approved == 0) return array(array(),array());
114
  //debuge($bk_type, $additional_bk_types );
115
  make_bk_action('check_pending_not_paid_auto_cancell_bookings', $bk_type );
@@ -120,7 +115,7 @@ class wpdev_booking {
120
 
121
  $bk_type_additional = explode( ',', $bk_type_additional );
122
  $bk_type_additional = array_unique( $bk_type_additional ); // Removes duplicate values from an array
123
- $bk_type_additional = array_filter( $bk_type_additional ); // all entries of array equal to FALSE (0, '', '0' ) will be removed.
124
  $bk_type_additional = implode( ',', $bk_type_additional );
125
 
126
  global $wpdb;
@@ -518,8 +513,9 @@ class wpdev_booking {
518
  function get_booking_form( $my_boook_type ) {
519
 
520
  $my_form = apply_bk_filter( 'wpbc_get_free_booking_form' , $my_boook_type );
 
521
  return $my_form;
522
-
523
  $booking_form_field_active1 = get_bk_option( 'booking_form_field_active1');
524
  $booking_form_field_required1 = get_bk_option( 'booking_form_field_required1');
525
  $booking_form_field_label1 = get_bk_option( 'booking_form_field_label1');
@@ -641,6 +637,7 @@ class wpdev_booking {
641
  // </div>';
642
 
643
  return $my_form;
 
644
  }
645
 
646
  // Get booking form
@@ -919,6 +916,17 @@ class wpdev_booking {
919
  if(bk_af_reg.test(bk_af_element.name) != false)
920
  if (bk_af_element.value == "" )
921
  bk_af_element.value = "'.str_replace("'",'',$curr_user->user_email).'";
 
 
 
 
 
 
 
 
 
 
 
922
  // URL
923
  bk_af_reg = /^([A-Za-z0-9_\-\.])*(URL|site|web|WEB){1}([A-Za-z0-9_\-\.])*$/;
924
  if(bk_af_reg.test(bk_af_element.name) != false)
@@ -941,7 +949,8 @@ class wpdev_booking {
941
  // S H O R T C O D E S
942
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
943
 
944
- /** TimeLine shortcode
 
945
  *
946
  * @param type $attr
947
  * @return type
@@ -1121,7 +1130,7 @@ class wpdev_booking {
1121
 
1122
 
1123
  $start_script_code = "<div id='calendar_booking_unselectable".$my_boook_type."'></div>";
1124
- return $start_script_code. $res ;
1125
  }
1126
 
1127
  // Show only booking form, with already selected dates
12
 
13
  function __construct() {
14
 
15
+ $this->popover_front_end_js_is_writed = false;
16
+
17
+ $this->captcha_instance = new wpdevReallySimpleCaptcha();
18
+
19
+
20
+ if ( class_exists( 'wpdev_bk_personal' ) ) {
21
+ $this->wpdev_bk_personal = new wpdev_bk_personal();
22
+ } else {
23
+ $this->wpdev_bk_personal = false;
24
+ }
25
+
26
+ // Set loading translation
27
+ add_action( 'plugins_loaded', 'wpbc_load_translation', 1000 );
28
+
29
+ // Check content according language shortcodes
30
+ add_bk_filter( 'wpdev_check_for_active_language', 'wpdev_check_for_active_language' );
31
+
32
+ // User defined - hooks
33
+ add_action( 'wpdev_bk_add_calendar', array( &$this, 'add_calendar_action' ), 10, 2 );
34
+ add_action( 'wpdev_bk_add_form', array( &$this, 'add_booking_form_action' ), 10, 2 );
35
+ add_bk_action( 'wpdevbk_add_form', array( &$this, 'add_booking_form_action' ) );
36
+ add_filter( 'wpdev_bk_get_form', array( &$this, 'get_booking_form_action' ), 10, 2 );
37
+ add_bk_filter( 'wpdevbk_get_booking_form', array( &$this, 'get_booking_form_action' ) );
38
+ add_filter( 'wpdev_bk_get_showing_date_format', array( &$this, 'get_showing_date_format' ), 10, 1 );
39
+
40
+ // Get script for calendar activation
41
+ add_bk_filter( 'get_script_for_calendar', array( &$this, 'get_script_for_calendar' ) );
42
+ add_bk_filter( 'pre_get_calendar_html', array( &$this, 'pre_get_calendar_html' ) );
43
+
44
+ // S H O R T C O D E s - Booking
45
+ add_shortcode( 'booking', array( &$this, 'booking_shortcode' ) );
46
+ add_shortcode( 'bookingcalendar', array( &$this, 'booking_calendar_only_shortcode' ) );
47
+ add_shortcode( 'bookingform', array( &$this, 'bookingform_shortcode' ) );
48
+ add_shortcode( 'bookingedit', array( &$this, 'bookingedit_shortcode' ) );
49
+ add_shortcode( 'bookingsearch', array( &$this, 'bookingsearch_shortcode' ) );
50
+ add_shortcode( 'bookingsearchresults', array( &$this, 'bookingsearchresults_shortcode' ) );
51
+ add_shortcode( 'bookingselect', array( &$this, 'bookingselect_shortcode' ) );
52
+ add_shortcode( 'bookingresource', array( &$this, 'bookingresource_shortcode' ) );
53
+ add_shortcode( 'bookingtimeline', array( &$this, 'bookingtimeline_shortcode' ) );
 
 
 
 
 
54
  }
55
  // </editor-fold>
56
 
104
  if (!empty($bkt)) { $additional_bk_types_1[] = $bkt; }
105
  }
106
  $additional_bk_types =$additional_bk_types_1;*/
107
+ //return array(array(),array());
108
  // if ( ! defined('WP_ADMIN') ) if ($approved == 0) return array(array(),array());
109
  //debuge($bk_type, $additional_bk_types );
110
  make_bk_action('check_pending_not_paid_auto_cancell_bookings', $bk_type );
115
 
116
  $bk_type_additional = explode( ',', $bk_type_additional );
117
  $bk_type_additional = array_unique( $bk_type_additional ); // Removes duplicate values from an array
118
+ $bk_type_additional = array_filter( $bk_type_additional ); // all entries of array equal to FALSE (0, '', '0' ) will be removed.
119
  $bk_type_additional = implode( ',', $bk_type_additional );
120
 
121
  global $wpdb;
513
  function get_booking_form( $my_boook_type ) {
514
 
515
  $my_form = apply_bk_filter( 'wpbc_get_free_booking_form' , $my_boook_type );
516
+
517
  return $my_form;
518
+ /*
519
  $booking_form_field_active1 = get_bk_option( 'booking_form_field_active1');
520
  $booking_form_field_required1 = get_bk_option( 'booking_form_field_required1');
521
  $booking_form_field_label1 = get_bk_option( 'booking_form_field_label1');
637
  // </div>';
638
 
639
  return $my_form;
640
+ */
641
  }
642
 
643
  // Get booking form
916
  if(bk_af_reg.test(bk_af_element.name) != false)
917
  if (bk_af_element.value == "" )
918
  bk_af_element.value = "'.str_replace("'",'',$curr_user->user_email).'";
919
+ // Phone
920
+ bk_af_reg = /^([A-Za-z0-9_\-\.])*(phone|fone){1}([A-Za-z0-9_\-\.])*$/;
921
+ if(bk_af_reg.test(bk_af_element.name) != false)
922
+ if (bk_af_element.value == "" )
923
+ bk_af_element.value = "'.str_replace("'",'',$curr_user->phone_number).'";
924
+ // NB Enfants
925
+ bk_af_reg = /^(e)?([_\-\.])?nb_enfant([0-9_\-\.])*$/;
926
+ if(bk_af_reg.test(bk_af_element.name) != false)
927
+ if (bk_af_element.value == "" )
928
+ bk_af_element.value = "'.str_replace("'",'',$curr_user->nb_enfant).'";
929
+
930
  // URL
931
  bk_af_reg = /^([A-Za-z0-9_\-\.])*(URL|site|web|WEB){1}([A-Za-z0-9_\-\.])*$/;
932
  if(bk_af_reg.test(bk_af_element.name) != false)
949
  // S H O R T C O D E S
950
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
951
 
952
+ /**
953
+ * TimeLine shortcode
954
  *
955
  * @param type $attr
956
  * @return type
1130
 
1131
 
1132
  $start_script_code = "<div id='calendar_booking_unselectable".$my_boook_type."'></div>";
1133
+ return "<div class='wpbc_only_calendar'>" . $start_script_code . $res . '</div>'; //FixIn: 8.0.1.2
1134
  }
1135
 
1136
  // Show only booking form, with already selected dates
core/lib/wpdev-booking-widget.php CHANGED
@@ -51,8 +51,10 @@ class BookingWidget extends WP_Widget {
51
  make_bk_action('wpdevbk_add_form', $booking_widget_type , $booking_widget_calendar_count, true, $my_booking_form_name );
52
 
53
  } else {
54
- echo "<div id='calendar_booking_unselectable" . $booking_widget_type . "'></div>"; //FixIn: 6.1.1.13
55
- do_action('wpdev_bk_add_calendar', $booking_widget_type , $booking_widget_calendar_count);
 
 
56
  }
57
 
58
  if ($booking_widget_last_field !== '') echo '<br/>' . htmlspecialchars_decode($booking_widget_last_field);
51
  make_bk_action('wpdevbk_add_form', $booking_widget_type , $booking_widget_calendar_count, true, $my_booking_form_name );
52
 
53
  } else {
54
+ echo "<div class='wpbc_only_calendar'>"; //FixIn: 8.0.1.2
55
+ echo "<div id='calendar_booking_unselectable" . $booking_widget_type . "'></div>"; //FixIn: 6.1.1.13
56
+ do_action( 'wpdev_bk_add_calendar', $booking_widget_type, $booking_widget_calendar_count );
57
+ echo '</div>';
58
  }
59
 
60
  if ($booking_widget_last_field !== '') echo '<br/>' . htmlspecialchars_decode($booking_widget_last_field);
core/wpbc-activation.php CHANGED
@@ -17,7 +17,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
17
  /** Activation & Deactivation of Booking Calendar */
18
  class WPBC_BookingInstall extends WPBC_Install {
19
 
20
- /** Overload Booking Calendar option names and some other parameters
 
21
  *
22
  * //FixIn: 7.0.1.12
23
  * Important! for correct loading of trasnaltions later, we must do not use here loacale of plugin. So here will be untranslated strings!!!
@@ -825,14 +826,14 @@ function wpbc_booking_deactivate() {
825
  add_bk_action( 'wpbc_deactivation', 'wpbc_booking_deactivate' );
826
 
827
 
828
-
829
- /** Default Options
830
- *
831
  * Exmaple of getting options for deleting in MU:
832
- *
833
- $option_name = '';
834
- $is_get_multiuser_general_options = true;
835
- $options_for_delete = wpbc_get_default_options( $option_name, $is_get_multiuser_general_options );
836
  */
837
  function wpbc_get_default_options( $option_name = '', $is_get_multiuser_general_options = false ) {
838
 
@@ -1056,10 +1057,16 @@ function wpbc_get_default_options( $option_name = '', $is_get_multiuser_general_
1056
  $mu_option4delete[]='booking_gcal_auto_import_is_active'; // Creation in wpbc-gcal.php file
1057
  $mu_option4delete[]='booking_gcal_auto_import_time';
1058
  $mu_option4delete[]='booking_cron'; // Creation in wpbc-cron.php
1059
-
 
 
 
 
 
1060
  ////////////////////////////////////////////////////////////////////////////
1061
  // PS
1062
  ////////////////////////////////////////////////////////////////////////////
 
1063
  if ( class_exists( 'wpdev_bk_personal' ) ) {
1064
 
1065
  $default_options['booking_form'] = str_replace( '\\n\\', '', wpbc_get_default_booking_form() );
17
  /** Activation & Deactivation of Booking Calendar */
18
  class WPBC_BookingInstall extends WPBC_Install {
19
 
20
+ /**
21
+ * Overload Booking Calendar option names and some other parameters
22
  *
23
  * //FixIn: 7.0.1.12
24
  * Important! for correct loading of trasnaltions later, we must do not use here loacale of plugin. So here will be untranslated strings!!!
826
  add_bk_action( 'wpbc_deactivation', 'wpbc_booking_deactivate' );
827
 
828
 
829
+ /**
830
+ * Default Options
831
+ *
832
  * Exmaple of getting options for deleting in MU:
833
+ *
834
+ * $option_name = '';
835
+ * $is_get_multiuser_general_options = true;
836
+ * $options_for_delete = wpbc_get_default_options( $option_name, $is_get_multiuser_general_options );
837
  */
838
  function wpbc_get_default_options( $option_name = '', $is_get_multiuser_general_options = false ) {
839
 
1057
  $mu_option4delete[]='booking_gcal_auto_import_is_active'; // Creation in wpbc-gcal.php file
1058
  $mu_option4delete[]='booking_gcal_auto_import_time';
1059
  $mu_option4delete[]='booking_cron'; // Creation in wpbc-cron.php
1060
+
1061
+ //FixIn: 8.0.1.6
1062
+ $default_options['booking_form_structure_type'] = 'vertical';
1063
+ $default_options['booking_menu_go_pro'] = 'show'; // show | hide
1064
+
1065
+
1066
  ////////////////////////////////////////////////////////////////////////////
1067
  // PS
1068
  ////////////////////////////////////////////////////////////////////////////
1069
+
1070
  if ( class_exists( 'wpdev_bk_personal' ) ) {
1071
 
1072
  $default_options['booking_form'] = str_replace( '\\n\\', '', wpbc_get_default_booking_form() );
core/wpbc-constants.php CHANGED
@@ -28,14 +28,15 @@ if (!defined('WP_BK_AUTO_APPROVE_WHEN_ZERO_COST')) define('WP_BK_AUTO_APPRO
28
  if (!defined('WP_BK_AUTO_APPROVE_WHEN_IMPORT_GCAL')) define('WP_BK_AUTO_APPROVE_WHEN_IMPORT_GCAL', false ); // Auto approve booking, if imported from Google Calendar //FixIn:7.0.1.59
29
  if (!defined('WP_BK_CHECK_LESS_THAN_PARAM_IN_SEARCH')) define('WP_BK_CHECK_LESS_THAN_PARAM_IN_SEARCH', false ); // Check in search results custom fields parameters relative to less than in search form, and not only equal.
30
  if (!defined('WP_BK_CHECK_IF_CUSTOM_PARAM_IN_SEARCH')) define('WP_BK_CHECK_IF_CUSTOM_PARAM_IN_SEARCH', true ); // Check in search results custom fields parameter that can include to multiple selcted options in search form. Logical OR
 
31
  if (!defined('WP_BK_TIMILINE_LIMIT_HOURS')) define('WP_BK_TIMILINE_LIMIT_HOURS', '0,24' ); // Limit times for showing cells in Calendar Overview page in admin panel for 1 day view mode. (7.0.1.18)
32
 
33
 
34
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
35
  // SYSTEM CONSTANTS //////////////////////////////////////////////////////////////////////////////////////////////////
36
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
37
- if (!defined('WP_BK_VERSION_NUM')) define('WP_BK_VERSION_NUM', '8.0.1' );
38
- if (!defined('WP_BK_MINOR_UPDATE')) define('WP_BK_MINOR_UPDATE', true );
39
  if (!defined('IS_USE_WPDEV_BK_CACHE')) define('IS_USE_WPDEV_BK_CACHE', true );
40
  if (!defined('WP_BK_DEBUG_MODE')) define('WP_BK_DEBUG_MODE', false );
41
  if (!defined('WP_BK_MIN')) define('WP_BK_MIN', false ); //TODO: Finish with this contstant, right now its not working correctly with TRUE status
28
  if (!defined('WP_BK_AUTO_APPROVE_WHEN_IMPORT_GCAL')) define('WP_BK_AUTO_APPROVE_WHEN_IMPORT_GCAL', false ); // Auto approve booking, if imported from Google Calendar //FixIn:7.0.1.59
29
  if (!defined('WP_BK_CHECK_LESS_THAN_PARAM_IN_SEARCH')) define('WP_BK_CHECK_LESS_THAN_PARAM_IN_SEARCH', false ); // Check in search results custom fields parameters relative to less than in search form, and not only equal.
30
  if (!defined('WP_BK_CHECK_IF_CUSTOM_PARAM_IN_SEARCH')) define('WP_BK_CHECK_IF_CUSTOM_PARAM_IN_SEARCH', true ); // Check in search results custom fields parameter that can include to multiple selcted options in search form. Logical OR
31
+ //if (!defined('WP_BK_CHECK_OUT_MINUS_DAY_SEARCH')) define('WP_BK_CHECK_OUT_MINUS_DAY_SEARCH', true ); // Define minus one day for check out search days. Search availability workflow for some customers.
32
  if (!defined('WP_BK_TIMILINE_LIMIT_HOURS')) define('WP_BK_TIMILINE_LIMIT_HOURS', '0,24' ); // Limit times for showing cells in Calendar Overview page in admin panel for 1 day view mode. (7.0.1.18)
33
 
34
 
35
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
36
  // SYSTEM CONSTANTS //////////////////////////////////////////////////////////////////////////////////////////////////
37
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
38
+ if (!defined('WP_BK_VERSION_NUM')) define('WP_BK_VERSION_NUM', '8.1' );
39
+ if (!defined('WP_BK_MINOR_UPDATE')) define('WP_BK_MINOR_UPDATE', ! true );
40
  if (!defined('IS_USE_WPDEV_BK_CACHE')) define('IS_USE_WPDEV_BK_CACHE', true );
41
  if (!defined('WP_BK_DEBUG_MODE')) define('WP_BK_DEBUG_MODE', false );
42
  if (!defined('WP_BK_MIN')) define('WP_BK_MIN', false ); //TODO: Finish with this contstant, right now its not working correctly with TRUE status
core/wpbc-css.php CHANGED
@@ -66,6 +66,7 @@ class WPBC_CSS extends WPBC_JS_CSS{
66
  wp_enqueue_style( 'wpbc-br-table', wpbc_plugin_url( '/core/any/css/admin-br-table.css' ), array(), WP_BK_VERSION_NUM);
67
  wp_enqueue_style( 'wpbc-admin-modal-popups', wpbc_plugin_url( '/css/modal.css' ), array(), WP_BK_VERSION_NUM);
68
  wp_enqueue_style( 'wpbc-admin-pages', wpbc_plugin_url( '/css/admin.css' ), array(), WP_BK_VERSION_NUM);
 
69
  wp_enqueue_style( 'wpbc-css-print', wpbc_plugin_url( '/css/print.css' ), array(), WP_BK_VERSION_NUM);
70
  }
71
  if ( ( $where_to_load != 'admin' ) || ( wpbc_is_new_booking_page() ) ){ // Client or Add New Booking page
@@ -104,8 +105,9 @@ class WPBC_CSS extends WPBC_JS_CSS{
104
  }
105
 
106
 
107
- /** Get URL to Calendar Skin ( CSS file )
108
- *
 
109
  * @return string - URL to calendar skin
110
  */
111
  function wpbc_get_calendar_skin_url() {
66
  wp_enqueue_style( 'wpbc-br-table', wpbc_plugin_url( '/core/any/css/admin-br-table.css' ), array(), WP_BK_VERSION_NUM);
67
  wp_enqueue_style( 'wpbc-admin-modal-popups', wpbc_plugin_url( '/css/modal.css' ), array(), WP_BK_VERSION_NUM);
68
  wp_enqueue_style( 'wpbc-admin-pages', wpbc_plugin_url( '/css/admin.css' ), array(), WP_BK_VERSION_NUM);
69
+ wp_enqueue_style( 'wpbc-admin-skin', wpbc_plugin_url( '/css/admin-skin.css' ), array( 'wpbc-admin-pages' ), WP_BK_VERSION_NUM); //FixIn: 8.0.2.4
70
  wp_enqueue_style( 'wpbc-css-print', wpbc_plugin_url( '/css/print.css' ), array(), WP_BK_VERSION_NUM);
71
  }
72
  if ( ( $where_to_load != 'admin' ) || ( wpbc_is_new_booking_page() ) ){ // Client or Add New Booking page
105
  }
106
 
107
 
108
+ /**
109
+ * Get URL to Calendar Skin ( CSS file )
110
+ *
111
  * @return string - URL to calendar skin
112
  */
113
  function wpbc_get_calendar_skin_url() {
core/wpbc-dates.php CHANGED
@@ -19,7 +19,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
19
  ////////////////////////////////////////////////////////////////////////////////
20
 
21
 
22
- /** Get SQL for inserttion Dates into DB
 
23
  *
24
  * @param type $dates_in_diff_formats
25
  * @param type $is_approved_dates
@@ -108,7 +109,8 @@ function wpbc_get_insert_sql_for_dates( $dates_in_diff_formats , $is_approved_da
108
  }
109
 
110
 
111
- /** Get the dates in different formats
 
112
  *
113
  * @param type $str_dates__dd_mm_yyyy
114
  * @param type $booking_type
@@ -174,7 +176,8 @@ function wpbc_get_dates_in_diff_formats( $str_dates__dd_mm_yyyy, $booking_type,
174
  }
175
 
176
 
177
- /** Get Times from booking Form, if these times fields exist
 
178
  *
179
  * @param type $booking_form_data
180
  * @param type $booking_type
@@ -187,8 +190,9 @@ function wpbc_get_times_in_form( $booking_form_data, $booking_type ){
187
 
188
  $is_time_exist = false;
189
 
190
- if ( ! class_exists('wpdev_bk_biz_s') )
191
- return $is_time_exist;
 
192
 
193
  $start_time = $end_time = '00:00:00';
194
 
@@ -291,7 +295,8 @@ function wpbc_get_times_in_form( $booking_form_data, $booking_type ){
291
  }
292
 
293
 
294
- /** Change Dates format from SQL Dates to predefined settings Date/Time format
 
295
  *
296
  * @param string $dates_in_sql_format - '2015-02-29 00:00:00, 2015-02-30 00:00:00'
297
  * @return string - Formated Dates to show for visitor
@@ -332,7 +337,8 @@ function wpbc_change_dates_format( $dates_in_sql_format ) {
332
  }
333
 
334
 
335
- /** Get dates from DB of specific booking
 
336
  *
337
  * @global type $wpdb
338
  * @param type $booking_id_str - booking ID
@@ -367,7 +373,8 @@ function wpbc_get_str_sql_dates_in_booking( $booking_id_str ) {
367
  }
368
 
369
 
370
- /** Get Time in 24 hours (military) format, from possible AM/PM format
 
371
  *
372
  * @param string $time_str - '01:20 PM'
373
  * @return string - '13:20'
@@ -400,7 +407,8 @@ function wpbc_get_time_in_24_hours_format( $time_str ) {
400
  }
401
 
402
 
403
- /** Get number of days between 2 dates (dates in mySQL format)
 
404
  *
405
  * @param string $day1 - Day in MySQL format
406
  * @param string $day2 - Day in MySQL format
@@ -412,7 +420,8 @@ function wpbc_get_difference_in_days( $day1, $day2 ) {
412
  }
413
 
414
 
415
- /** Get Sorted Days array in SQL format
 
416
  *
417
  * @param string $booking_days - comma separated dates: 06.04.2015, 05.04.2015, 07.04.2015, 08.04.2015, 26.03.2015, 09.04.2015, 27.03.2015
418
  * @return array - sorted dates array
@@ -444,7 +453,8 @@ function wpbc_get_sorted_days_array( $booking_days ) {
444
  }
445
 
446
 
447
- /** Get Dates in Comma seperated format, based on start and end dates.
 
448
  *
449
  * @param string $date_str_from - start date: 06.04.2015
450
  * @param string $date_str_to - end date: 08.04.2015
@@ -474,7 +484,8 @@ function wpbc_get_comma_seprated_dates_from_to_day( $date_str_from, $date_str_to
474
  }
475
 
476
 
477
- /** Get dates array based on start and end dates.
 
478
  *
479
  * @param string $sStartDate - start date: 2015-04-06
480
  * @param string $sEndDate - end date: 2015-04-08
@@ -509,7 +520,8 @@ function wpbc_get_dates_array_from_start_end_days( $sStartDate, $sEndDate ){
509
  }
510
 
511
 
512
- /** Check if nowday is tommorow from previosday
 
513
  *
514
  * @param string $nowday : 2015-02-29
515
  * @param string $previosday : 2015-02-30
@@ -537,7 +549,8 @@ function wpbc_is_next_day( $nowday, $previosday ) {
537
  }
538
 
539
 
540
- /** Get tommorow day from input value
 
541
  *
542
  * @param string $nowday : 2015-02-29
543
  * @return int : Unix timestamp for a date like this 2015-02-30
@@ -551,7 +564,8 @@ function wpbc_get_tommorow_day( $nowday ){
551
  }
552
 
553
 
554
- /** Check if this date is today day
 
555
  *
556
  * @param string $some_day : '2015-05-29'
557
  * @return boolean : true | false
@@ -566,7 +580,8 @@ function wpbc_is_today_date( $some_day ) {
566
  }
567
 
568
 
569
- /** Get days in short format view
 
570
  *
571
  * @param string $days Dates: 15.05.2015, 16.05.2015, 17.05.2015
572
  * @return string Dates in format: 15.05.2015 - 17.05.2015
@@ -611,7 +626,8 @@ function wpbc_get_dates_short_format( $days ) {
611
 
612
 
613
 
614
- /** Change date / time format
 
615
  *
616
  * @param string $dt - MySQL Date - '2015-11-21 00:00:00'
617
  * @param type $date_format - Optional. Date format
@@ -638,7 +654,8 @@ function wpbc_get_date_in_correct_format( $dt, $date_format = false, $time_forma
638
  }
639
 
640
 
641
- /** Get SHORT Dates showing data
 
642
  *
643
  * @param array $bk_dates_short - Array of dates
644
  * @param bool $is_approved - is dates approved or not
@@ -684,7 +701,8 @@ function wpbc_get_short_dates_formated_to_show( $bk_dates_short, $is_approved =
684
  return $short_dates_content;
685
  }
686
 
687
- /** Get Wide Dates showing data
 
688
  *
689
  * @param array $bk_dates - Array of dates Objects
690
  * @param bool $is_approved - is dates approved or not
19
  ////////////////////////////////////////////////////////////////////////////////
20
 
21
 
22
+ /**
23
+ * Get SQL for inserttion Dates into DB
24
  *
25
  * @param type $dates_in_diff_formats
26
  * @param type $is_approved_dates
109
  }
110
 
111
 
112
+ /**
113
+ * Get the dates in different formats
114
  *
115
  * @param type $str_dates__dd_mm_yyyy
116
  * @param type $booking_type
176
  }
177
 
178
 
179
+ /**
180
+ * Get Times from booking Form, if these times fields exist
181
  *
182
  * @param type $booking_form_data
183
  * @param type $booking_type
190
 
191
  $is_time_exist = false;
192
 
193
+ //if ( false ) //FixIn: 8.0.1.4 //Fix: TimeFree
194
+ if ( ! class_exists('wpdev_bk_biz_s') )
195
+ return $is_time_exist;
196
 
197
  $start_time = $end_time = '00:00:00';
198
 
295
  }
296
 
297
 
298
+ /**
299
+ * Change Dates format from SQL Dates to predefined settings Date/Time format
300
  *
301
  * @param string $dates_in_sql_format - '2015-02-29 00:00:00, 2015-02-30 00:00:00'
302
  * @return string - Formated Dates to show for visitor
337
  }
338
 
339
 
340
+ /**
341
+ * Get dates from DB of specific booking
342
  *
343
  * @global type $wpdb
344
  * @param type $booking_id_str - booking ID
373
  }
374
 
375
 
376
+ /**
377
+ * Get Time in 24 hours (military) format, from possible AM/PM format
378
  *
379
  * @param string $time_str - '01:20 PM'
380
  * @return string - '13:20'
407
  }
408
 
409
 
410
+ /**
411
+ * Get number of days between 2 dates (dates in mySQL format)
412
  *
413
  * @param string $day1 - Day in MySQL format
414
  * @param string $day2 - Day in MySQL format
420
  }
421
 
422
 
423
+ /**
424
+ * Get Sorted Days array in SQL format
425
  *
426
  * @param string $booking_days - comma separated dates: 06.04.2015, 05.04.2015, 07.04.2015, 08.04.2015, 26.03.2015, 09.04.2015, 27.03.2015
427
  * @return array - sorted dates array
453
  }
454
 
455
 
456
+ /**
457
+ * Get Dates in Comma seperated format, based on start and end dates.
458
  *
459
  * @param string $date_str_from - start date: 06.04.2015
460
  * @param string $date_str_to - end date: 08.04.2015
484
  }
485
 
486
 
487
+ /**
488
+ * Get dates array based on start and end dates.
489
  *
490
  * @param string $sStartDate - start date: 2015-04-06
491
  * @param string $sEndDate - end date: 2015-04-08
520
  }
521
 
522
 
523
+ /**
524
+ * Check if nowday is tommorow from previosday
525
  *
526
  * @param string $nowday : 2015-02-29
527
  * @param string $previosday : 2015-02-30
549
  }
550
 
551
 
552
+ /**
553
+ * Get tommorow day from input value
554
  *
555
  * @param string $nowday : 2015-02-29
556
  * @return int : Unix timestamp for a date like this 2015-02-30
564
  }
565
 
566
 
567
+ /**
568
+ * Check if this date is today day
569
  *
570
  * @param string $some_day : '2015-05-29'
571
  * @return boolean : true | false
580
  }
581
 
582
 
583
+ /**
584
+ * Get days in short format view
585
  *
586
  * @param string $days Dates: 15.05.2015, 16.05.2015, 17.05.2015
587
  * @return string Dates in format: 15.05.2015 - 17.05.2015
626
 
627
 
628
 
629
+ /**
630
+ * Change date / time format
631
  *
632
  * @param string $dt - MySQL Date - '2015-11-21 00:00:00'
633
  * @param type $date_format - Optional. Date format
654
  }
655
 
656
 
657
+ /**
658
+ * Get SHORT Dates showing data
659
  *
660
  * @param array $bk_dates_short - Array of dates
661
  * @param bool $is_approved - is dates approved or not
701
  return $short_dates_content;
702
  }
703
 
704
+ /**
705
+ * Get Wide Dates showing data
706
  *
707
  * @param array $bk_dates - Array of dates Objects
708
  * @param bool $is_approved - is dates approved or not
core/wpbc-debug.php CHANGED
@@ -47,7 +47,8 @@ if (!function_exists ('debuge_speed')) {
47
  }
48
  }
49
 
50
- /** Show error info
 
51
  */
52
  if (!function_exists ('debuge_error')) {
53
  function debuge_error( $msg , $file_name='', $line_num=''){
@@ -128,7 +129,8 @@ if ( ! function_exists ('wpbc_check_post_key_max_number')) {
128
  }
129
 
130
 
131
- /** Show System debug log for Beta features.
 
132
  *
133
  * @param mixed $show_debug_info
134
  *
@@ -171,7 +173,8 @@ function wpbc_start_showing_debug( $show_debug_info ) { //FixIn: 7.2.1
171
  }
172
 
173
 
174
- /** Show Top Notice in Admin panel by writing in-line JS
 
175
  *
176
  * @param string $message
177
  * @param string $message_type - (default notice) notice | error | warning | info | success
47
  }
48
  }
49
 
50
+ /**
51
+ * Show error info
52
  */
53
  if (!function_exists ('debuge_error')) {
54
  function debuge_error( $msg , $file_name='', $line_num=''){
129
  }
130
 
131
 
132
+ /**
133
+ * Show System debug log for Beta features.
134
  *
135
  * @param mixed $show_debug_info
136
  *
173
  }
174
 
175
 
176
+ /**
177
+ * Show Top Notice in Admin panel by writing in-line JS
178
  *
179
  * @param string $message
180
  * @param string $message_type - (default notice) notice | error | warning | info | success
core/wpbc-dev-api.php CHANGED
@@ -20,7 +20,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
20
  // Add New Booking
21
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
22
 
23
- /** Add New Booking
 
24
  *
25
  * @param array $booking_dates // array( '2017-06-24', '2017-06-24', '2017-06-25' );
26
  * @param array $booking_data // array(
@@ -169,7 +170,8 @@ function wpbc_api_booking_add_new( $booking_dates, $booking_data, $resource_id =
169
  // Is Date Booked ?
170
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
171
 
172
- /** Check if dates available
 
173
  * in specific resource
174
  *
175
  * @param array $booking_dates // Range List of Dates in MySQL format, like: array( '2017-06-23 14:00:01', '2017-06-24 00:00:00', '2017-06-25', '2017-06-26 12:00:02' );
@@ -238,7 +240,8 @@ function wpbc_api_is_dates_booked( $booking_dates, $resource_id = 1, $params = a
238
  // Get Bookings Array - [Listing]
239
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
240
 
241
- /** Get bookings array from Booking Calendar
 
242
  *
243
  * @param aray $params
244
  * @return array
@@ -376,7 +379,7 @@ function wpbc_api_get_bookings_arr( $params = array() ) {
376
  , 'wh_cost2' => ''
377
  , 'or_sort' => get_bk_option( 'booking_sort_order' )
378
  , 'page_num' => '1'
379
- , 'wh_trash' => 'any' // '' | trash | any
380
  , 'limit_hours' => '0,24'
381
  , 'only_booked_resources' => 0
382
  , 'page_items_count' => '100000'
@@ -384,6 +387,22 @@ function wpbc_api_get_bookings_arr( $params = array() ) {
384
  $params = wp_parse_args( $params, $defaults );
385
 
386
  $bookings_arr = wpbc_get_bookings_objects( $params );
387
-
388
  return $bookings_arr;
389
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  // Add New Booking
21
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
22
 
23
+ /**
24
+ * Add New Booking
25
  *
26
  * @param array $booking_dates // array( '2017-06-24', '2017-06-24', '2017-06-25' );
27
  * @param array $booking_data // array(
170
  // Is Date Booked ?
171
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
172
 
173
+ /**
174
+ * Check if dates available
175
  * in specific resource
176
  *
177
  * @param array $booking_dates // Range List of Dates in MySQL format, like: array( '2017-06-23 14:00:01', '2017-06-24 00:00:00', '2017-06-25', '2017-06-26 12:00:02' );
240
  // Get Bookings Array - [Listing]
241
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
242
 
243
+ /**
244
+ * Get bookings array from Booking Calendar
245
  *
246
  * @param aray $params
247
  * @return array
379
  , 'wh_cost2' => ''
380
  , 'or_sort' => get_bk_option( 'booking_sort_order' )
381
  , 'page_num' => '1'
382
+ , 'wh_trash' => '' // '' | trash | any // FixIn: 8.0.2.8
383
  , 'limit_hours' => '0,24'
384
  , 'only_booked_resources' => 0
385
  , 'page_items_count' => '100000'
387
  $params = wp_parse_args( $params, $defaults );
388
 
389
  $bookings_arr = wpbc_get_bookings_objects( $params );
390
+
391
  return $bookings_arr;
392
  }
393
+
394
+
395
+ /**
396
+ * Hook action after creation new booking
397
+ * @param int $booking_id
398
+ * @param int $resource_id
399
+ * @param string $str_dates__dd_mm_yyyy - "30.02.2014, 31.02.2014, 01.03.2014"
400
+ * @param array $times_array - array($start_time, $end_time )
401
+ * @param string $booking_form
402
+ function your_cust_func_add_new_booking( $booking_id, $resource_id, $str_dates__dd_mm_yyyy, $times_array , $booking_form ) {
403
+
404
+ }
405
+ add_action( 'wpdev_new_booking', 'your_cust_func_add_new_booking', 100, 5 );
406
+ */
407
+
408
+
core/wpbc-emails.php CHANGED
@@ -135,7 +135,8 @@ function wpbc_check_for_several_emails_in_form( $mail_recipients, $formdata, $bk
135
  // N E W /////////////////////////////////////////////////////////////////////
136
 
137
 
138
- /** Parse email and get Parts of Email - Name and Email
 
139
  *
140
  * @param string $email
141
  * @return array [email] => beta@wpbookingcalendar.com
@@ -235,10 +236,21 @@ function wpbc_get_email_help_shortcodes( $skip_shortcodes = array() , $email_exa
235
  $fields[] = sprintf(__('%s - inserting IP address of the user who made this action ' ,'booking'),'<code>[remote_ip]</code>');
236
  $fields[] = sprintf(__('%s - inserting contents of the User-Agent: header from the current request, if there is one ' ,'booking'),'<code>[user_agent]</code>');
237
  $fields[] = sprintf(__('%s - inserting address of the page (if any), where visitor make this action ' ,'booking'),'<code>[request_url]</code>');
238
- $fields[] = sprintf(__('%s - inserting date of this action ' ,'booking'),'<code>[current_date]</code>');
239
  $fields[] = sprintf(__('%s - inserting time of this action ' ,'booking'),'<code>[current_time]</code>');
240
  }
241
-
 
 
 
 
 
 
 
 
 
 
 
 
242
  // [moderatelink]
243
  if ( ! in_array( 'moderatelink', $skip_shortcodes ) ) {
244
  $fields[] = sprintf(__('%s - inserting moderate link of new booking ' ,'booking'),'<code>[moderatelink]</code>');
@@ -285,7 +297,8 @@ function wpbc_get_email_help_shortcodes( $skip_shortcodes = array() , $email_exa
285
  }
286
 
287
 
288
- /** Check Email subject about Language sections
 
289
  *
290
  * @param string $subject
291
  * @param string $email_id
@@ -300,7 +313,8 @@ function wpbc_email_api_get_subject_before( $subject, $email_id ) {
300
  add_filter( 'wpbc_email_api_get_subject_before', 'wpbc_email_api_get_subject_before', 10, 2 ); // Hook fire in api-email.php
301
 
302
 
303
- /** Check Email sections content about Language sections
 
304
  *
305
  * @param array $fields_values - list of params to parse: 'content', 'header_content', 'footer_content' for different languges, etc ....
306
  * @param string $email_id - Email ID
@@ -325,7 +339,8 @@ function wpbc_email_api_get_content_before( $fields_values, $email_id , $email_t
325
  add_filter( 'wpbc_email_api_get_content_before', 'wpbc_email_api_get_content_before', 10, 3 ); // Hook fire in api-email.php
326
 
327
 
328
- /** Modify email content, if needed. - In HTML mail content, make links clickable.
 
329
  *
330
  * @param array $email_content - content of Email
331
  * @param string $email_id - Email ID
@@ -341,7 +356,8 @@ function wpbc_email_api_get_content_after( $email_content, $email_id , $email_ty
341
  add_filter( 'wpbc_email_api_get_content_after', 'wpbc_email_api_get_content_after', 10, 3 ); // Hook fire in api-email.php
342
 
343
 
344
- /** Check Email Headers - in New Booking Email (to admin) set Reply-To header to visitor email.
 
345
  *
346
  * @param string $headers
347
  * @param string $email_id - Email ID
@@ -385,7 +401,8 @@ function wpbc_email_api_get_headers_after( $mail_headers, $email_id , $fields_va
385
  add_filter( 'wpbc_email_api_get_headers_after', 'wpbc_email_api_get_headers_after', 10, 5 ); // Hook fire in api-email.php
386
 
387
 
388
- /** Check if we can send Email - block sending in live demos
 
389
  *
390
  * @param bool $is_send_email
391
  * @param string $email_id
@@ -402,7 +419,8 @@ function wpbc_email_api_is_allow_send( $is_send_email, $email_id, $fields_values
402
  add_filter( 'wpbc_email_api_is_allow_send', 'wpbc_email_api_is_allow_send', 10, 3 ); // Hook fire in api-email.php
403
 
404
 
405
- /** Show warning about not sending emails, and reason about this.
 
406
  *
407
  * @param object $wp_error_object - WP Error object
408
  * @param string $error_description - Description
135
  // N E W /////////////////////////////////////////////////////////////////////
136
 
137
 
138
+ /**
139
+ * Parse email and get Parts of Email - Name and Email
140
  *
141
  * @param string $email
142
  * @return array [email] => beta@wpbookingcalendar.com
236
  $fields[] = sprintf(__('%s - inserting IP address of the user who made this action ' ,'booking'),'<code>[remote_ip]</code>');
237
  $fields[] = sprintf(__('%s - inserting contents of the User-Agent: header from the current request, if there is one ' ,'booking'),'<code>[user_agent]</code>');
238
  $fields[] = sprintf(__('%s - inserting address of the page (if any), where visitor make this action ' ,'booking'),'<code>[request_url]</code>');
 
239
  $fields[] = sprintf(__('%s - inserting time of this action ' ,'booking'),'<code>[current_time]</code>');
240
  }
241
+
242
+ $fields[] = sprintf(__('%s - inserting date of this action ' ,'booking'),'<code>[current_date]</code>');
243
+
244
+ $fields[] = sprintf(__('%s - inserting modification date of booking ' ,'booking'),'<code>[modification_date]</code>');
245
+ $fields[] = sprintf(__('%s - inserting modification date of booking ' ,'booking'),'<code>[modification_year]</code>');
246
+ $fields[] = sprintf(__('%s - inserting modification date of booking ' ,'booking'),'<code>[modification_month]</code>');
247
+ $fields[] = sprintf(__('%s - inserting modification date of booking ' ,'booking'),'<code>[modification_day]</code>');
248
+ $fields[] = sprintf(__('%s - inserting modification date of booking ' ,'booking'),'<code>[modification_hour]</code>');
249
+ $fields[] = sprintf(__('%s - inserting modification date of booking ' ,'booking'),'<code>[modification_minutes]</code>');
250
+ $fields[] = sprintf(__('%s - inserting modification date of booking ' ,'booking'),'<code>[modification_seconds]</code>');
251
+
252
+
253
+
254
  // [moderatelink]
255
  if ( ! in_array( 'moderatelink', $skip_shortcodes ) ) {
256
  $fields[] = sprintf(__('%s - inserting moderate link of new booking ' ,'booking'),'<code>[moderatelink]</code>');
297
  }
298
 
299
 
300
+ /**
301
+ * Check Email subject about Language sections
302
  *
303
  * @param string $subject
304
  * @param string $email_id
313
  add_filter( 'wpbc_email_api_get_subject_before', 'wpbc_email_api_get_subject_before', 10, 2 ); // Hook fire in api-email.php
314
 
315
 
316
+ /**
317
+ * Check Email sections content about Language sections
318
  *
319
  * @param array $fields_values - list of params to parse: 'content', 'header_content', 'footer_content' for different languges, etc ....
320
  * @param string $email_id - Email ID
339
  add_filter( 'wpbc_email_api_get_content_before', 'wpbc_email_api_get_content_before', 10, 3 ); // Hook fire in api-email.php
340
 
341
 
342
+ /**
343
+ * Modify email content, if needed. - In HTML mail content, make links clickable.
344
  *
345
  * @param array $email_content - content of Email
346
  * @param string $email_id - Email ID
356
  add_filter( 'wpbc_email_api_get_content_after', 'wpbc_email_api_get_content_after', 10, 3 ); // Hook fire in api-email.php
357
 
358
 
359
+ /**
360
+ * Check Email Headers - in New Booking Email (to admin) set Reply-To header to visitor email.
361
  *
362
  * @param string $headers
363
  * @param string $email_id - Email ID
401
  add_filter( 'wpbc_email_api_get_headers_after', 'wpbc_email_api_get_headers_after', 10, 5 ); // Hook fire in api-email.php
402
 
403
 
404
+ /**
405
+ * Check if we can send Email - block sending in live demos
406
  *
407
  * @param bool $is_send_email
408
  * @param string $email_id
419
  add_filter( 'wpbc_email_api_is_allow_send', 'wpbc_email_api_is_allow_send', 10, 3 ); // Hook fire in api-email.php
420
 
421
 
422
+ /**
423
+ * Show warning about not sending emails, and reason about this.
424
  *
425
  * @param object $wp_error_object - WP Error object
426
  * @param string $error_description - Description
core/wpbc-functions.php CHANGED
@@ -52,7 +52,8 @@ function wpbc_get_slug_format_4_option_name( $value ) {
52
  ////////////////////////////////////////////////////////////////////////////////
53
 
54
 
55
- /** Get Booking parameters
 
56
  *
57
  * @param int $booking_id - ID of booking // 999
58
  * @param string $formdata - booking form data content // select-one^rangetime4^10:00 - 12:00~text^name4^Jo~text^secondname4^Smith~email^email4^smith@wpbookingcalendar.com~...
@@ -213,12 +214,70 @@ $replace['selected_short_dates_hint'] = wpbc_get_dates_short_format( $sql_da
213
  $replace[ 'db_cost_hint' ] = wpbc_get_cost_with_currency_for_user( $replace[ 'db_cost' ], $booking_resource_id );
214
 
215
  ////////////////////////////////////////////////////////////////////////////
216
-
 
 
 
 
 
 
 
 
 
 
217
  return $replace;
218
  }
219
 
220
 
221
- /** Replace shortcodes in string
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  *
223
  * @param string $subject - string to manipulate
224
  * @param array $replace_array - array with values to replace // array( [booking_id] => 9, [id] => 9, [dates] => July 3, 2016 14:00 - July 4, 2016 16:00, .... )
@@ -291,7 +350,8 @@ function wpbc_replace_booking_shortcodes( $subject, $replace_array , $replace_un
291
  return $results;
292
  }
293
 
294
- /** Get absolute URL to relative plugin path.
 
295
  * Depend from the WP_BK_MIN contant can be load minified version of file, if its exist
296
  * @param string $path - path
297
  * @return string
@@ -313,7 +373,8 @@ function wpbc_replace_booking_shortcodes( $subject, $replace_array , $replace_un
313
  }
314
 
315
 
316
- /** Check if such file exist or not.
 
317
  *
318
  * @param string $path - relative path to file (relative to plugin folder).
319
  * @return boolean true | false
@@ -330,7 +391,8 @@ function wpbc_replace_booking_shortcodes( $subject, $replace_array , $replace_un
330
  // Admin Menu Links
331
  ////////////////////////////////////////////////////////////////////////////
332
 
333
- /** Get URL to specific Admin Menu page
 
334
  *
335
  * @param string $menu_type - { booking | add | resources | settings }
336
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
@@ -407,7 +469,8 @@ $is_old = false;
407
 
408
  // // // // // // // // // // // // // // // // // // // // // // // // // /
409
 
410
- /** Get URL of Booking Listing or Calendar Overview page
 
411
  *
412
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
413
  * @param boolean $is_old - { default: true }
@@ -417,7 +480,8 @@ $is_old = false;
417
  return wpbc_get_menu_url( 'booking', $is_absolute_url, $is_old );
418
  }
419
 
420
- /** Get URL of Booking > Add booking page
 
421
  *
422
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
423
  * @param boolean $is_old - { default: true }
@@ -427,7 +491,8 @@ $is_old = false;
427
  return wpbc_get_menu_url( 'add', $is_absolute_url, $is_old );
428
  }
429
 
430
- /** Get URL of Booking > Resources page
 
431
  *
432
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
433
  * @param boolean $is_old - { default: true }
@@ -437,7 +502,8 @@ $is_old = false;
437
  return wpbc_get_menu_url( 'resources', $is_absolute_url, $is_old );
438
  }
439
 
440
- /** Get URL of Booking > Settings page
 
441
  *
442
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
443
  * @param boolean $is_old - { default: true }
@@ -449,7 +515,8 @@ $is_old = false;
449
 
450
  // // // // // // // // // // // // // // // // // // // // // // // // // /
451
 
452
- /** Check if this Booking Listing or Calendar Overview page
 
453
  * @param string $server_param - 'REQUEST_URI' | 'HTTP_REFERER' Default: 'REQUEST_URI'
454
  * @return boolean true | false
455
  */
@@ -471,7 +538,8 @@ $is_old = false;
471
  return false;
472
  }
473
 
474
- /** Check if this Booking > Add booking page
 
475
  * @param string $server_param - 'REQUEST_URI' | 'HTTP_REFERER' Default: 'REQUEST_URI'
476
  * @return boolean true | false
477
  */
@@ -491,7 +559,8 @@ $is_old = false;
491
  return false;
492
  }
493
 
494
- /** Check if this Booking > Resources page
 
495
  * @param string $server_param - 'REQUEST_URI' | 'HTTP_REFERER' Default: 'REQUEST_URI'
496
  * @return boolean true | false
497
  */
@@ -512,7 +581,8 @@ $is_old = false;
512
  return false;
513
  }
514
 
515
- /** Check if this Booking > Settings page
 
516
  * @param string $server_param - 'REQUEST_URI' | 'HTTP_REFERER' Default: 'REQUEST_URI'
517
  * @return boolean true | false
518
  */
@@ -536,7 +606,8 @@ $is_old = false;
536
  ////////////////////////////////////////////////////////////////////////////
537
 
538
 
539
- /** Insert New Line symbols after <br> tags. Usefull for the settings pages to show in redable view
 
540
  *
541
  * @param type $param
542
  * @return type
@@ -619,7 +690,8 @@ $is_old = false;
619
 
620
  $booking_form_show = apply_bk_filter( 'wpbc_get_free_booking_show_form' );
621
  return $booking_form_show;
622
-
 
623
  $booking_form_field_active1 = get_bk_option( 'booking_form_field_active1');
624
  $booking_form_field_label1 = get_bk_option( 'booking_form_field_label1');
625
  $booking_form_field_label1 = apply_bk_filter('wpdev_check_for_active_language', $booking_form_field_label1 );
@@ -660,6 +732,7 @@ $is_old = false;
660
  $booking_form_show.='</div>';
661
 
662
  return $booking_form_show;
 
663
  }
664
 
665
  // Parse form content
@@ -988,7 +1061,8 @@ $is_old = false;
988
  }
989
 
990
 
991
- /** Check if user accidentially update Booking Calendar Paid version to Free
 
992
  *
993
  * @return bool
994
  */
@@ -1139,7 +1213,8 @@ $is_old = false;
1139
 
1140
 
1141
 
1142
- /** Get fields from booking form at the settings page or return false if no fields
 
1143
  *
1144
  * @param string $booking_form
1145
  * @return mixed false | array( $fields_count, $fields_matches )
@@ -1167,7 +1242,8 @@ $is_old = false;
1167
  }
1168
 
1169
 
1170
- /** Get Get only SELECT, CHCKBOX & RADIO fields from booking form at the settings page or return false if no fields
 
1171
  *
1172
  * @param string $booking_form
1173
  * @return mixed false | array( $fields_count, $fields_matches )
@@ -1188,7 +1264,8 @@ $is_old = false;
1188
  }
1189
 
1190
 
1191
- /** Get parameters of shortcode in string
 
1192
  *
1193
  * @param string $shortcode
1194
  * @param string $subject
@@ -1286,7 +1363,8 @@ $is_old = false;
1286
  }
1287
 
1288
 
1289
- /** Check paramter if it number or comma separated list of numbers
 
1290
  *
1291
  * @global type $wpdb
1292
  * @param string $value
@@ -1320,14 +1398,16 @@ $is_old = false;
1320
 
1321
  $result = array();
1322
  foreach ($array_of_nums as $check_element) {
1323
- $result[] = $wpdb->prepare( "%d", $check_element );
 
1324
  }
1325
  $result = implode(',', $result );
1326
  return $result;
1327
  }
 
1328
 
1329
-
1330
- /** Cehck about Valid date, like 2016-07-20 or digit
1331
  *
1332
  * @param string $value
1333
  * @return string or int
@@ -1372,7 +1452,8 @@ $is_old = false;
1372
  }
1373
 
1374
 
1375
- /** Clean user string for using in SQL LIKE statement - append to LIKE sql
 
1376
  *
1377
  * @param string $value - to clean
1378
  * @return string - escaped
@@ -1411,7 +1492,8 @@ $is_old = false;
1411
  }
1412
 
1413
 
1414
- /** Clean string for using in SQL LIKE requests inside single quotes: WHERE title LIKE '%". $escaped_search_title ."%'
 
1415
  * Replaced _ to \_ % to \% \ to \\
1416
  * @param string $value - to clean
1417
  * @return string - escaped
@@ -1452,7 +1534,8 @@ $is_old = false;
1452
  }
1453
 
1454
 
1455
- /** Escape string from SQL for the HTML form field
 
1456
  *
1457
  * @param string $value
1458
  * @return string
@@ -1472,9 +1555,13 @@ $is_old = false;
1472
  global $wpdb;
1473
 
1474
  $value_trimmed = trim( stripslashes( $value ) );
1475
-
1476
- $esc_sql_value = esc_sql( $value_trimmed );
1477
-
 
 
 
 
1478
  //$value = trim( $wpdb->prepare( "'%s'", $esc_sql_value ) , "'" );
1479
 
1480
  $esc_sql_value = trim( stripslashes( $esc_sql_value ) );
@@ -1534,7 +1621,8 @@ $is_old = false;
1534
 
1535
 
1536
 
1537
- /** Check if this demo website
 
1538
  *
1539
  * @return bool
1540
  */
@@ -1912,7 +2000,8 @@ function get_wpbc_current_user_id() {
1912
  }
1913
 
1914
 
1915
- /** Check if Current User have specific Role
 
1916
  *
1917
  * @return bool Whether the current user has the given capability.
1918
  */
@@ -1950,14 +2039,15 @@ function wpbc_get_user_ip() {
1950
  add_bk_filter('wpbc_get_user_ip', 'wpbc_get_user_ip');
1951
 
1952
 
1953
- /** Transform the REQESTS parameters (GET and POST) into URL
 
1954
  *
1955
  * @param type $page_param
1956
  * @param array $exclude_params
1957
  * @param type $only_these_parameters
1958
  * @return type
1959
  */
1960
- function wpbc_get_params_in_url( $page_param , $exclude_params = array(), $only_these_parameters = false, $is_escape_url = true, $only_get = false ){
1961
 
1962
  $exclude_params[] = 'page';
1963
  $exclude_params[] = 'post_type';
@@ -2041,7 +2131,8 @@ function wpbc_show_ajax_message( $message, $time_to_show = 3000, $is_error = fal
2041
  }
2042
 
2043
 
2044
- /** Show "Saved Changes" message at the top of settings page.
 
2045
  *
2046
  */
2047
  function wpbc_show_changes_saved_message() {
@@ -2049,7 +2140,8 @@ function wpbc_show_changes_saved_message() {
2049
  }
2050
 
2051
 
2052
- /** Show Message at Top of Admin Pages
 
2053
  *
2054
  * @param type $message - mesage to show
2055
  * @param type $time_to_show - number of seconds to show, if 0 or skiped, then unlimited time.
@@ -2078,7 +2170,8 @@ function wpbc_show_message ( $message, $time_to_show , $message_type = 'updated'
2078
  }
2079
 
2080
 
2081
- /** Escape and prepare message to show it
 
2082
  *
2083
  * @param type $message - message
2084
  * @param type $message_type - Default: updated { updated | error | notice }
@@ -2105,7 +2198,8 @@ function wpbc_get_formated_message ( $message, $message_type = 'updated', $inner
2105
  }
2106
 
2107
 
2108
- /** Show system info in settings page
 
2109
  *
2110
  * @param string $message ...
2111
  * @param string $message_type 'info' | 'warning' | 'error'
@@ -2171,7 +2265,8 @@ function wpbc_close_meta_box_section() {
2171
  ////////////////////////////////////////////////////////////////////////////////
2172
  // P a g i n a t i o n o f T a b l e L i s t i n g ///////////////
2173
  ////////////////////////////////////////////////////////////////////////////////
2174
- /** Show P a g i n a t i o n
 
2175
  *
2176
  * @param int $summ_number_of_items - total number of items
2177
  * @param int $active_page_num - number of activated page
@@ -2321,7 +2416,8 @@ function wpbc_reload_page_by_js( $url ) {
2321
  }
2322
 
2323
 
2324
- /** Redirect browser to a specific page
 
2325
  *
2326
  * @param string $url - URL of page to redirect
2327
  */
@@ -2340,7 +2436,8 @@ function wpbc_redirect( $url ) {
2340
  }
2341
 
2342
 
2343
- /** Show Welcome Panel with links
 
2344
  *
2345
  * @global type $wpbc_Dismiss
2346
  */
@@ -2502,7 +2599,8 @@ function wpbc_welcome_panel() {
2502
  }
2503
 
2504
 
2505
- /** Content of Welcome Panel with links
 
2506
  *
2507
  */
2508
  function wpbc_welcome_panel_content() {
@@ -2587,7 +2685,7 @@ function wpbc_welcome_panel_content() {
2587
  </div>
2588
  <div class="welcome-icon welcome-widgets-menus" style="text-align:right;font-style:italic;"><?php
2589
  printf( __( 'Need even more functionality? Check %s higher versions %s','booking'),
2590
- '<a href="http://wpbookingcalendar.com/features/" target="_blank">',
2591
  '</a>'
2592
  ); ?>
2593
  </div>
@@ -2602,7 +2700,8 @@ function wpbc_get_warning_text_in_demo_mode() {
2602
  }
2603
 
2604
 
2605
- /** Load transaltion POT file, and generate PHP file with all translations relative to plugin.
 
2606
  * Link: http://server.com/wp-admin/admin.php?page=wpbc-settings&system_info=show&pot=1#wpbc_general_settings_system_info_metabox
2607
  */
2608
  function wpbc_pot_to_php() {
@@ -2693,7 +2792,8 @@ function wpbc_pot_to_php() {
2693
 
2694
 
2695
 
2696
- /** Show System Info (status) at Booking > Settings General page
 
2697
  * Link: http://server.com/wp-admin/admin.php?page=wpbc-settings&system_info=show#wpbc_general_settings_system_info_metabox
2698
  */
2699
  function wpbc_system_info() {
@@ -2894,7 +2994,8 @@ function wpbc_system_info() {
2894
  // Support functions for MU version
2895
  ////////////////////////////////////////////////////////////////////////////////
2896
 
2897
- /** Set active User Environment in MultiUser version, depend from owner of booking resource
 
2898
  *
2899
  * @param int $previous_active_user (default=-1) - blank parameter
2900
  * @param int $bktype - booking resource ID for checking
@@ -2926,7 +3027,8 @@ function wpbc_mu_set_environment_for_owner_of_resource( $previous_active_user =
2926
  add_bk_filter('wpbc_mu_set_environment_for_owner_of_resource', 'wpbc_mu_set_environment_for_owner_of_resource');
2927
 
2928
 
2929
- /** Set environment for this user in MU version
 
2930
  *
2931
  * @param int $previous_active_user - ID of user
2932
  * Usage:
@@ -2946,7 +3048,8 @@ add_bk_action('wpbc_mu_set_environment_for_user', 'wpbc_mu_set_environment_for_u
2946
  ////////////////////////////////////////////////////////////////////////////////
2947
  // Support functions in BS
2948
  ////////////////////////////////////////////////////////////////////////////////
2949
- /** Format booking cost with a currency symbol.
 
2950
  * In MultiUser version also checking about specific currency that belong to specific WordPress user.
2951
  * This checking based on belonging specific booking resource to specific user.
2952
  *
@@ -2973,7 +3076,8 @@ function wpbc_get_cost_with_currency_for_user( $cost, $booking_resource_id = 0
2973
 
2974
 
2975
 
2976
- /** Get currency Symbol.
 
2977
  * In MultiUser version also checking about specific currency that belong to specific WordPress user.
2978
  * This checking based on belonging specific booking resource to specific user.
2979
  *
@@ -2998,7 +3102,8 @@ function wpbc_get_currency_symbol_for_user( $booking_resource_id = 0 ){
2998
 
2999
 
3000
 
3001
- /** Check if "Booking Manager" installed/activated and return version number
 
3002
  *
3003
  * @return string - 0 if not installed, otherwise version num
3004
  */
52
  ////////////////////////////////////////////////////////////////////////////////
53
 
54
 
55
+ /**
56
+ * Get Booking parameters
57
  *
58
  * @param int $booking_id - ID of booking // 999
59
  * @param string $formdata - booking form data content // select-one^rangetime4^10:00 - 12:00~text^name4^Jo~text^secondname4^Smith~email^email4^smith@wpbookingcalendar.com~...
214
  $replace[ 'db_cost_hint' ] = wpbc_get_cost_with_currency_for_user( $replace[ 'db_cost' ], $booking_resource_id );
215
 
216
  ////////////////////////////////////////////////////////////////////////////
217
+
218
+ //FixIn: 8.0.1.7
219
+ $modification_date = wpbc_get_booking_modification_date( $booking_id );
220
+ $replace[ 'modification_date' ] = $modification_date;
221
+ $replace[ 'modification_year' ] = date_i18n( 'Y', strtotime( $modification_date ) );
222
+ $replace[ 'modification_month' ] = date_i18n( 'm', strtotime( $modification_date ) );
223
+ $replace[ 'modification_day' ] = date_i18n( 'd', strtotime( $modification_date ) );
224
+ $replace['modification_hour'] = date_i18n( 'H', strtotime( $modification_date ) );
225
+ $replace['modification_minutes'] = date_i18n( 'i', strtotime( $modification_date ) );
226
+ $replace['modification_seconds'] = date_i18n( 's', strtotime( $modification_date ) );
227
+
228
  return $replace;
229
  }
230
 
231
 
232
+ //FixIn: 8.0.1.7
233
+ function wpbc_get_booking_modification_date( $booking_id ){
234
+ global $wpdb;
235
+ $modification_date = ' ' . $wpdb->get_var( $wpdb->prepare( "SELECT modification_date FROM {$wpdb->prefix}booking WHERE booking_id = %d " , $booking_id ) );
236
+ return $modification_date;
237
+ }
238
+
239
+
240
+ /** Get additional parameters to the replace array for specific booking
241
+ * @param $replace
242
+ * @param $booking_id
243
+ * @param $bktype
244
+ * @param $formdata
245
+ *
246
+ * @return mixed
247
+ */
248
+ function wpbc_replace_params_for_booking_func( $replace, $booking_id, $bktype, $formdata ){
249
+
250
+ $modification_date = wpbc_get_booking_modification_date( $booking_id );
251
+ if ( ! isset( $replace['modification_date'] ) ) {
252
+ $replace['modification_date'] = $modification_date;
253
+ }
254
+ if ( ! isset( $replace['modification_year'] ) ) {
255
+ $replace['modification_year'] = date_i18n( 'Y', strtotime( $modification_date ) );
256
+ }
257
+ if ( ! isset( $replace['modification_month'] ) ) {
258
+ $replace['modification_month'] = date_i18n( 'm', strtotime( $modification_date ) );
259
+ }
260
+ if ( ! isset( $replace['modification_day'] ) ) {
261
+ $replace['modification_day'] = date_i18n( 'd', strtotime( $modification_date ) );
262
+ }
263
+
264
+ if ( ! isset( $replace['modification_hour'] ) ) {
265
+ $replace['modification_hour'] = date_i18n( 'H', strtotime( $modification_date ) );
266
+ }
267
+ if ( ! isset( $replace['modification_minutes'] ) ) {
268
+ $replace['modification_minutes'] = date_i18n( 'i', strtotime( $modification_date ) );
269
+ }
270
+ if ( ! isset( $replace['modification_seconds'] ) ) {
271
+ $replace['modification_seconds'] = date_i18n( 's', strtotime( $modification_date ) );
272
+ }
273
+
274
+ return $replace;
275
+ }
276
+ add_filter( 'wpbc_replace_params_for_booking', 'wpbc_replace_params_for_booking_func', 10, 4 );
277
+
278
+
279
+ /**
280
+ * Replace shortcodes in string
281
  *
282
  * @param string $subject - string to manipulate
283
  * @param array $replace_array - array with values to replace // array( [booking_id] => 9, [id] => 9, [dates] => July 3, 2016 14:00 - July 4, 2016 16:00, .... )
350
  return $results;
351
  }
352
 
353
+ /**
354
+ * Get absolute URL to relative plugin path.
355
  * Depend from the WP_BK_MIN contant can be load minified version of file, if its exist
356
  * @param string $path - path
357
  * @return string
373
  }
374
 
375
 
376
+ /**
377
+ * Check if such file exist or not.
378
  *
379
  * @param string $path - relative path to file (relative to plugin folder).
380
  * @return boolean true | false
391
  // Admin Menu Links
392
  ////////////////////////////////////////////////////////////////////////////
393
 
394
+ /**
395
+ * Get URL to specific Admin Menu page
396
  *
397
  * @param string $menu_type - { booking | add | resources | settings }
398
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
469
 
470
  // // // // // // // // // // // // // // // // // // // // // // // // // /
471
 
472
+ /**
473
+ * Get URL of Booking Listing or Calendar Overview page
474
  *
475
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
476
  * @param boolean $is_old - { default: true }
480
  return wpbc_get_menu_url( 'booking', $is_absolute_url, $is_old );
481
  }
482
 
483
+ /**
484
+ * Get URL of Booking > Add booking page
485
  *
486
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
487
  * @param boolean $is_old - { default: true }
491
  return wpbc_get_menu_url( 'add', $is_absolute_url, $is_old );
492
  }
493
 
494
+ /**
495
+ * Get URL of Booking > Resources page
496
  *
497
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
498
  * @param boolean $is_old - { default: true }
502
  return wpbc_get_menu_url( 'resources', $is_absolute_url, $is_old );
503
  }
504
 
505
+ /**
506
+ * Get URL of Booking > Settings page
507
  *
508
  * @param boolean $is_absolute_url - Absolute or relative url { default: true }
509
  * @param boolean $is_old - { default: true }
515
 
516
  // // // // // // // // // // // // // // // // // // // // // // // // // /
517
 
518
+ /**
519
+ * Check if this Booking Listing or Calendar Overview page
520
  * @param string $server_param - 'REQUEST_URI' | 'HTTP_REFERER' Default: 'REQUEST_URI'
521
  * @return boolean true | false
522
  */
538
  return false;
539
  }
540
 
541
+ /**
542
+ * Check if this Booking > Add booking page
543
  * @param string $server_param - 'REQUEST_URI' | 'HTTP_REFERER' Default: 'REQUEST_URI'
544
  * @return boolean true | false
545
  */
559
  return false;
560
  }
561
 
562
+ /**
563
+ * Check if this Booking > Resources page
564
  * @param string $server_param - 'REQUEST_URI' | 'HTTP_REFERER' Default: 'REQUEST_URI'
565
  * @return boolean true | false
566
  */
581
  return false;
582
  }
583
 
584
+ /**
585
+ * Check if this Booking > Settings page
586
  * @param string $server_param - 'REQUEST_URI' | 'HTTP_REFERER' Default: 'REQUEST_URI'
587
  * @return boolean true | false
588
  */
606
  ////////////////////////////////////////////////////////////////////////////
607
 
608
 
609
+ /**
610
+ * Insert New Line symbols after <br> tags. Usefull for the settings pages to show in redable view
611
  *
612
  * @param type $param
613
  * @return type
690
 
691
  $booking_form_show = apply_bk_filter( 'wpbc_get_free_booking_show_form' );
692
  return $booking_form_show;
693
+
694
+ /*
695
  $booking_form_field_active1 = get_bk_option( 'booking_form_field_active1');
696
  $booking_form_field_label1 = get_bk_option( 'booking_form_field_label1');
697
  $booking_form_field_label1 = apply_bk_filter('wpdev_check_for_active_language', $booking_form_field_label1 );
732
  $booking_form_show.='</div>';
733
 
734
  return $booking_form_show;
735
+ */
736
  }
737
 
738
  // Parse form content
1061
  }
1062
 
1063
 
1064
+ /**
1065
+ * Check if user accidentially update Booking Calendar Paid version to Free
1066
  *
1067
  * @return bool
1068
  */
1213
 
1214
 
1215
 
1216
+ /**
1217
+ * Get fields from booking form at the settings page or return false if no fields
1218
  *
1219
  * @param string $booking_form
1220
  * @return mixed false | array( $fields_count, $fields_matches )
1242
  }
1243
 
1244
 
1245
+ /**
1246
+ * Get Get only SELECT, CHCKBOX & RADIO fields from booking form at the settings page or return false if no fields
1247
  *
1248
  * @param string $booking_form
1249
  * @return mixed false | array( $fields_count, $fields_matches )
1264
  }
1265
 
1266
 
1267
+ /**
1268
+ * Get parameters of shortcode in string
1269
  *
1270
  * @param string $shortcode
1271
  * @param string $subject
1363
  }
1364
 
1365
 
1366
+ /**
1367
+ * Check paramter if it number or comma separated list of numbers
1368
  *
1369
  * @global type $wpdb
1370
  * @param string $value
1398
 
1399
  $result = array();
1400
  foreach ($array_of_nums as $check_element) {
1401
+ //$result[] = $wpdb->prepare( "%d", $check_element );
1402
+ $result[] = intval( $check_element ); //FixIn: 8.0.2.10
1403
  }
1404
  $result = implode(',', $result );
1405
  return $result;
1406
  }
1407
+
1408
 
1409
+ /**
1410
+ * Cehck about Valid date, like 2016-07-20 or digit
1411
  *
1412
  * @param string $value
1413
  * @return string or int
1452
  }
1453
 
1454
 
1455
+ /**
1456
+ * Clean user string for using in SQL LIKE statement - append to LIKE sql
1457
  *
1458
  * @param string $value - to clean
1459
  * @return string - escaped
1492
  }
1493
 
1494
 
1495
+ /**
1496
+ * Clean string for using in SQL LIKE requests inside single quotes: WHERE title LIKE '%". $escaped_search_title ."%'
1497
  * Replaced _ to \_ % to \% \ to \\
1498
  * @param string $value - to clean
1499
  * @return string - escaped
1534
  }
1535
 
1536
 
1537
+ /**
1538
+ * Escape string from SQL for the HTML form field
1539
  *
1540
  * @param string $value
1541
  * @return string
1555
  global $wpdb;
1556
 
1557
  $value_trimmed = trim( stripslashes( $value ) );
1558
+
1559
+ //FixIn: 8.0.2.10 //Fix for update of WP 4.8.3
1560
+ if ( method_exists( $wpdb, 'remove_placeholder_escape' ) )
1561
+ $esc_sql_value = $wpdb->remove_placeholder_escape( esc_sql( $value_trimmed ) );
1562
+ else
1563
+ $esc_sql_value = esc_sql( $value_trimmed );
1564
+
1565
  //$value = trim( $wpdb->prepare( "'%s'", $esc_sql_value ) , "'" );
1566
 
1567
  $esc_sql_value = trim( stripslashes( $esc_sql_value ) );
1621
 
1622
 
1623
 
1624
+ /**
1625
+ * Check if this demo website
1626
  *
1627
  * @return bool
1628
  */
2000
  }
2001
 
2002
 
2003
+ /**
2004
+ * Check if Current User have specific Role
2005
  *
2006
  * @return bool Whether the current user has the given capability.
2007
  */
2039
  add_bk_filter('wpbc_get_user_ip', 'wpbc_get_user_ip');
2040
 
2041
 
2042
+ /**
2043
+ * Transform the REQESTS parameters (GET and POST) into URL
2044
  *
2045
  * @param type $page_param
2046
  * @param array $exclude_params
2047
  * @param type $only_these_parameters
2048
  * @return type
2049
  */
2050
+ function wpbc_get_params_in_url( $page_param , $exclude_params = array(), $only_these_parameters = false, $is_escape_url = true, $only_get = false ){ //FixIn: 8.0.1.101 //Fix: $is_escape_url = false
2051
 
2052
  $exclude_params[] = 'page';
2053
  $exclude_params[] = 'post_type';
2131
  }
2132
 
2133
 
2134
+ /**
2135
+ * Show "Saved Changes" message at the top of settings page.
2136
  *
2137
  */
2138
  function wpbc_show_changes_saved_message() {
2140
  }
2141
 
2142
 
2143
+ /**
2144
+ * Show Message at Top of Admin Pages
2145
  *
2146
  * @param type $message - mesage to show
2147
  * @param type $time_to_show - number of seconds to show, if 0 or skiped, then unlimited time.
2170
  }
2171
 
2172
 
2173
+ /**
2174
+ * Escape and prepare message to show it
2175
  *
2176
  * @param type $message - message
2177
  * @param type $message_type - Default: updated { updated | error | notice }
2198
  }
2199
 
2200
 
2201
+ /**
2202
+ * Show system info in settings page
2203
  *
2204
  * @param string $message ...
2205
  * @param string $message_type 'info' | 'warning' | 'error'
2265
  ////////////////////////////////////////////////////////////////////////////////
2266
  // P a g i n a t i o n o f T a b l e L i s t i n g ///////////////
2267
  ////////////////////////////////////////////////////////////////////////////////
2268
+ /**
2269
+ * Show P a g i n a t i o n
2270
  *
2271
  * @param int $summ_number_of_items - total number of items
2272
  * @param int $active_page_num - number of activated page
2416
  }
2417
 
2418
 
2419
+ /**
2420
+ * Redirect browser to a specific page
2421
  *
2422
  * @param string $url - URL of page to redirect
2423
  */
2436
  }
2437
 
2438
 
2439
+ /**
2440
+ * Show Welcome Panel with links
2441
  *
2442
  * @global type $wpbc_Dismiss
2443
  */
2599
  }
2600
 
2601
 
2602
+ /**
2603
+ * Content of Welcome Panel with links
2604
  *
2605
  */
2606
  function wpbc_welcome_panel_content() {
2685
  </div>
2686
  <div class="welcome-icon welcome-widgets-menus" style="text-align:right;font-style:italic;"><?php
2687
  printf( __( 'Need even more functionality? Check %s higher versions %s','booking'),
2688
+ '<a href="http://wpbookingcalendar.com/overview/" target="_blank">',
2689
  '</a>'
2690
  ); ?>
2691
  </div>
2700
  }
2701
 
2702
 
2703
+ /**
2704
+ * Load transaltion POT file, and generate PHP file with all translations relative to plugin.
2705
  * Link: http://server.com/wp-admin/admin.php?page=wpbc-settings&system_info=show&pot=1#wpbc_general_settings_system_info_metabox
2706
  */
2707
  function wpbc_pot_to_php() {
2792
 
2793
 
2794
 
2795
+ /**
2796
+ * Show System Info (status) at Booking > Settings General page
2797
  * Link: http://server.com/wp-admin/admin.php?page=wpbc-settings&system_info=show#wpbc_general_settings_system_info_metabox
2798
  */
2799
  function wpbc_system_info() {
2994
  // Support functions for MU version
2995
  ////////////////////////////////////////////////////////////////////////////////
2996
 
2997
+ /**
2998
+ * Set active User Environment in MultiUser version, depend from owner of booking resource
2999
  *
3000
  * @param int $previous_active_user (default=-1) - blank parameter
3001
  * @param int $bktype - booking resource ID for checking
3027
  add_bk_filter('wpbc_mu_set_environment_for_owner_of_resource', 'wpbc_mu_set_environment_for_owner_of_resource');
3028
 
3029
 
3030
+ /**
3031
+ * Set environment for this user in MU version
3032
  *
3033
  * @param int $previous_active_user - ID of user
3034
  * Usage:
3048
  ////////////////////////////////////////////////////////////////////////////////
3049
  // Support functions in BS
3050
  ////////////////////////////////////////////////////////////////////////////////
3051
+ /**
3052
+ * Format booking cost with a currency symbol.
3053
  * In MultiUser version also checking about specific currency that belong to specific WordPress user.
3054
  * This checking based on belonging specific booking resource to specific user.
3055
  *
3076
 
3077
 
3078
 
3079
+ /**
3080
+ * Get currency Symbol.
3081
  * In MultiUser version also checking about specific currency that belong to specific WordPress user.
3082
  * This checking based on belonging specific booking resource to specific user.
3083
  *
3102
 
3103
 
3104
 
3105
+ /**
3106
+ * Check if "Booking Manager" installed/activated and return version number
3107
  *
3108
  * @return string - 0 if not installed, otherwise version num
3109
  */
core/wpbc-include.php CHANGED
@@ -60,7 +60,8 @@ require_once( WPBC_PLUGIN_DIR . '/core/admin/page-settings.php' );
60
  if ( file_exists( WPBC_PLUGIN_DIR.'/inc/_ps/personal.php' ) ){
61
  require_once WPBC_PLUGIN_DIR . '/inc/_ps/personal.php';
62
  } else {
63
- require_once( WPBC_PLUGIN_DIR . '/core/admin/page-form-free.php' ); // Fields
 
64
  require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-new-admin.php' ); // Email - New admin.
65
  require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-new-visitor.php' ); // Email - New visitor
66
  require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-approved.php' ); // Email - Approved
60
  if ( file_exists( WPBC_PLUGIN_DIR.'/inc/_ps/personal.php' ) ){
61
  require_once WPBC_PLUGIN_DIR . '/inc/_ps/personal.php';
62
  } else {
63
+ require_once( WPBC_PLUGIN_DIR . '/core/admin/page-up.php' ); // Up //FixIn: 8.0.1.6
64
+ require_once( WPBC_PLUGIN_DIR . '/core/admin/page-form-free.php' ); // Fields
65
  require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-new-admin.php' ); // Email - New admin.
66
  require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-new-visitor.php' ); // Email - New visitor
67
  require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-approved.php' ); // Email - Approved
core/wpbc-js.php CHANGED
@@ -28,7 +28,8 @@ class WPBC_JS extends WPBC_JS_CSS {
28
  */
29
  }
30
 
31
- /** Enqueue Files and Varibales.
 
32
  * Useful in case, if we use get_options and current user functions...
33
  *
34
  * @param type $where_to_load
@@ -50,7 +51,8 @@ class WPBC_JS extends WPBC_JS_CSS {
50
  do_action( 'wpbc_enqueue_js_files', $where_to_load );
51
  }
52
 
53
- /** Deregister some conflict scripts from other plugins.
 
54
  *
55
  * @param type $where_to_load
56
  */
@@ -251,7 +253,8 @@ function wpbc_load_calendar_localization_file() {
251
  }*/
252
 
253
 
254
- /** Get URL Datepicker Localization JS File
 
255
  *
256
  * @return string - URL to calendar skin
257
  */
@@ -282,7 +285,8 @@ function wpbc_get_calendar_localization_url() {
282
  }
283
 
284
 
285
- /** Get Registred jQuery version
 
286
  *
287
  * @global type $wp_scripts
288
  * @return string - jQuery version
@@ -299,7 +303,8 @@ function wpbc_get_registered_jquery_version() {
299
  }
300
 
301
 
302
- /** Check if we activated loading of JS/CSS only on specific pages and then load or no it
 
303
  *
304
  * @param boolean $is_load_scripts - Default: true
305
  * @return boolean - true | false
@@ -332,3 +337,15 @@ function wpbc_is_load_css_js_on_client_page( $is_load_scripts ) {
332
  return true;
333
  }
334
  add_filter( 'wpbc_is_load_script_on_this_page', 'wpbc_is_load_css_js_on_client_page' );
 
 
 
 
 
 
 
 
 
 
 
 
28
  */
29
  }
30
 
31
+ /**
32
+ * Enqueue Files and Varibales.
33
  * Useful in case, if we use get_options and current user functions...
34
  *
35
  * @param type $where_to_load
51
  do_action( 'wpbc_enqueue_js_files', $where_to_load );
52
  }
53
 
54
+ /**
55
+ * Deregister some conflict scripts from other plugins.
56
  *
57
  * @param type $where_to_load
58
  */
253
  }*/
254
 
255
 
256
+ /**
257
+ * Get URL Datepicker Localization JS File
258
  *
259
  * @return string - URL to calendar skin
260
  */
285
  }
286
 
287
 
288
+ /**
289
+ * Get Registred jQuery version
290
  *
291
  * @global type $wp_scripts
292
  * @return string - jQuery version
303
  }
304
 
305
 
306
+ /**
307
+ * Check if we activated loading of JS/CSS only on specific pages and then load or no it
308
  *
309
  * @param boolean $is_load_scripts - Default: true
310
  * @return boolean - true | false
337
  return true;
338
  }
339
  add_filter( 'wpbc_is_load_script_on_this_page', 'wpbc_is_load_css_js_on_client_page' );
340
+
341
+
342
+ //FixIn: 8.0.1.2
343
+ /**
344
+ * Force to load jquery-migrate in case, if we do not know Thank you. version of jQuery which was loaded.
345
+ */
346
+ function wpbc_jquery_unknown_force_jquery_migrate(){
347
+ $schema = is_ssl() ? 'https://' : 'http://'; // set_url_scheme() is not defined yet //FixIn: 7.2.1.4
348
+ wp_register_script('jquery-migrate', $schema . 'code.jquery.com/jquery-migrate-1.0.0.js', false, '1.0.0' );
349
+ wp_enqueue_script( 'jquery-migrate' );
350
+ }
351
+ add_action( 'wpbc_jquery_unknown', 'wpbc_jquery_unknown_force_jquery_migrate' );
core/wpbc-translation.php CHANGED
@@ -22,7 +22,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
22
  // use the override_load_textdomain filter to load your text domains manually.
23
  // apply_filters( 'override_load_textdomain', bool $override, string $domain, string $mofile )
24
 
25
- /** Check text for active language section
 
26
  *
27
  * @param string $content_orig
28
  * @return string
@@ -64,7 +65,8 @@ function wpdev_check_for_active_language($content_orig){
64
  }
65
 
66
 
67
- /** Register and Translate everything in [wpml]Some Text to translate[/wpml] tags.
 
68
  *
69
  * @param string $text
70
  * @param string $locale
@@ -164,7 +166,8 @@ function wpbc_load_translation(){
164
  }
165
 
166
 
167
- /** Overload loading of plugin transaltion files from "wp-content/plugins/languages" -> "wp-content/plugins/plugin_name/languages"
 
168
  *
169
  * W:\home\beta\www/wp-content/languages/plugins/booking-it_IT.mo -> W:\home\beta\www\wp-content\plugins\booking/languages/booking-it_IT.mo
170
  *
@@ -252,7 +255,8 @@ function wpbc_recheck_plugin_locale( $locale, $plugin_domain ) {
252
  }
253
  add_filter( 'plugin_locale', 'wpbc_recheck_plugin_locale', 100, 2 ); // When load_plugin_text_domain is work, its get def locale and not that, we send to it so need to reupdate it
254
 
255
- /** Get help rows about configuration in_several languges
 
256
  *
257
  * @return array - each item of array is text row for showing.
258
  */
22
  // use the override_load_textdomain filter to load your text domains manually.
23
  // apply_filters( 'override_load_textdomain', bool $override, string $domain, string $mofile )
24
 
25
+ /**
26
+ * Check text for active language section
27
  *
28
  * @param string $content_orig
29
  * @return string
65
  }
66
 
67
 
68
+ /**
69
+ * Register and Translate everything in [wpml]Some Text to translate[/wpml] tags.
70
  *
71
  * @param string $text
72
  * @param string $locale
166
  }
167
 
168
 
169
+ /**
170
+ * Overload loading of plugin transaltion files from "wp-content/plugins/languages" -> "wp-content/plugins/plugin_name/languages"
171
  *
172
  * W:\home\beta\www/wp-content/languages/plugins/booking-it_IT.mo -> W:\home\beta\www\wp-content\plugins\booking/languages/booking-it_IT.mo
173
  *
255
  }
256
  add_filter( 'plugin_locale', 'wpbc_recheck_plugin_locale', 100, 2 ); // When load_plugin_text_domain is work, its get def locale and not that, we send to it so need to reupdate it
257
 
258
+ /**
259
+ * Get help rows about configuration in_several languges
260
  *
261
  * @return array - each item of array is text row for showing.
262
  */
core/wpbc.php CHANGED
@@ -91,30 +91,30 @@ public static function init() {
91
 
92
  /** Define Admin Menu items */
93
  public function define_admin_menu(){
94
-
95
  $update_count = wpbc_get_number_new_bookings();
96
 
97
- $title = __('Booking', 'booking'); //'&#223;<span style="font-size:0.75em;">&#920;&#920;</span>&kgreen;&imath;&eng;'; // __('Booking', 'booking')
98
  $is_user_activated = apply_bk_filter('multiuser_is_current_user_active', true ); //FixIn: 6.0.1.17
99
 
100
  if ( ( $update_count > 0 ) && ( $is_user_activated ) ) {
101
  $update_count_title = "<span class='update-plugins count-$update_count' title=''><span class='update-count bk-update-count'>" . number_format_i18n($update_count) . "</span></span>" ;
102
  $title .= $update_count_title;
103
  }
104
-
105
-
106
  //global $menu;
107
  //if ( current_user_can( ) ) {
108
  //$menu[] = array( '', 'read', 'separator-wpbc', '', 'wp-menu-separator wpbc' );
109
  //}
110
- // debuge($menu);
111
-
112
  $booking_menu_position = get_bk_option( 'booking_menu_position' );
113
  switch ( $booking_menu_position ) {
114
  case 'top':
115
  $booking_menu_position = 3.3;
116
  break;
117
- case 'middle':
118
  global $_wp_last_object_menu; // The index of the last top-level menu in the object menu group
119
  $_wp_last_object_menu++;
120
  $booking_menu_position = $_wp_last_object_menu; // 58.9;
@@ -126,19 +126,19 @@ public function define_admin_menu(){
126
  $booking_menu_position = 3.3;
127
  break;
128
  }
129
-
130
-
131
- self::$instance->admin_menu['master'] = new WPBC_Admin_Menus(
132
  'wpbc' , array (
133
- 'in_menu' => 'root'
134
- , 'mune_icon_url' => '/assets/img/icon-16x16.png'
135
  , 'menu_title' => $title
136
  , 'menu_title_second' => __('Bookings', 'booking')
137
  , 'page_header' => __('Bookings Listing','booking')
138
- , 'browser_header' => __('Bookings Listing', 'booking') . ' - ' . __('Booking Calendar', 'booking')
139
  , 'user_role' => get_bk_option( 'booking_user_role_booking' )
140
  , 'position' => $booking_menu_position // 3.3 - top //( 58.9 ) // - middle
141
- /*
142
  (Optional). Positions for Core Menu Items
143
  2 Dashboard
144
  4 Separator
@@ -156,46 +156,66 @@ public function define_admin_menu(){
156
  99 Separator
157
  */
158
  )
159
-
160
  );
161
-
162
- self::$instance->admin_menu['new'] = new WPBC_Admin_Menus(
163
  'wpbc-new' , array (
164
- 'in_menu' => 'wpbc'
165
  , 'menu_title' => ucwords( __('Add booking', 'booking') )
166
  , 'page_header' => ucwords( __('Add booking','booking') )
167
- , 'browser_header'=> ucwords( __('Add booking', 'booking') ) . ' - ' . __('Booking Calendar', 'booking')
168
- , 'user_role' => get_bk_option( 'booking_user_role_addbooking' )
169
  )
170
  );
171
 
172
  if ( class_exists( 'wpdev_bk_personal' ) )
173
- self::$instance->admin_menu['resources'] = new WPBC_Admin_Menus(
174
  'wpbc-resources' , array (
175
- 'in_menu' => 'wpbc'
176
  , 'menu_title' => __('Resources', 'booking')
177
  , 'page_header' => ucwords( __('Booking resources','booking') )
178
- , 'browser_header'=> __('Resources', 'booking') . ' - ' . __('Booking Calendar', 'booking')
179
- , 'user_role' => get_bk_option( 'booking_user_role_resources' )
180
  )
181
  );
182
 
183
 
184
- self::$instance->admin_menu['settings'] = new WPBC_Admin_Menus(
185
  'wpbc-settings' , array (
186
- 'in_menu' => 'wpbc'
187
  , 'menu_title' => __('Settings', 'booking')
188
  , 'page_header' => __('General Settings','booking')
189
- , 'browser_header'=> __('Settings', 'booking') . ' - ' . __('Booking Calendar', 'booking')
190
  , 'user_role' => get_bk_option( 'booking_user_role_settings' )
191
  )
192
- );
193
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  }
195
 
196
 
197
 
198
- /** Get Menu Object
 
199
  *
200
  * @param type - menu type
201
  * @return boolean
91
 
92
  /** Define Admin Menu items */
93
  public function define_admin_menu(){
94
+
95
  $update_count = wpbc_get_number_new_bookings();
96
 
97
+ $title = __('Booking', 'booking'); //'&#223;<span style="font-size:0.75em;">&#920;&#920;</span>&kgreen;&imath;&eng;'; // __('Booking', 'booking')
98
  $is_user_activated = apply_bk_filter('multiuser_is_current_user_active', true ); //FixIn: 6.0.1.17
99
 
100
  if ( ( $update_count > 0 ) && ( $is_user_activated ) ) {
101
  $update_count_title = "<span class='update-plugins count-$update_count' title=''><span class='update-count bk-update-count'>" . number_format_i18n($update_count) . "</span></span>" ;
102
  $title .= $update_count_title;
103
  }
104
+
105
+
106
  //global $menu;
107
  //if ( current_user_can( ) ) {
108
  //$menu[] = array( '', 'read', 'separator-wpbc', '', 'wp-menu-separator wpbc' );
109
  //}
110
+ // debuge($menu);
111
+
112
  $booking_menu_position = get_bk_option( 'booking_menu_position' );
113
  switch ( $booking_menu_position ) {
114
  case 'top':
115
  $booking_menu_position = 3.3;
116
  break;
117
+ case 'middle':
118
  global $_wp_last_object_menu; // The index of the last top-level menu in the object menu group
119
  $_wp_last_object_menu++;
120
  $booking_menu_position = $_wp_last_object_menu; // 58.9;
126
  $booking_menu_position = 3.3;
127
  break;
128
  }
129
+
130
+
131
+ self::$instance->admin_menu['master'] = new WPBC_Admin_Menus(
132
  'wpbc' , array (
133
+ 'in_menu' => 'root'
134
+ , 'mune_icon_url' => '/assets/img/icon-16x16.png'
135
  , 'menu_title' => $title
136
  , 'menu_title_second' => __('Bookings', 'booking')
137
  , 'page_header' => __('Bookings Listing','booking')
138
+ , 'browser_header' => __('Bookings Listing', 'booking') . ' - ' . __('Booking Calendar', 'booking')
139
  , 'user_role' => get_bk_option( 'booking_user_role_booking' )
140
  , 'position' => $booking_menu_position // 3.3 - top //( 58.9 ) // - middle
141
+ /*
142
  (Optional). Positions for Core Menu Items
143
  2 Dashboard
144
  4 Separator
156
  99 Separator
157
  */
158
  )
159
+
160
  );
161
+
162
+ self::$instance->admin_menu['new'] = new WPBC_Admin_Menus(
163
  'wpbc-new' , array (
164
+ 'in_menu' => 'wpbc'
165
  , 'menu_title' => ucwords( __('Add booking', 'booking') )
166
  , 'page_header' => ucwords( __('Add booking','booking') )
167
+ , 'browser_header'=> ucwords( __('Add booking', 'booking') ) . ' - ' . __('Booking Calendar', 'booking')
168
+ , 'user_role' => get_bk_option( 'booking_user_role_addbooking' )
169
  )
170
  );
171
 
172
  if ( class_exists( 'wpdev_bk_personal' ) )
173
+ self::$instance->admin_menu['resources'] = new WPBC_Admin_Menus(
174
  'wpbc-resources' , array (
175
+ 'in_menu' => 'wpbc'
176
  , 'menu_title' => __('Resources', 'booking')
177
  , 'page_header' => ucwords( __('Booking resources','booking') )
178
+ , 'browser_header'=> __('Resources', 'booking') . ' - ' . __('Booking Calendar', 'booking')
179
+ , 'user_role' => get_bk_option( 'booking_user_role_resources' )
180
  )
181
  );
182
 
183
 
184
+ self::$instance->admin_menu['settings'] = new WPBC_Admin_Menus(
185
  'wpbc-settings' , array (
186
+ 'in_menu' => 'wpbc'
187
  , 'menu_title' => __('Settings', 'booking')
188
  , 'page_header' => __('General Settings','booking')
189
+ , 'browser_header'=> __('Settings', 'booking') . ' - ' . __('Booking Calendar', 'booking')
190
  , 'user_role' => get_bk_option( 'booking_user_role_settings' )
191
  )
192
+ );
193
+
194
+
195
+ //FixIn: 8.0.1.6
196
+ if ( ! class_exists( 'wpdev_bk_personal' ) ) {
197
+
198
+ $is_show_this_menu = get_bk_option('booking_menu_go_pro');
199
+
200
+ if ( 'hide' !== $is_show_this_menu )
201
+ self::$instance->admin_menu['go_pro'] = new WPBC_Admin_Menus(
202
+ 'wpbc-go-pro' , array (
203
+ 'in_menu' => 'wpbc'
204
+ , 'menu_title' => __('Premium', 'booking')
205
+ , 'page_header' => ucwords( sprintf( __( 'Need even more functionality? Check %s higher versions %s','booking'), '', '' ) )
206
+ , 'browser_header'=> 'Booking Calendar'
207
+ , 'user_role' => get_bk_option( 'booking_user_role_booking' )
208
+ )
209
+ );
210
+ }
211
+
212
+
213
  }
214
 
215
 
216
 
217
+ /**
218
+ * Get Menu Object
219
  *
220
  * @param type - menu type
221
  * @return boolean
css/admin-skin.css ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* FixIn: 8.0.2.5 */
2
+ #wh_booking_type,
3
+ .chzn-container-multi,
4
+ .chzn-container-multi .chzn-choices,
5
+ .wpdevelop .btn-group,
6
+ .wpdevelop .btn-group-vertical {
7
+ box-shadow: none !important;
8
+ border-color: #d8d8d8 !important;
9
+ }
10
+ .chzn-container-multi .chzn-choices .search-choice {
11
+ margin: 3px 0 0px 5px;
12
+ padding: 2px 20px 1px 5px;
13
+ border-color: #d5d5d5;
14
+ }
15
+ .wpdevelop .input-group .dropdown-menu-text-element .form-control {
16
+ border-radius: 4px;
17
+ -moz-border-radius: 4px;
18
+ -webkit-border-radius: 4px;
19
+ }
20
+ /* Border Color and Shadow */
21
+ .wpdevelop .button:not([class*="button-primary"]),
22
+ .wpdevelop .control-group .btn-toolbar .btn-group > .button:not([class*="button-primary"]),
23
+ .wpdevelop .control-group .btn-toolbar .btn-group > input[type=text],
24
+ .wpdevelop .control-group .btn-toolbar .btn-group > select,
25
+ .wpdevelop .control-group .btn-toolbar .input-group > .input-group-btn .button,
26
+ .wpdevelop .control-group .btn-toolbar .input-group .input-group-btn .button,
27
+ .wpdevelop .control-group .btn-toolbar .input-group > select,
28
+ .wpdevelop .control-group .btn-toolbar .input-group > input[type='text'],
29
+ .wpdevelop .control-group .btn-toolbar .input-group > .input-group-addon {
30
+ border: 1px solid #d8d8d8;
31
+ }
32
+ .wpdevelop .button,
33
+ .wpdevelop .control-group .btn-toolbar .btn-group > .button,
34
+ .wpdevelop .control-group .btn-toolbar .btn-group > input[type=text],
35
+ .wpdevelop .control-group .btn-toolbar .btn-group > select,
36
+ .wpdevelop .control-group .btn-toolbar .input-group > .input-group-btn .button,
37
+ .wpdevelop .control-group .btn-toolbar .input-group .input-group-btn .button,
38
+ .wpdevelop .control-group .btn-toolbar .input-group > select,
39
+ .wpdevelop .control-group .btn-toolbar .input-group > input[type='text'],
40
+ .wpdevelop .control-group .btn-toolbar .input-group > .input-group-addon {
41
+ box-shadow: 0 1px 0px #f1f1f1;
42
+ }
43
+ .wp-core-ui .wpdevelop .control-group .button-secondary:focus,
44
+ .wp-core-ui .wpdevelop .control-group .wpdevelop .button-secondary:hover,
45
+ .wp-core-ui .wpdevelop .control-group .button.focus,
46
+ .wp-core-ui .wpdevelop .control-group .button.hover:not([class*="button-primary"]),
47
+ .wp-core-ui .wpdevelop .control-group .button:focus,
48
+ .wp-core-ui .wpdevelop .control-group .button:hover:not([class*="button-primary"]) {
49
+ border-color: #d8d8d8;
50
+ }
51
+
52
+ /* Margin */
53
+ .wpdevelop .input-group .dropdown-menu-text-element-count-1 .form-control,
54
+ .wpdevelop .input-group .form-control,
55
+ .wpdevelop .control-group .btn-toolbar .btn-group > .button,
56
+ .wpdevelop .control-group .btn-toolbar .btn-group > select,
57
+ .wpdevelop .control-group .btn-toolbar .btn-group > input[type=text],
58
+ .wpdevelop .control-group .btn-toolbar .btn-group > .button,
59
+ .wpdevelop .control-group .btn-toolbar .input-group > .input-group-btn .button,
60
+ .wpdevelop .control-group .btn-toolbar .input-group > .input-group-addon,
61
+ /*.wpdevelop .control-group .btn-toolbar .input-group > .input-group-btn .button,*/
62
+ /*.wpdevelop .control-group .btn-toolbar .input-group > .input-group-btn .button,*/
63
+ /*.wpdevelop .control-group .btn-toolbar .input-group .input-group-btn .button,*/
64
+ .wpdevelop .control-group .btn-toolbar .input-group > select,
65
+ .wpdevelop .control-group .btn-toolbar .input-group > input[type='text'] {
66
+ margin:0 0 0 -2px !important;
67
+ }
68
+ .wpdevelop .btn-group-vertical > .button + .button,
69
+ .wpdevelop .btn-group-vertical > .button + .btn-group,
70
+ .wpdevelop .btn-group-vertical > .btn-group + .button,
71
+ .wpdevelop .btn-group-vertical > .btn-group + .btn-group{
72
+ margin-top: -2px;
73
+ }
74
+ /* In Dropdown lists buttons */
75
+ .wpdevelop .dropdown-menu > li .btn-group .button {
76
+ font-size: 14px;
77
+ line-height: 15px;
78
+ }
79
+ .wpdevelop .dropdown-menu li .btn-toolbar .input-group.text-group .dropdown-menu-text-element {
80
+ width:100%;
81
+ }
82
+ /* Booking Listing */
83
+ .wpbc-listing-header,
84
+ .wpbc-listing-row,
85
+ /* Toolbar (sub tab) border */
86
+ .wpdvlp-sub-tabs,
87
+ .wpdvlp-top-tabs .nav-tabs,
88
+ .wpdevelop .visibility_container .tab-bottom {
89
+ border-color:#d5d5d5;
90
+ }
91
+ /* Dates */
92
+ .wpbc-listing-collumn.field-dates .field-booking-date,
93
+ .wpbc-listing-collumn.field-dates .field-booking-date:hover,
94
+ /* Labels */
95
+ .wpbc-listing-collumn .label,
96
+ .wpbc_resources_table .label,
97
+ /* TimeLine Popover Labels */
98
+ .wpdevelop .popover-content .wpbc-popover-content-data.wpbc-listing-collumn .field-dates .field-booking-date,
99
+ .wpdevelop .popover-content .wpbc-popover-content-data.wpbc-listing-collumn .field-dates .field-booking-date:hover,
100
+ .wpdevelop .popover-content .wpbc-popover-content-data.wpbc-listing-collumn .field-labels span.label,
101
+ .wpdevelop .popover-content .wpbc-popover-content-data.wpbc-listing-collumn .field-id span.label {
102
+ border: 0;
103
+ box-shadow: 0 0 1px #ddd;
104
+ padding: 5px 10px;
105
+ white-space: nowrap;
106
+ line-height: 2.8em;
107
+ margin-right: 3px;
108
+ font-size: 11px;
109
+ border-radius: .2em;
110
+ }
111
+ /* TimeLine Popover Labels - ID */
112
+ .wpdevelop .popover-content .wpbc-popover-content-data.wpbc-listing-collumn .field-id span.label {
113
+ border-radius: 0.9em;
114
+ line-height: 3em;
115
+ }
116
+ .wpdevelop .popover-content .wpbc-popover-content-data.wpbc-listing-collumn .field-dates .field-booking-date,
117
+ .wpdevelop .popover-content .wpbc-popover-content-data.wpbc-listing-collumn .field-dates .field-booking-date:hover,
118
+ .wpdevelop .popover-content .wpbc-popover-content-data.wpbc-listing-collumn .field-labels span.label {
119
+ font-weight:400;
120
+ text-shadow: none;
121
+ font-size: 12px;
122
+ }
123
+ /* Dates */
124
+ .wpbc-listing-collumn.field-dates .field-booking-date,
125
+ .wpbc-listing-collumn.field-dates .field-booking-date:hover {
126
+ font-size: 12px;
127
+ }
128
+ /* Booking Listing page */
129
+ /* Selected row */
130
+ .wpdevelop.wpbc_resources_table table > tbody > tr.row_selected_color > th,
131
+ .wpdevelop.wpbc_resources_table table > tbody > tr.row_selected_color > td,
132
+ .wpbc-listing-row.row.row_selected_color {
133
+ /*background: #f9f9e7;*/
134
+ /*background: #ffffeb;*/
135
+ /*border-color: #d2d2d2 !important;*/
136
+ background: transparent;
137
+ border-color: #d2d2d2 !important;
138
+ border-left: 4px solid #08a !important;
139
+ }
140
+ .wpdevelop.wpbc_resources_table table > tbody > tr.row_selected_color > td{
141
+ border-left: 0px solid #d2d2d2 !important;
142
+ }
143
+ /* "Content of booking fields data" in booking listing */
144
+ .wpbc-listing-collumn .fieldvalue{
145
+ padding: 4px 5px;
146
+ line-height: 2.3em;
147
+ }
148
+ /* Cehckbox for Selection */
149
+ .wpbc_page .wpdevelop .wpbc-listing-collumn.col-sm-2 .field-checkbox input[type="checkbox"],
150
+ .wpbc_page .wpdevelop .wpbc-listing-collumn.col-sm-3 .field-checkbox input[type="checkbox"] {
151
+ margin-top:7px;
152
+ }
css/admin.css CHANGED
@@ -9,7 +9,18 @@
9
  *
10
  * @modified 2015-04-11
11
  */
12
-
 
 
 
 
 
 
 
 
 
 
 
13
  #wpbc-admin-page.wpbc_page {} /* Booking Listing & Timeline */
14
  #wpbc-new-admin-page.wpbc_page {} /* Add New Booking */
15
  #wpbc-resources-admin-page.wpbc_page {} * /* Resources */
9
  *
10
  * @modified 2015-04-11
11
  */
12
+
13
+
14
+ /* Top level menu for WPBC */
15
+ #adminmenu #toplevel_page_wpbc .wp-submenu li:nth-child(5) a {
16
+ border-top: 1px solid #444;
17
+ padding-top: 10px;
18
+ margin-top: 6px;
19
+
20
+ font-weight: 600;
21
+ font-size: 0.9em;
22
+ /* color: #a4d526; */
23
+ }
24
  #wpbc-admin-page.wpbc_page {} /* Booking Listing & Timeline */
25
  #wpbc-new-admin-page.wpbc_page {} /* Add New Booking */
26
  #wpbc-resources-admin-page.wpbc_page {} * /* Resources */
css/client.css CHANGED
@@ -9,7 +9,72 @@
9
  *
10
  * @modified 2016-02-14
11
  */
 
 
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  /* Booking form General structure */
14
  form.booking_form {
15
  text-align: left;
@@ -401,4 +466,12 @@ form.booking_form {
401
  height: 36px; /* FixIn: 7.2.0.2 */
402
  padding: 4px 8px;
403
  }
 
 
 
 
 
 
 
 
404
  }
9
  *
10
  * @modified 2016-02-14
11
  */
12
+ /* Booking form structure //FixIn: 8.0.1.5 */
13
+ .wpbc_booking_form_structure {
14
 
15
+ }
16
+ .wpbc_booking_form_structure .wpbc_structure_calendar {
17
+
18
+ }
19
+ .wpbc_booking_form_structure .wpbc_structure_form {
20
+
21
+ }
22
+ /* form_center */
23
+ .wpbc_booking_form_structure.wpbc_form_center {
24
+ width:100%;
25
+ }
26
+ .wpbc_booking_form_structure.wpbc_form_center .wpbc_structure_calendar,
27
+ .wpbc_booking_form_structure.wpbc_form_center .wpbc_structure_form {
28
+ margin:1px auto;
29
+ width:290px;
30
+ }
31
+ /* form_dark */
32
+ .wpbc_booking_form_structure.wpbc_form_dark .wpbc_structure_form label{
33
+ color:#ddd;
34
+ }
35
+ .wpbc_booking_form_structure.wpbc_form_dark .wpbc_structure_form input[type="text"],
36
+ .wpbc_booking_form_structure.wpbc_form_dark .wpbc_structure_form textarea,
37
+ .wpbc_booking_form_structure.wpbc_form_dark .wpbc_structure_form select{
38
+ color:#000;
39
+ }
40
+ /* form_right */
41
+ .wpbc_booking_form_structure.wpbc_form_right {
42
+ width:100%;
43
+ }
44
+ .wpbc_booking_form_structure.wpbc_form_right .wpbc_structure_calendar {
45
+ float:left;
46
+ margin-right:20px;
47
+ }
48
+ .wpbc_booking_form_structure.wpbc_form_right .wpbc_structure_form {
49
+ float:left;
50
+ margin-top:-20px;
51
+ }
52
+ /* form footer */
53
+ .wpbc_booking_form_footer {
54
+ clear:both;
55
+ width:100%;
56
+ }
57
+ /*
58
+ .wpbc_booking_form_structure.wpbc_wizard .wpbc-form-header-section{
59
+ padding: 0.8em 1em;
60
+ font-weight: 400;
61
+ font-size: 0.9em;
62
+ font-style: italic;
63
+ background: #f9f9f9;
64
+ box-shadow: none;
65
+ }
66
+ .wpbc_booking_form_structure.wpbc_wizard .wpbc-form-btn-section {
67
+ padding:20px 0;
68
+ }
69
+ .wpbc_booking_form_structure.wpbc_wizard .wpbc-form-btn-section .wpbc_wizard_btn{
70
+
71
+ }
72
+ .wpbc_booking_form_structure.wpbc_wizard .wpbc_structure_calendar,
73
+ .wpbc_booking_form_structure.wpbc_wizard .wpbc_structure_form,
74
+ .wpbc_booking_form_structure.wpbc_wizard .wpbc_structure_submit {
75
+ display: block;
76
+ }
77
+ */
78
  /* Booking form General structure */
79
  form.booking_form {
80
  text-align: left;
466
  height: 36px; /* FixIn: 7.2.0.2 */
467
  padding: 4px 8px;
468
  }
469
+ /* //FixIn: 8.0.1.5 */
470
+ .wpbc_booking_form_structure.wpbc_form_right,
471
+ .wpbc_booking_form_structure.wpbc_form_right .wpbc_structure_calendar,
472
+ .wpbc_booking_form_structure.wpbc_form_right .wpbc_structure_form {
473
+ width: 100%;
474
+ float: none;
475
+ margin: 0px;
476
+ }
477
  }
js/admin.js CHANGED
@@ -12,7 +12,8 @@
12
  */
13
 
14
 
15
- /** Set Booking listing row as R e a d
 
16
  *
17
  * @param {type} booking_id
18
  * @returns {undefined}
@@ -27,7 +28,8 @@ function set_booking_row_read(booking_id){
27
  }
28
  }
29
 
30
- /** Set Booking listing row as U n R e a d
 
31
  *
32
  * @param {type} booking_id
33
  * @returns {undefined}
@@ -38,7 +40,8 @@ function set_booking_row_unread(booking_id){
38
  }
39
 
40
 
41
- /** Increase counter about new bookings
 
42
  *
43
  * @returns {undefined}
44
  */
@@ -48,7 +51,8 @@ function increase_new_counter () {
48
  jQuery('.bk-update-count').html(my_num);
49
  }
50
 
51
- /** Decrease counter about new bookings
 
52
  *
53
  * @returns {undefined}
54
  */
@@ -61,7 +65,8 @@ function decrese_new_counter () {
61
  }
62
 
63
 
64
- /** Functions for the TimeLine
 
65
  *
66
  * @param {type} booking_id
67
  * @returns {undefined}
@@ -537,7 +542,8 @@ function wpbc_import_gcal_events( us_id
537
 
538
 
539
 
540
- /** Selections of several checkboxes like in gMail with shift :)
 
541
  * Need to have this structure:
542
  * .wpbc_selectable_table
543
  * .wpbc_selectable_head
12
  */
13
 
14
 
15
+ /**
16
+ * Set Booking listing row as R e a d
17
  *
18
  * @param {type} booking_id
19
  * @returns {undefined}
28
  }
29
  }
30
 
31
+ /**
32
+ * Set Booking listing row as U n R e a d
33
  *
34
  * @param {type} booking_id
35
  * @returns {undefined}
40
  }
41
 
42
 
43
+ /**
44
+ * Increase counter about new bookings
45
  *
46
  * @returns {undefined}
47
  */
51
  jQuery('.bk-update-count').html(my_num);
52
  }
53
 
54
+ /**
55
+ * Decrease counter about new bookings
56
  *
57
  * @returns {undefined}
58
  */
65
  }
66
 
67
 
68
+ /**
69
+ * Functions for the TimeLine
70
  *
71
  * @param {type} booking_id
72
  * @returns {undefined}
542
 
543
 
544
 
545
+ /**
546
+ * Selections of several checkboxes like in gMail with shift :)
547
  * Need to have this structure:
548
  * .wpbc_selectable_table
549
  * .wpbc_selectable_head
js/client.js CHANGED
@@ -11,10 +11,19 @@ var is_show_availability_in_tooltips = false;
11
  var global_avalaibility_times = [];
12
  var numbb = 0;
13
  //var is_use_visitors_number_for_availability;
14
- var timeoutID_of_thank_you_page = null;
15
 
16
 
17
- // Calendar Initialisation /////////////////////////////////////////////////
 
 
 
 
 
 
 
 
 
18
  function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_of_week, start_bk_month ){
19
 
20
  if ( jQuery('#calendar_booking'+ bk_type).hasClass('hasDatepick') == true ) { // If the calendar with the same Booking resource is activated already, then exist.
@@ -46,28 +55,53 @@ function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_
46
  if(typeof( selectDayPro ) == 'function') {selectDayPro( bk_type);}
47
  }
48
 
49
- function selectDay(date) {
50
 
51
- if(typeof( bkRangeDaysSelection ) == 'function') { // Check if this minimum BS version, and then proced
52
- if ( jQuery.isFunction( jQuery(".datepick-days-cell" ).popover ) ) // FixIn: 7.0.1.2 - 2016-12-10
53
- jQuery('.datepick-days-cell' ).popover('hide');
54
- }
55
- jQuery('#date_booking' + bk_type).val(date);
56
- if(typeof( selectDayPro ) == 'function') {selectDayPro( date, bk_type);}
57
- jQuery( ".booking_form_div" ).trigger( "date_selected" , [ bk_type, date ] );
58
- }
59
 
60
- function hoverDay(value, date){
 
 
 
61
 
62
- if(typeof( hoverDayTime ) == 'function') {hoverDayTime(value, date, bk_type);}
 
 
 
63
 
64
- if ( (location.href.indexOf('page=wpbc')==-1) ||
65
- (location.href.indexOf('page=wpbc-new')>0) )
66
- { // Do not show it (range) at the main admin page
67
- if(typeof( hoverDayPro ) == 'function') {hoverDayPro(value, date, bk_type);}
68
- }
69
- //if(typeof( hoverAdminDay ) == 'function') { hoverAdminDay(value, date, bk_type); }
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  function applyCSStoDays(date ){
73
  var class_day = (date.getMonth()+1) + '-' + date.getDate() + '-' + date.getFullYear();
@@ -221,12 +255,14 @@ function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_
221
  }
222
 
223
  var is_datepick_unselectable = '';
 
 
224
  var is_calendar_booking_unselectable = jQuery('#calendar_booking_unselectable' + bk_type);
225
  var is_booking_form_also = jQuery('#booking_form_div' + bk_type);
226
  // Set unselectable, if only Availability Calendar here (and we do not insert Booking form by mistake).
227
  if ( ( is_calendar_booking_unselectable.length == 1 ) && ( is_booking_form_also.length != 1 ) ){
228
- is_datepick_unselectable = 'datepick-unselectable';
229
- }
230
 
231
 
232
 
@@ -1075,3 +1111,26 @@ function wpbc_timeline_nav( timeline_obj, nav_step ){
1075
  }
1076
  });
1077
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  var global_avalaibility_times = [];
12
  var numbb = 0;
13
  //var is_use_visitors_number_for_availability;
14
+ var timeoutID_of_thank_you_page = null;
15
 
16
 
17
+ /**
18
+ * Calendar Init
19
+ *
20
+ * @param bk_type - resource ID
21
+ * @param date_approved_par
22
+ * @param my_num_month
23
+ * @param start_day_of_week
24
+ * @param start_bk_month
25
+ * @returns {boolean}
26
+ */
27
  function init_datepick_cal(bk_type, date_approved_par, my_num_month, start_day_of_week, start_bk_month ){
28
 
29
  if ( jQuery('#calendar_booking'+ bk_type).hasClass('hasDatepick') == true ) { // If the calendar with the same Booking resource is activated already, then exist.
55
  if(typeof( selectDayPro ) == 'function') {selectDayPro( bk_type);}
56
  }
57
 
58
+ function selectDay(date) {
59
 
60
+ // Set unselectable, if only Availability Calendar here (and we do not insert Booking form by mistake).
61
+ var is_calendar_booking_unselectable = jQuery( '#calendar_booking_unselectable' + bk_type ); //FixIn: 8.0.1.2
62
+ var is_booking_form_also = jQuery( '#booking_form_div' + bk_type );
63
+ if ( ( is_calendar_booking_unselectable.length > 0 ) && ( is_booking_form_also.length <= 0 ) ){
 
 
 
 
64
 
65
+ wpbc_unselect_all_days( bk_type );
66
+ jQuery('.wpbc_only_calendar .popover_calendar_hover').remove(); //Hide all opened popovers
67
+ return false;
68
+ } //FixIn: 8.0.1.2 end
69
 
70
+ if ( typeof( bkRangeDaysSelection ) == 'function' ){ // Check if this minimum BS version, and then proced
71
+ if ( jQuery.isFunction( jQuery( ".datepick-days-cell" ).popover ) ) // FixIn: 7.0.1.2 - 2016-12-10
72
+ jQuery( '.datepick-days-cell' ).popover( 'hide' );
73
+ }
74
 
75
+ jQuery( '#date_booking' + bk_type ).val( date );
76
+ if ( typeof( selectDayPro ) == 'function' ){
77
+ selectDayPro( date, bk_type );
78
+ }
79
+ jQuery( ".booking_form_div" ).trigger( "date_selected", [ bk_type, date ] );
80
+ }
81
+
82
+ function hoverDay(value, date){
83
+
84
+ if ( typeof( hoverDayTime ) == 'function' ){
85
+ hoverDayTime( value, date, bk_type );
86
+ }
87
+
88
+ if ( (location.href.indexOf( 'page=wpbc' ) == -1) ||
89
+ (location.href.indexOf( 'page=wpbc-new' ) > 0) ){ // Do not show it (range) at the main admin page
90
+ if ( typeof( hoverDayPro ) == 'function' ){
91
+ hoverDayPro( value, date, bk_type );
92
+ }
93
+ }
94
+
95
+ var is_calendar_booking_unselectable = jQuery( '#calendar_booking_unselectable' + bk_type ); //FixIn: 8.0.1.2
96
+ var is_booking_form_also = jQuery( '#booking_form_div' + bk_type );
97
+ // Set unselectable, if only Availability Calendar here (and we do not insert Booking form by mistake).
98
+ if ( ( is_calendar_booking_unselectable.length == 1 ) && ( is_booking_form_also.length != 1 ) ){
99
+ jQuery( '#calendar_booking' + bk_type + ' .datepick-days-cell-over' ).removeClass( 'datepick-days-cell-over' ); // clear all highlight days selections
100
+ jQuery( '.wpbc_only_calendar #calendar_booking' + bk_type + ' .datepick-days-cell, ' +
101
+ '.wpbc_only_calendar #calendar_booking' + bk_type + ' .datepick-days-cell a' ).css( 'cursor', 'default' );
102
+ return false;
103
+ } //FixIn: 8.0.1.2 end
104
+ }
105
 
106
  function applyCSStoDays(date ){
107
  var class_day = (date.getMonth()+1) + '-' + date.getDate() + '-' + date.getFullYear();
255
  }
256
 
257
  var is_datepick_unselectable = '';
258
+ //FixIn: 8.0.1.2
259
+ /*
260
  var is_calendar_booking_unselectable = jQuery('#calendar_booking_unselectable' + bk_type);
261
  var is_booking_form_also = jQuery('#booking_form_div' + bk_type);
262
  // Set unselectable, if only Availability Calendar here (and we do not insert Booking form by mistake).
263
  if ( ( is_calendar_booking_unselectable.length == 1 ) && ( is_booking_form_also.length != 1 ) ){
264
+ is_datepick_unselectable = 'datepick-unselectable'; // 'ui-datepicker-unselectable ui-state-disabled';
265
+ }*/
266
 
267
 
268
 
1111
  }
1112
  });
1113
  }
1114
+
1115
+
1116
+
1117
+ /**
1118
+ * Unselect all days in calendar
1119
+ *
1120
+ * @param bk_type - ID of booking resource
1121
+ */
1122
+ function wpbc_unselect_all_days( bk_type ){ //FixIn: 8.0.1.2
1123
+
1124
+ var is_calendar_exist = jQuery( '#calendar_booking' + bk_type );
1125
+
1126
+ if ( is_calendar_exist.length > 0 ){
1127
+
1128
+ var inst = jQuery.datepick._getInst( document.getElementById( 'calendar_booking' + bk_type ) ); // Unselect all dates and set properties of Datepick
1129
+
1130
+ jQuery( '#date_booking' + bk_type ).val( '' );
1131
+ inst.stayOpen = false;
1132
+ inst.dates = [];
1133
+ jQuery.datepick._updateDatepick( inst );
1134
+ }
1135
+ }
1136
+
languages/booking-ar_SA.mo CHANGED
Binary file
languages/booking-be_BY.mo CHANGED
Binary file
languages/booking-bg_BG.mo CHANGED
Binary file
languages/booking-ca.mo CHANGED
Binary file
languages/booking-cs_CZ.mo CHANGED
Binary file
languages/booking-da_DK.mo CHANGED
Binary file
languages/booking-de_DE.mo CHANGED
Binary file
languages/booking-el.mo CHANGED
Binary file
languages/booking-es_ES.mo CHANGED
Binary file
languages/booking-fi.mo CHANGED
Binary file
languages/booking-fr_FR.mo CHANGED
Binary file
languages/booking-gl_ES.mo ADDED
Binary file
languages/booking-he_IL.mo CHANGED
Binary file
languages/booking-hr.mo CHANGED
Binary file
languages/booking-hu_HU.mo CHANGED
Binary file
languages/booking-it_IT.mo CHANGED
Binary file
languages/booking-nb_NO.mo CHANGED
Binary file
languages/booking-nl_NL.mo CHANGED
Binary file
languages/booking-pl_PL.mo CHANGED
Binary file
languages/booking-pt_BR.mo CHANGED
Binary file
languages/booking-pt_PT.mo CHANGED
Binary file
languages/booking-ru_RU.mo CHANGED
Binary file
languages/booking-sk_SK.mo CHANGED
Binary file
languages/booking-sv_SE.mo CHANGED
Binary file
languages/booking-tr_TR.mo CHANGED
Binary file
languages/booking-uk_UK.mo CHANGED
Binary file
languages/booking-zh_CN.mo CHANGED
Binary file
languages/booking-zh_TW.mo CHANGED
Binary file
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
- === Booking Calendar ===
2
  Contributors: wpdevelop, oplugins
3
  Donate link: http://wpbookingcalendar.com/buy/
4
  Tags: booking calendar, availability calendar, ical, booking system, booking form, reservation, events, appointment, availability, schedule, calendar, contact form
5
  Requires at least: 4.0
6
  Requires PHP: 5.2.4
7
- Tested up to: 4.8
8
- Stable tag: 8.0.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -13,7 +13,7 @@ Booking Calendar plugin - is the ultimate booking system for online reservation
13
 
14
  == Description ==
15
  Booking Calendar plugin will enable **online booking services** for your site. It's highly supported, *oldest ([since 2009](http://wpbookingcalendar.com/changelog/)) booking wordpress plugin* with **intuitive interface** and **flexible functionality**, which is possible to use in wide range of businesses.
16
- >[Plugin Homepage](http://wpbookingcalendar.com/ "Booking Calendar Homepage") | [Features](http://wpbookingcalendar.com/features/ "Features") | [Support Forum](http://wpbookingcalendar.com/support/ "Support") | [FAQ](http://wpbookingcalendar.com/faq/ "FAQ on Plugin site") | [Premium Demos](http://wpbookingcalendar.com/demo/ "Live Demos of Premium versions")
17
 
18
  Your website visitors can **check availability** of **property** *(like apartment, house, hotel room, etc.)* or any **service** you offer and **make a booking** in a minute.
19
 
@@ -102,7 +102,7 @@ Booking Calendar is built to work out of the box. Just activate it and insert bo
102
  - **Multi language** support. *(Check all available languages at this [page](http://wordpress.org/extend/plugins/booking/other_notes/ "Translations")).*
103
 
104
 
105
- And **much, much more**... *Please check ton of features in [premium versions](http://wpbookingcalendar.com/features/ "Booking Calendar Features list") of plugin.*
106
 
107
 
108
  = BOOKING CALENDAR IS GREAT FOR: =
@@ -154,32 +154,33 @@ If you have any further questions, please fill free to <a href="mailto:support@w
154
  = Support Languages =
155
 
156
  - English
157
- - Dutch [100% Completed]
158
- - German [98% Completed]
159
- - Italian [98% Completed]
160
- - Danish [98% Completed]
161
- - Finnish [98% Completed]
162
- - Swedish [98% Completed]
163
- - Hebrew [98% Completed]
164
- - Chinese (Taiwan) [98% Completed]
165
- - Norwegian [98% Completed]
166
- - Brazilian Portuguese [98% Completed]
167
- - Hungarian [97% Completed]
168
- - Ukrainian [97% Completed]
169
- - Russian [97% Completed]
170
- - Chinese [97% Completed]
171
- - French [97% Completed]
172
- - Polish [95% Completed]
173
- - Portugal [83% Completed]
174
- - Spanish [83% Completed]
175
- - Greece [83% Completed]
176
- - Czech [83% Completed]
177
- - Slovak [83% Completed]
178
- - Croatian [83% Completed]
179
- - Turkish [83% Completed]
180
- - Catalan [82% Completed]
181
- - Bulgarian [82% Completed]
182
- - Arabic [82% Completed]
 
183
  - Belarussian [10% Completed]
184
 
185
  Please recheck the status of each translation, before using plugin.
@@ -207,6 +208,30 @@ Please, fill free for suggesting [new ideas](http://wpbookingcalendar.com/ideas/
207
  12. **Timeline**. Glance booking checking for a year (3 months or month), at front-end side of your website.
208
 
209
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  = 8.0.1 =
211
  - Changes in **all** versions:
212
  * **Fix** issue of not ability to approve / decline bookings in Safari browser (8.0.1.100)
@@ -548,5 +573,5 @@ Please, fill free for suggesting [new ideas](http://wpbookingcalendar.com/ideas/
548
  For more information, see the [full release notes](http://wpbookingcalendar.com/changelog/).
549
 
550
  == Upgrade Notice ==
551
- = 8.0 =
552
- Sync bookings (via import/export .ics feeds) between different sources, like Airbnb, Booking.com, HomeAway, TripAdvisor, VRBO, FlipKey or any other calendar that uses .ics format. (Require Booking Manager plugin).
1
+ === Booking Calendar ===
2
  Contributors: wpdevelop, oplugins
3
  Donate link: http://wpbookingcalendar.com/buy/
4
  Tags: booking calendar, availability calendar, ical, booking system, booking form, reservation, events, appointment, availability, schedule, calendar, contact form
5
  Requires at least: 4.0
6
  Requires PHP: 5.2.4
7
+ Tested up to: 4.9
8
+ Stable tag: 8.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
13
 
14
  == Description ==
15
  Booking Calendar plugin will enable **online booking services** for your site. It's highly supported, *oldest ([since 2009](http://wpbookingcalendar.com/changelog/)) booking wordpress plugin* with **intuitive interface** and **flexible functionality**, which is possible to use in wide range of businesses.
16
+ >[Plugin Homepage](http://wpbookingcalendar.com/ "Booking Calendar Homepage") | [Features](http://wpbookingcalendar.com/overview/ "Features") | [Support Forum](http://wpbookingcalendar.com/support/ "Support") | [FAQ](http://wpbookingcalendar.com/faq/ "FAQ on Plugin site") | [Premium Demos](http://wpbookingcalendar.com/demo/ "Live Demos of Premium versions")
17
 
18
  Your website visitors can **check availability** of **property** *(like apartment, house, hotel room, etc.)* or any **service** you offer and **make a booking** in a minute.
19
 
102
  - **Multi language** support. *(Check all available languages at this [page](http://wordpress.org/extend/plugins/booking/other_notes/ "Translations")).*
103
 
104
 
105
+ And **much, much more**... *Please check ton of features in [premium versions](http://wpbookingcalendar.com/overview/ "Booking Calendar Features list") of plugin.*
106
 
107
 
108
  = BOOKING CALENDAR IS GREAT FOR: =
154
  = Support Languages =
155
 
156
  - English
157
+ - Spanish [100% Completed]
158
+ - Galician (Spanish) [100% Completed]
159
+ - Dutch [98% Completed]
160
+ - German [97% Completed]
161
+ - Italian [97% Completed]
162
+ - Danish [97% Completed]
163
+ - Finnish [97% Completed]
164
+ - Swedish [97% Completed]
165
+ - Norwegian [97% Completed]
166
+ - Brazilian Portuguese [97% Completed]
167
+ - Hebrew [96% Completed]
168
+ - Hungarian [96% Completed]
169
+ - Ukrainian [96% Completed]
170
+ - Russian [96% Completed]
171
+ - Chinese [96% Completed]
172
+ - Chinese (Taiwan) [96% Completed]
173
+ - French [96% Completed]
174
+ - Polish [94% Completed]
175
+ - Portugal [82% Completed]
176
+ - Greece [82% Completed]
177
+ - Czech [82% Completed]
178
+ - Slovak [82% Completed]
179
+ - Croatian [82% Completed]
180
+ - Turkish [82% Completed]
181
+ - Catalan [81% Completed]
182
+ - Bulgarian [81% Completed]
183
+ - Arabic [81% Completed]
184
  - Belarussian [10% Completed]
185
 
186
  Please recheck the status of each translation, before using plugin.
208
  12. **Timeline**. Glance booking checking for a year (3 months or month), at front-end side of your website.
209
 
210
  == Changelog ==
211
+ = 8.1 =
212
+ - Changes in **all** versions:
213
+ * **New** Ability to define **different structures of booking forms** at Booking > Settings > Form page: "Vertical", "**Side by side**", "Centered", "Dark"
214
+ * **New** Ability to insert modification/creation date or (Year, month, day, hours, minutes or seconds) of booking into email templates or in payment summary
215
+ * **Improvement** Improve admin UI styles in Chrome browser, by setting more sleek view of UI elements (8.0.2.4/5)
216
+ * **Improvement** Export to .ics feed bookings, that does not inside of Trash folder (8.0.2.7)
217
+ * **Translation** Spanish translation [100% completed] by Martin Romero
218
+ * **Translation** Galician (Spanish) translation [100% completed] by Martin Romero
219
+ * **Fix** showing booking listing correctly for "next 1 month" without bookings, that include past ("yesterday day") bookings (8.0.1.1)
220
+ * **Fix** force to load jquery-migrate in case, if we do not know the version of jQuery which was loaded. (8.0.1.2)
221
+ * **Fix** issue of showing warning "parsererror ~ SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" during import process, when some bookings already was imported (8.0.2.1)
222
+ * **Fix** add support of Apache 2.4 directives relative captcha saving.
223
+ * **Fix** issue of showing warning: "Email different from website DNS, its can be a reason of not delivery emails" at Booking > Settings > Emails page, in case if website DNS starting with "www." ot some other sub-domain. (8.0.2.9)
224
+ - Changes in **Personal / Business Small / Business Medium / Business Large / MultiUser** versions:
225
+ * **New** Integration with **Stripe** payment gateway. *(Business Small/Medium/Large, MultiUser)*
226
+ * **New.** Shortcode for showing check out date plus one additional day: [check_out_plus1day_hint] at Booking > Settings > Form page. (8.0.2.12) *(Business Medium/Large, MultiUser)*
227
+ * **Fix** showing correctly change-over days (triangles), when inserted only "availability calendar", without booking form (8.0.1.2) *(Business Small/Medium/Large, MultiUser)*
228
+ * **Fix** ability to use symbol **/** in placeholders in booking form fields shortcodes at Settings Form page (8.0.1.13) *(Personal Business Small/Medium/Large, MultiUser)*
229
+ * **Fix** correctly showing single and double quotes (' and ") symbols in textarea during editing booking (8.0.1.3) *(Personal Business Small/Medium/Large, MultiUser)*
230
+ * **Fix** issue of not saving changes during editing, if you try to search some booking resource (or other item), and this booking resource was not at the 1st page (during usual listing) (8.0.1.12) *(Personal Business Small/Medium/Large, MultiUser)*
231
+ * **Fix** issue of incorrect cost calculation, during editing booking, when selected days from 1 to 9 and used some rates. Issue relative of not using leading 0 in textarea. (8.0.2.2) *(Business Medium/Large, MultiUser)*
232
+ * **Fix** issue of showing coupon discount description, does not depend from uppercase or lowercase of entered coupon code (8.0.2.7) *(Business Large, MultiUser)*
233
+
234
+
235
  = 8.0.1 =
236
  - Changes in **all** versions:
237
  * **Fix** issue of not ability to approve / decline bookings in Safari browser (8.0.1.100)
573
  For more information, see the [full release notes](http://wpbookingcalendar.com/changelog/).
574
 
575
  == Upgrade Notice ==
576
+ = 8.1 =
577
+ Free version: Ability to define different structures of booking forms: "Vertical", "Side by side", "Centered", "Dark". Paid versions: Stripe payment gateway support. Many other improvements.
wpdev-booking.php CHANGED
@@ -7,10 +7,10 @@ Author: wpdevelop, oplugins
7
  Author URI: http://wpbookingcalendar.com/
8
  Text Domain: booking
9
  Domain Path: /languages/
10
- Version: 8.0.1
11
  */
12
 
13
- /* Copyright 2009 - 2016 www.wpbookingcalendar.com (email: info@wpbookingcalendar.com),
14
 
15
  This program is free software: you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
7
  Author URI: http://wpbookingcalendar.com/
8
  Text Domain: booking
9
  Domain Path: /languages/
10
+ Version: 8.1
11
  */
12
 
13
+ /* Copyright 2009 - 2017 www.wpbookingcalendar.com (email: info@wpbookingcalendar.com),
14
 
15
  This program is free software: you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by