PluginProbe
Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar / 2.1.21
Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar v2.1.21
2.1.22 2.1.21 2.1.20 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 trunk 1.1 2.0 2.0.1 2.0.10.2 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.17 2.0.18 2.0.2 2.0.20 2.0.21 All 56 releases
← All changes | core/wpbc/wpbm-bc.php +18 -14 2.0.1 → 2.1.21 View file →
@@ -3,9 +3,9 @@
3 3 * @version 1.0
4 4 * @description Booking Calendar integration - Support Functions
5 5 *
6 6 * @author wpdevelop
7 - * @link http://oplugins.com/
7 + * @link https://oplugins.com/
8 8 * @email [email protected]
9 9 *
10 10 * @modified 2017-06-28
11 11 */
@@ -69,21 +69,23 @@
69 69
70 70
71 71 $assigned_fields_arr = array();
72 72
73 - foreach ( $wpbc_assigned_form_fields as $assign_ics_field_name => $wpbc_field_str ) {
73 + if ( is_array( $wpbc_assigned_form_fields ) ) { //FixIn: 2.0.9.2
74 + foreach ( $wpbc_assigned_form_fields as $assign_ics_field_name => $wpbc_field_str ) {
74 75
75 - $wpbc_field_arr = explode( '^', $wpbc_field_str );
76 - $wpbc_field_arr_count = count( $wpbc_field_arr ) - 1;
76 + $wpbc_field_arr = explode( '^', $wpbc_field_str );
77 + $wpbc_field_arr_count = count( $wpbc_field_arr ) - 1;
77 78
78 - if ( ! empty( $wpbc_field_arr[ $wpbc_field_arr_count ] ) ) {
79 - $assigned_fields_arr[] = array(
80 - 'ics_field_name' => $assign_ics_field_name
81 - , 'type' => $wpbc_field_arr[ ($wpbc_field_arr_count - 1 ) ]
82 - , 'name' => $wpbc_field_arr[ $wpbc_field_arr_count ]
83 - );
84 - }
79 + if ( ! empty( $wpbc_field_arr[ $wpbc_field_arr_count ] ) ) {
80 + $assigned_fields_arr[] = array(
81 + 'ics_field_name' => $assign_ics_field_name
82 + , 'type' => $wpbc_field_arr[ ( $wpbc_field_arr_count - 1 ) ]
83 + , 'name' => $wpbc_field_arr[ $wpbc_field_arr_count ]
84 + );
85 + }
85 86
87 + }
86 88 }
87 89 /** $assigned_fields_arr = array(
88 90 [0] => Array (
89 91 [ics_field_name] => title
@@ -101,8 +103,9 @@
101 103 }
102 104
103 105
104 106 public static function set_ics_dates( $value ) {
107 +
105 108 self::$current_ics_dates = $value;
106 109 }
107 110
108 111 public static function get_ics_dates() {
@@ -162,12 +165,12 @@
162 165 }
163 166
164 167
165 168 /** Hook for overwriting updating dates. Usually used for do not allow to make this updating.
166 - *
169 + *
167 170 * // From: ..\wp-content\plugins\booking\inc\_bl\biz_l.php
168 - * // $is_continue = apply_filters( 'wpbc_is_reupdate_dates_to_child_resources', $is_exit, $booking_id, $bktype, $dates, $start_end_time_arr , $formdata, $skip_page_checking_for_updating );
169 - *
171 + * // $is_continue = apply_filters( 'wpbc_is_reupdate_dates_to_child_resources', $is_exit, $booking_id, $bktype, $dates, $start_end_time_arr , $formdata, $skip_page_checking_for_updating );
172 + *
170 173 * @param type $is_exit
171 174 * @param type $booking_id
172 175 * @param type $bktype
173 176 * @param type $dates
@@ -178,8 +181,9 @@
178 181 */
179 182 function wpbm_is_reupdate_dates_to_child_resources( $is_exit, $booking_id, $bktype, $dates, $start_end_time_arr , $formdata, $skip_page_checking_for_updating ) {
180 183 return true;
181 184 }
185 +
182 186
183 187
184 188 /** Getting only Booking fields ( starting '_BOOKING' ) from Parsed ICS array
185 189 * - its support helpful function