| @@ -12,9 +12,9 @@ | ||
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | 14 | if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 15 | 15 | |
| 16 | -//FixIn: 8.1.1.10 | |
| 16 | +// FixIn: 8.1.1.10. | |
| 17 | 17 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 18 | 18 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 19 | 19 | |
| 20 | 20 | |
| @@ -97,9 +97,10 @@ | ||
| 97 | 97 | $this->fields['booking_gcal_events_form_fields_title'] = array( |
| 98 | 98 | 'type' => 'select' |
| 99 | 99 | , 'default' => '' |
| 100 | 100 | , 'title' => __('Event Title', 'booking') |
| 101 | - , 'description' => sprintf( __( 'Select field for assigning to %sevent property%s' ,'booking'), '<b>', '</b>' ) | |
| 101 | + /* translators: 1: Open HTML strong symbol, 2: Close HTML strong symbol. */ | |
| 102 | + , 'description' => sprintf( __( 'Select field for assigning to %1$sevent property%2$s' ,'booking'), '<b>', '</b>' ) | |
| 102 | 103 | , 'description_tag' => 'span' |
| 103 | 104 | , 'css' => '' |
| 104 | 105 | , 'options' => $options |
| 105 | 106 | , 'group' => 'events_fields' |
| @@ -107,9 +108,10 @@ | ||
| 107 | 108 | $this->fields['booking_gcal_events_form_fields_description'] = array( |
| 108 | 109 | 'type' => 'select' |
| 109 | 110 | , 'default' => '' |
| 110 | 111 | , 'title' => __('Event Description (optional field)' ,'booking') |
| 111 | - , 'description' => sprintf( __( 'Select field for assigning to %sevent property%s' ,'booking'), '<b>', '</b>' ) | |
| 112 | + /* translators: 1: Open HTML strong symbol, 2: Close HTML strong symbol. */ | |
| 113 | + , 'description' => sprintf( __( 'Select field for assigning to %1$sevent property%2$s' ,'booking'), '<b>', '</b>' ) | |
| 112 | 114 | , 'description_tag' => 'span' |
| 113 | 115 | , 'css' => '' |
| 114 | 116 | , 'options' => $options |
| 115 | 117 | , 'group' => 'events_fields' |
| @@ -117,9 +119,10 @@ | ||
| 117 | 119 | $this->fields['booking_gcal_events_form_fields_where'] = array( |
| 118 | 120 | 'type' => 'select' |
| 119 | 121 | , 'default' => '' |
| 120 | 122 | , 'title' => __('Location' ,'booking') |
| 121 | - , 'description' => sprintf( __( 'Select field for assigning to %sevent property%s' ,'booking'), '<b>', '</b>' ) | |
| 123 | + /* translators: 1: Open HTML strong symbol, 2: Close HTML strong symbol. */ | |
| 124 | + , 'description' => sprintf( __( 'Select field for assigning to %1$sevent property%2$s' ,'booking'), '<b>', '</b>' ) | |
| 122 | 125 | , 'description_tag' => 'span' |
| 123 | 126 | , 'css' => '' |
| 124 | 127 | , 'options' => $options |
| 125 | 128 | , 'group' => 'events_fields' |
| @@ -130,9 +133,9 @@ | ||
| 130 | 133 | $options = array(); |
| 131 | 134 | $options[''] = __('Default' ,'booking'); |
| 132 | 135 | |
| 133 | 136 | // structure: $wpbc_booking_region_cities_list["Pacific"]["Fiji"] = "Fiji"; |
| 134 | - $wpbc_booking_region_cities_list = wpbc_get_booking_region_cities_list(); //FixIn: 8.9.4.9 | |
| 137 | + $wpbc_booking_region_cities_list = wpbc_get_booking_region_cities_list(); // FixIn: 8.9.4.9. | |
| 135 | 138 | |
| 136 | 139 | foreach ( $wpbc_booking_region_cities_list as $region => $region_cities) { |
| 137 | 140 | |
| 138 | 141 | //OPTGROUP - Open |
| @@ -162,9 +165,9 @@ | ||
| 162 | 165 | , 'options' => $options |
| 163 | 166 | , 'group' => 'general' |
| 164 | 167 | ); |
| 165 | 168 | |
| 166 | - //FixIn: 9.5.4.1 | |
| 169 | + // FixIn: 9.5.4.1. | |
| 167 | 170 | $this->fields['booking_ics_import_append_checkout_day'] = array( |
| 168 | 171 | 'type' => 'checkbox' |
| 169 | 172 | , 'default' => 'On' |
| 170 | 173 | , 'title' => __('Append check out day', 'booking') |
| @@ -172,10 +175,19 @@ | ||
| 172 | 175 | , 'description' => '' |
| 173 | 176 | , 'group' => 'import_advanced' |
| 174 | 177 | ); |
| 175 | 178 | |
| 179 | + $this->fields['booking_ics_import_append_extra_checkout_day'] = array( | |
| 180 | + 'type' => 'checkbox' | |
| 181 | + , 'default' => 'Off' | |
| 182 | + , 'title' => __('Append extra day after imported checkout day', 'booking') | |
| 183 | + , 'label' => __('Append one extra day after the imported check out day during import .ics feeds.' ,'booking') | |
| 184 | + , 'description' => __('This option works together with "Append check out day" and is useful only if you need to block one additional day after the checkout date from the imported calendar.' ,'booking') | |
| 185 | + , 'group' => 'import_advanced' | |
| 186 | + ); | |
| 187 | + | |
| 176 | 188 | if ( class_exists( 'wpdev_bk_biz_s' ) ) { |
| 177 | - //FixIn: 8.1.3.29 | |
| 189 | + // FixIn: 8.1.3.29. | |
| 178 | 190 | $this->fields['booking_ics_import_add_change_over_time'] = array( |
| 179 | 191 | 'type' => 'checkbox' |
| 180 | 192 | , 'default' => 'On' |
| 181 | 193 | , 'title' => __('Use check in/out time', 'booking') |
| @@ -182,9 +194,9 @@ | ||
| 182 | 194 | , 'label' => __('Use check in/out time of plugin, during import .ics feeds' ,'booking') |
| 183 | 195 | , 'description' => '' |
| 184 | 196 | , 'group' => 'import_advanced' |
| 185 | 197 | ); |
| 186 | - //FixIn: 8.5.2.3 | |
| 198 | + // FixIn: 8.5.2.3. | |
| 187 | 199 | $this->fields['booking_is_ics_export_only_approved'] = array( |
| 188 | 200 | 'type' => 'checkbox' |
| 189 | 201 | , 'default' => 'Off' |
| 190 | 202 | , 'title' => __('Export only approved bookings', 'booking') |
| @@ -192,9 +204,9 @@ | ||
| 192 | 204 | , 'description' => '' |
| 193 | 205 | , 'group' => 'export_advanced' |
| 194 | 206 | ); |
| 195 | 207 | |
| 196 | - //FixIn: 8.8.3.19 | |
| 208 | + // FixIn: 8.8.3.19. | |
| 197 | 209 | $this->fields['booking_is_ics_export_imported_bookings'] = array( |
| 198 | 210 | 'type' => 'select' |
| 199 | 211 | , 'default' => '' |
| 200 | 212 | , 'title' => __('Export bookings type', 'booking') |
| @@ -201,19 +213,28 @@ | ||
| 201 | 213 | , 'description' => __('Select which type of bookings to export' ,'booking') |
| 202 | 214 | , 'description_tag' => 'p' |
| 203 | 215 | , 'css' => '' |
| 204 | 216 | , 'options' => array ( |
| 205 | - '' => __('All bookings'), | |
| 206 | - 'plugin' => __('Bookings created in Booking Calendar'), | |
| 207 | - 'imported' => __('Imported bookings'), | |
| 217 | + '' => __('All bookings','booking'), | |
| 218 | + 'plugin' => __('Bookings created in Booking Calendar','booking'), | |
| 219 | + 'imported' => __('Imported bookings','booking'), | |
| 208 | 220 | ) |
| 209 | 221 | , 'group' => 'export_advanced' |
| 210 | 222 | ); |
| 211 | 223 | } |
| 224 | + // FixIn: 10.3.0.1. | |
| 225 | + $this->fields['booking_g_cal_export_no_data'] = array( | |
| 226 | + 'type' => 'checkbox' | |
| 227 | + , 'default' => 'Off' | |
| 228 | + , 'title' => __('Remove Details in Google Calendar Export', 'booking') | |
| 229 | + , 'label' => __('Enable this option to exclude booking summary details when exporting to Google Calendar using the \'Add to Google Calendar\' button.' ,'booking') | |
| 230 | + , 'description' => '' | |
| 231 | + , 'group' => 'export_advanced' | |
| 232 | + ); | |
| 212 | 233 | |
| 213 | - //FixIn: 8.5.1.1 | |
| 234 | + // FixIn: 8.5.1.1. | |
| 214 | 235 | /* |
| 215 | - //FixIn: 8.4.7.1 | |
| 236 | + // FixIn: 8.4.7.1. | |
| 216 | 237 | $this->fields['booking_ics_force_import'] = array( |
| 217 | 238 | 'type' => 'checkbox' |
| 218 | 239 | , 'default' => 'Off' |
| 219 | 240 | , 'title' => __('Force import', 'booking') |
| @@ -221,9 +242,9 @@ | ||
| 221 | 242 | , 'description' => '' |
| 222 | 243 | , 'group' => 'import_advanced' |
| 223 | 244 | ); |
| 224 | 245 | /**/ |
| 225 | - //FixIn: 8.4.7.12 //FixIn: //FixIn: 9.1.2.6 | |
| 246 | + //FixIn: 8.4.7.12 //FixIn: // FixIn: 9.1.2.6. | |
| 226 | 247 | $this->fields['booking_ics_force_trash_before_import'] = array( |
| 227 | 248 | 'type' => 'select' |
| 228 | 249 | , 'default' => 'Off' |
| 229 | 250 | , 'title' => __('Trash / delete all imported bookings before new import', 'booking') |
| @@ -229,9 +250,9 @@ | ||
| 229 | 250 | , 'title' => __('Trash / delete all imported bookings before new import', 'booking') |
| 230 | 251 | , 'description' => __('Move all previously imported bookings to trash or permanently delete before new import bookings. Its can resolve issue of updating deleted and edited events in external sources. Its work only, if you are using one source (.ics feed) for importing into specific booking resource!' ,'booking') |
| 231 | 252 | , 'description_tag' => 'p' |
| 232 | 253 | , 'css' => '' |
| 233 | - , 'options' => array ( //FixIn: 9.7.3.9 | |
| 254 | + , 'options' => array ( // FixIn: 9.7.3.9. | |
| 234 | 255 | 'Off' => __( 'Do nothing', 'booking' ), |
| 235 | 256 | 'On' => __( 'Trash imported bookings', 'booking' ), |
| 236 | 257 | 'delete' => __( 'Permanently delete', 'booking' ) |
| 237 | 258 | ) |
| @@ -242,9 +263,9 @@ | ||
| 242 | 263 | $this->fields['booking_condition_import_only_new'] = array( |
| 243 | 264 | 'type' => 'checkbox' |
| 244 | 265 | , 'default' => 'Off' |
| 245 | 266 | , 'title' => __( 'Import conditions', 'booking' )//__('Import only new events', 'booking') |
| 246 | - , 'label' => '<strong>' . __( 'Import Only New Events', 'booking' ) . '</strong> - ' . __( 'Import only if the event has not been imported before.', 'booking' ) | |
| 267 | + , 'label' => '<strong>' . esc_html__( 'Import Only New Events', 'booking' ) . '</strong> - ' . __( 'Import only if the event has not been imported before.', 'booking' ) | |
| 247 | 268 | , 'description' => '' |
| 248 | 269 | , 'group' => 'import_advanced' |
| 249 | 270 | ); |
| 250 | 271 | $this->fields['booking_condition_import_if_available'] = array( |
| @@ -250,9 +271,9 @@ | ||
| 250 | 271 | $this->fields['booking_condition_import_if_available'] = array( |
| 251 | 272 | 'type' => 'checkbox' |
| 252 | 273 | , 'default' => 'Off' |
| 253 | 274 | , 'title' => ''//__('Import if dates available', 'booking') |
| 254 | - , 'label' => '<strong>' . __( 'Import if Dates Available', 'booking' ) . '</strong> - ' . __( 'Import only if dates are available in the source calendar.', 'booking' ) | |
| 275 | + , 'label' => '<strong>' . esc_html__( 'Import if Dates Available', 'booking' ) . '</strong> - ' . esc_html__( 'Import only if dates are available in the source calendar.', 'booking' ) | |
| 255 | 276 | , 'description' => '' |
| 256 | 277 | , 'group' => 'import_advanced' |
| 257 | 278 | ); |
| 258 | 279 | |
| @@ -322,21 +343,21 @@ | ||
| 322 | 343 | $subtabs = array(); |
| 323 | 344 | |
| 324 | 345 | $subtabs[ 'general' ] = array( |
| 325 | 346 | 'type' => 'subtab' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html' |
| 326 | - , 'title' => __( 'General', 'booking' ) // Title of TAB | |
| 327 | - , 'page_title' => __( 'General Settings', 'booking' ) . ' - ' . __( 'Sync', 'booking' ) // Title of Page | |
| 328 | - , 'hint' => __( 'General Settings', 'booking' ) . ' - ' . __( 'Sync', 'booking' ) // Hint | |
| 347 | + , 'title' => __( 'Sync Options', 'booking' ) // Title of TAB | |
| 348 | + , 'page_title' => __( 'Sync Options', 'booking' ) // Title of Page | |
| 349 | + , 'hint' => __( 'Configure import/export rules, timezones, and which fields to include in sync operations.', 'booking' ) // Hint. | |
| 329 | 350 | , 'link' => '' // link |
| 330 | 351 | , 'position' => '' // 'left' || 'right' || '' |
| 331 | 352 | , 'css_classes' => '' // CSS class(es) |
| 332 | 353 | //, 'icon' => 'http://.../icon.png' // Icon - link to the real PNG img |
| 333 | - //, 'font_icon' => 'wpbc_icn_mail_outline' // CSS definition of Font Icon | |
| 334 | - , 'header_font_icon' => 'wpbc_icn_sync_alt' // CSS definition of Font Icon //FixIn: 9.6.1.4 | |
| 335 | - , 'default' => true // Is this sub tab activated by default or not: true || false. | |
| 354 | + , 'font_icon' => 'wpbc_icn_cloud_sync' | |
| 355 | + , 'default' => true // Is this sub tab activated by default or not: true || false. | |
| 336 | 356 | , 'disabled' => false // Is this sub tab deactivated: true || false. |
| 337 | 357 | , 'checkbox' => false // or definition array for specific checkbox: array( 'checked' => true, 'name' => 'feature1_active_status' ) //, 'checkbox' => array( 'checked' => $is_checked, 'name' => 'enabled_active_status' ) |
| 338 | 358 | , 'content' => 'content' // Function to load as conten of this TAB |
| 359 | + | |
| 339 | 360 | ); |
| 340 | 361 | |
| 341 | 362 | $tabs[ 'sync' ]['subtabs'] = $subtabs; |
| 342 | 363 | |
| @@ -395,8 +416,9 @@ | ||
| 395 | 416 | $submit_form_name = 'wpbc_general_sync'; // Define form name |
| 396 | 417 | |
| 397 | 418 | // $this->get_api()->validated_form_id = $submit_form_name; // Define ID of Form for ability to validate fields (like required field) before submit. |
| 398 | 419 | |
| 420 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing | |
| 399 | 421 | if ( isset( $_POST['is_form_sbmitted_'. $submit_form_name ] ) ) { |
| 400 | 422 | |
| 401 | 423 | // Nonce checking {Return false if invalid, 1 if generated between, 0-12 hours ago, 2 if generated between 12-24 hours ago. } |
| 402 | 424 | $nonce_gen_time = check_admin_referer( 'wpbc_settings_page_' . $submit_form_name ); // Its stop show anything on submiting, if its not refear to the original page |
| @@ -422,13 +444,13 @@ | ||
| 422 | 444 | // Content //////////////////////////////////////////////////////////// |
| 423 | 445 | ?> |
| 424 | 446 | <div class="clear" style="margin-bottom:0px;"></div> |
| 425 | 447 | <span class="metabox-holder"> |
| 426 | - <form name="<?php echo $submit_form_name; ?>" id="<?php echo $submit_form_name; ?>" action="" method="post" autocomplete="off"> | |
| 448 | + <form name="<?php echo esc_attr( $submit_form_name ); ?>" id="<?php echo esc_attr( $submit_form_name ); ?>" action="" method="post" autocomplete="off"> | |
| 427 | 449 | <?php |
| 428 | 450 | // N o n c e field, and key for checking S u b m i t |
| 429 | 451 | wp_nonce_field( 'wpbc_settings_page_' . $submit_form_name ); |
| 430 | - ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php | |
| 452 | + ?><input type="hidden" name="is_form_sbmitted_<?php echo esc_attr( $submit_form_name ); ?>" id="is_form_sbmitted_<?php echo esc_attr( $submit_form_name ); ?>" value="1" /><?php | |
| 431 | 453 | ?><div class="clear"></div><?php |
| 432 | 454 | |
| 433 | 455 | ?><div class="clear" style="height:10px;"></div><?php |
| 434 | 456 | |
| @@ -445,9 +467,9 @@ | ||
| 445 | 467 | $this->get_api()->show( 'events_fields' ); |
| 446 | 468 | |
| 447 | 469 | wpbc_close_meta_box_section(); |
| 448 | 470 | |
| 449 | - //FixIn: 8.5.1.1 | |
| 471 | + // FixIn: 8.5.1.1. | |
| 450 | 472 | // if ( class_exists( 'wpdev_bk_biz_s' ) ) { |
| 451 | 473 | |
| 452 | 474 | wpbc_open_meta_box_section( 'wpbc_settings_general_sync_import', __( 'Import', 'booking' ) . ' ' . __( 'Advanced', 'booking' ) ); |
| 453 | 475 | |
| @@ -465,9 +487,9 @@ | ||
| 465 | 487 | ?> |
| 466 | 488 | |
| 467 | 489 | <div class="clear"></div> |
| 468 | 490 | |
| 469 | - <input type="submit" value="<?php _e('Save Changes','booking'); ?>" class="button button-primary wpbc_submit_button" /> | |
| 491 | + <input type="submit" value="<?php esc_attr_e('Save Changes','booking'); ?>" class="button button-primary wpbc_submit_button" /> | |
| 470 | 492 | <?php |
| 471 | 493 | |
| 472 | 494 | ?> |
| 473 | 495 | </form> |