PluginProbe
Booking Calendar / 11.8.4
Booking Calendar v11.8.4
11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 All 204 releases
← All changes | core/admin/page-ics-import.php +78 -68 10.1.311.8.4 View file →
@@ -12,12 +12,12 @@
12 12 * This is COMMERCIAL SCRIPT
13 13 * We are not guarantee correct work and support of Booking Calendar, if some file(s) was modified by someone else then wpdevelop.
14 14 */
15 15
16 -if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
16 +if ( ! defined( 'ABSPATH' ) ) {
17 + exit;
18 +} // Exit if accessed directly
17 19
18 -//FixIn: 8.0
19 -
20 20 /**
21 21 * Show Content
22 22 * Update Content
23 23 * Define Slug
@@ -55,22 +55,22 @@
55 55 $subtabs = array();
56 56
57 57 $subtabs[ 'import' ] = array(
58 58 'type' => 'subtab' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
59 - , 'title' => __('Import' ,'booking') . ' - .ics' // Title of TAB
60 - , 'page_title' => __('Import' ,'booking') . ' .ics '
59 + , 'title' => __('Import' ,'booking') . ' - .ics' // Title of TAB
60 + , 'page_title' => __('Import Bookings via .ics' ,'booking')
61 61 //. ' <span style="padding: 10px;font-size: 12px;font-style: italic;vertical-align: top;">Beta</span>' // Title of Page
62 - , 'hint' => __('Import' ,'booking') . ' .ics/ical ' . __('feeds', 'booking') // Hint
62 + , 'hint' => __('Set up and configure the import of events using .ics feeds.' ,'booking') // Hint
63 63 , 'link' => '' // link
64 64 , 'position' => '' // 'left' || 'right' || ''
65 65 , 'css_classes' => '' // CSS class(es)
66 66 //, 'icon' => 'http://.../icon.png' // Icon - link to the real PNG img
67 - //, 'font_icon' => 'wpbc_icn_mail_outline' // CSS definition of Font Icon
68 - , 'header_font_icon' => 'wpbc_icn_sync_alt' // CSS definition of Font Icon //FixIn: 9.6.1.4
69 - , 'default' => ! true // Is this sub tab activated by default or not: true || false. //FixIn: 8.1.1.10
67 + , 'font_icon' => 'wpbc-bi-box-arrow-in-down-right'
68 + , 'default' => false // Is this sub tab activated by default or not: true || false. // FixIn: 8.1.1.10.
70 69 , 'disabled' => false // Is this sub tab deactivated: true || false.
71 70 , 'checkbox' => false // or definition array for specific checkbox: array( 'checked' => true, 'name' => 'feature1_active_status' ) //, 'checkbox' => array( 'checked' => $is_checked, 'name' => 'enabled_active_status' )
72 71 , 'content' => 'content' // Function to load as conten of this TAB
72 +
73 73 );
74 74
75 75 $tabs[ 'sync' ]['subtabs'] = $subtabs;
76 76
@@ -109,8 +109,9 @@
109 109 $submit_form_name = 'wpbc_ics_import'; // Define form name
110 110
111 111 //$this->get_api()->validated_form_id = $submit_form_name; // Define ID of Form for ability to validate fields (like required field) before submit.
112 112
113 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
113 114 if ( isset( $_POST['is_form_sbmitted_'. $submit_form_name ] ) ) {
114 115
115 116 // Nonce checking {Return false if invalid, 1 if generated between, 0-12 hours ago, 2 if generated between 12-24 hours ago. }
116 117 $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
@@ -147,13 +148,13 @@
147 148 // Content ////////////////////////////////////////////////////////////
148 149 ?>
149 150 <div class="clear" style="margin-bottom:0px;"></div>
150 151 <span class="metabox-holder">
151 - <form name="<?php echo $submit_form_name; ?>" id="<?php echo $submit_form_name; ?>" action="" method="post" autocomplete="off">
152 + <form name="<?php echo esc_attr( $submit_form_name ); ?>" id="<?php echo esc_attr( $submit_form_name ); ?>" action="" method="post" autocomplete="off">
152 153 <?php
153 154 // N o n c e field, and key for checking S u b m i t
154 155 wp_nonce_field( 'wpbc_settings_page_' . $submit_form_name );
155 - ?><input type="hidden" name="is_form_sbmitted_<?php echo $submit_form_name; ?>" id="is_form_sbmitted_<?php echo $submit_form_name; ?>" value="1" /><?php
156 + ?><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
156 157 ?><div class="clear"></div><?php
157 158
158 159 ?><div class="clear" style="height:10px;"></div><?php
159 160
@@ -160,18 +161,17 @@
160 161 if ( ! $is_bm_exist ) { // Not Exist
161 162 ?>
162 163 <div class="clear" style="height:15px;"></div>
163 164 <div class="wpbc-settings-notice notice-error" style="text-align:left;font-size: 16px;padding: 5px 20px;">
164 - <strong><?php _e('Important!' ,'booking'); ?></strong> <?php
165 + <strong><?php esc_html_e('Important!' ,'booking'); ?></strong> <?php
165 166
166 - printf( __( 'This feature require %s plugin. You can install %s plugin from this %spage%s.', 'booking' )
167 - , '<strong><a class="" href="'. home_url() .'/wp-admin/plugin-install.php?s=booking+manager+by+oplugins&tab=search&type=term">'
168 - // , '<strong><a class="thickbox open-plugin-details-modal" href="'. home_url() .'/wp-admin/plugin-install.php?tab=plugin-information&plugin=booking-manager&TB_iframe=true&width=772&height=741" target="_blank">'
169 - . 'Booking Manager' . '</a></strong> ' . ' <strong>' .$wpbm_minimum_version.'</strong> ('. __('or newer','booking') . ') '
170 - , '<strong>' . 'Booking Manager' . '</strong>'
171 - , '<a target="_blank" href="https://wordpress.org/plugins/booking-manager/">'
172 - , '</a>'
173 - );
167 + /* translators: 1: ... */
168 + echo wp_kses_post( sprintf( __( 'This feature require %1$s plugin. You can install %2$s plugin from this %3$spage%4$s.', 'booking' )
169 + , '<strong><a class="" href="' . esc_url( home_url() ) . '/wp-admin/plugin-install.php?s=booking+manager+by+oplugins&tab=search&type=term">' . 'Booking Manager' . '</a></strong> ' . ' <strong>' . esc_html( $wpbm_minimum_version ) . '</strong> (' . esc_html__( 'or newer', 'booking' ) . ') '
170 + , '<strong>' . 'Booking Manager' . '</strong>'
171 + , '<a target="_blank" href="https://wordpress.org/plugins/booking-manager/">'
172 + , '</a>'
173 + ) );
174 174 ?>
175 175 </div>
176 176 <div class="clear" style="height:25px;"></div><?php
177 177
@@ -201,9 +201,9 @@
201 201 ?>
202 202
203 203 <div class="clear"></div>
204 204
205 - <!--input type="submit" value="<?php _e('Save Changes','booking'); ?>" class="button button-primary wpbc_submit_button" /-->
205 + <!--input type="submit" value="<?php esc_attr_e('Save Changes','booking'); ?>" class="button button-primary wpbc_submit_button" /-->
206 206 <?php
207 207 }
208 208 ?>
209 209 </form>
@@ -419,10 +419,10 @@
419 419
420 420 // Parameters for Ajax:
421 421
422 422 ?><div class="wpbc_import_ics_bar" id="wpbc_import_ics_bar"
423 - data-nonce="<?php echo wp_create_nonce( $nonce_name = 'wpbc_import_ics_nonce_actn' ); ?>"
424 - data-user-id="<?php echo wpbc_get_current_user_id(); ?>"
423 + data-nonce="<?php echo esc_attr( wp_create_nonce( $nonce_name = 'wpbc_import_ics_nonce_actn' ) ); ?>"
424 + data-user-id="<?php echo esc_attr( wpbc_get_current_user_id() ); ?>"
425 425 ><?php
426 426
427 427 if ( function_exists( 'wpbc_get_br_as_objects' ) ) {
428 428
@@ -447,9 +447,9 @@
447 447 } else {
448 448 $option_class = 'wpbc_single_resource';
449 449 }
450 450
451 - ?><option value="<?php echo $res->id; ?>" class="<?php echo $option_class; ?>" ><?php echo $res_title; ?></option><?php
451 + ?><option value="<?php echo esc_attr( $res->id ); ?>" class="<?php echo esc_attr( $option_class ); ?>" ><?php echo esc_html( $res_title ); ?></option><?php
452 452
453 453 }
454 454
455 455 ?></select><?php
@@ -458,9 +458,9 @@
458 458 ?>
459 459 <div class="wpbc_import_div">
460 460 <input type="text"
461 461 class="wpbc_import_url" name="wpbc_import_url" id="wpbc_import_url"
462 - placeholder="<?php _e( 'Enter URL to .ics feed', 'booking' ) ?>"
462 + placeholder="<?php esc_attr_e( 'Enter URL to .ics feed', 'booking' ) ?>"
463 463 value="" wrap="off"
464 464 />
465 465 <?php if ( function_exists( 'wpbm_upload' ) ) { ?>
466 466 <a href="javascript:void(0)" class="button button-secondary wpbc_upload_btn"
@@ -465,11 +465,11 @@
465 465 <?php if ( function_exists( 'wpbm_upload' ) ) { ?>
466 466 <a href="javascript:void(0)" class="button button-secondary wpbc_upload_btn"
467 467 data-modal_title="<?php echo esc_attr( __( 'Choose file', 'booking' ) ); ?>"
468 468 data-btn_title="<?php echo esc_attr( __( 'Insert file URL', 'booking' ) ); ?>"
469 - ><?php _e('Upload / Select ', 'booking' ); ?> <strong>(.ics)</strong></a>
469 + ><?php esc_html_e('Upload / Select ', 'booking' ); ?> <strong>(.ics)</strong></a>
470 470 <?php } ?>
471 - <a class="button button-primary wpbc_import_btn" href="javascript:void(0)"><?php _e('Import', 'booking'); ?></a>
471 + <a class="button button-primary wpbc_import_btn" href="javascript:void(0)"><?php esc_html_e('Import', 'booking'); ?></a>
472 472 </div>
473 473 <?php
474 474 if ( function_exists( 'wpbm_upload' ) ) { // Get WPBM_Upload obj. instance
475 475
@@ -504,28 +504,29 @@
504 504 <h4 style="margin-top:0;font-size:1.1em;">
505 505 <?php
506 506 $message_ics = sprintf( __( 'What does .ics feeds import/export mean?', 'booking' ) );
507 507 $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
508 - echo $message_ics;
508 + echo wp_kses_post( $message_ics );
509 509 ?>
510 510 </h4>
511 511 <p class="code" >
512 512 <?php
513 513 $message_ics = sprintf(
514 - __( 'Its useful, if you need to import/export bookings from/to external websites, like %s', 'booking' ),
514 + /* translators: 1: ... */
515 + __( 'Its useful, if you need to import/export bookings from/to external websites, like %s', 'booking' ),
515 516 ' <br/><em><strong><a href="https://www.airbnb.com/help/article/99/how-do-i-sync-my-airbnb-calendar-with-another-calendar" target="_blank">Airbnb</a></strong>, '
516 - . '<strong><a href="https://partnersupport.booking.com/hc/en-us/articles/213424709-How-do-I-export-my-calendar-" target="_blank">Booking.com</a></strong>, '
517 - . '<strong><a href="https://help.homeaway.com/articles/How-do-I-export-my-calendar-data-to-a-Google-calendar" target="_blank">HomeAway</a></strong>, '
517 + . '<strong><a href="https://partner.booking.com/en-gb/help/rates-availability/extranet-calendar/syncing-your-bookingcom-calendar-third-party-calendars" target="_blank">Booking.com</a></strong>, '
518 518 . '<strong><a href="https://rentalsupport.tripadvisor.com/articles/FAQ/noc-How-does-calendar-sync-work" target="_blank">TripAdvisor</a></strong>, '
519 - . '<strong><a href="https://help.vrbo.com/articles/How-do-I-export-my-calendar-data-to-a-Google-calendar" target="_blank">VRBO</a></strong>, '
519 + . '<strong><a href="https://help.vrbo.com/articles/How-do-I-import-my-iCal-or-Google-calendar" target="_blank">VRBO</a></strong>, '
520 520 . '<strong><a href="https://helpcenter.flipkey.com/articles/FAQ/noc-How-does-calendar-sync-work" target="_blank">FlipKey</a></strong> '
521 - . str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ),
521 + . '<strong><a href="https://help.homeaway.com/articles/How-do-I-export-my-calendar-data-to-a-Google-calendar" target="_blank">HomeAway</a></strong>, '
522 + . str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ),
522 523 __( 'and any other calendar that uses .ics format', 'booking' )
523 524 )
524 525 . '</em>.<br/>'
525 526 );
526 527 $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
527 - echo $message_ics;
528 + echo wp_kses_post( $message_ics );
528 529 ?>
529 530 </p>
530 531 <div class="clear" style="margin:20px 0;"></div>
531 532 <div class="wpbc-settings-notice notice-info"
@@ -532,8 +533,9 @@
532 533 style="text-align:left;border-top:1px solid #f0f0f0;border-right:1px solid #f0f0f0; line-height: 2em;padding: 5px 20px;"
533 534 >
534 535 <?php
535 536 $message_ics = sprintf(
537 + /* translators: 1: ... */
536 538 __( '.ics - is a file format of iCalendar standard for exchanging calendar and scheduling information between different sources %s Using a common calendar format (.ics), you can keep all your calendars updated and synchronized.', 'booking' )
537 539 , '<br/>' /*
538 540 '<br/><em>(<strong><a href="https://www.airbnb.com/help/article/99/how-do-i-sync-my-airbnb-calendar-with-another-calendar" target="_blank">Airbnb</a></strong>, '
539 541 . '<strong><a href="https://partnersupport.booking.com/hc/en-us/articles/213424709-How-do-I-export-my-calendar-" target="_blank">Booking.com</a></strong>, '
@@ -546,9 +548,9 @@
546 548 )
547 549 . ')</em>.<br/>' */
548 550 );
549 551 $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
550 - echo $message_ics;
552 + echo wp_kses_post( $message_ics );
551 553 ?>
552 554 </div>
553 555 <?php if ( $is_import ) { ?>
554 556 <h4 style="font-size:1.1em;">
@@ -555,9 +557,9 @@
555 557 <?php
556 558 // FixIn: 8.4.2.12
557 559 $message_ics = sprintf( __( 'Is it automatic process?', 'booking' ) );
558 560 $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
559 - echo $message_ics;
561 + echo wp_kses_post( $message_ics );
560 562 ?>
561 563 </h4>
562 564 <div class="wpbc-settings-notice notice-warning"
563 565 style="text-align:left;border-top:1px solid #f0f0f0;border-right:1px solid #f0f0f0; line-height: 2em;padding: 5px 20px;"
@@ -577,9 +579,9 @@
577 579 )
578 580 . ')</em>.<br/>' */
579 581 );
580 582 $message_ics = str_replace( array( '.ics', 'iCalendar' , 'CRON'), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' , '<a target="_blank" href="https://wpbookingcalendar.com/faq/cron-script/"><strong>CRON</strong></a>' ), $message_ics );
581 - echo $message_ics;
583 + echo wp_kses_post( $message_ics );
582 584 ?>
583 585 </div>
584 586 <h4 style="font-size:1.1em;">
585 587 <?php
@@ -584,31 +586,35 @@
584 586 <h4 style="font-size:1.1em;">
585 587 <?php
586 588 $message_ics = sprintf( __( 'How to start import of .ics feeds (files)?', 'booking' ) );
587 589 $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
588 - echo $message_ics;
590 + echo wp_kses_post( $message_ics );
589 591 ?>
590 592 </h4>
591 593 <ol style="list-style-type: decimal !important;list-style-position: inside;margin-left: 15px;">
592 - <li><?php
593 - printf( __( 'Install %s plugin.', 'booking' )
594 - , '<a target="_blank" href="https://wordpress.org/plugins/booking-manager/"><strong>Booking Manager</strong></a>' );
594 + <li><?php
595 + /* translators: 1: ... */
596 + echo wp_kses_post( sprintf( __( 'Install %s plugin.', 'booking' ),
597 + '<a target="_blank" href="https://wordpress.org/plugins/booking-manager/"><strong>Booking Manager</strong></a>' )
598 + );
595 599 ?></li>
596 - <li><?php
597 - printf( __( 'Insert %s shortcode into some post(s) or page(s). Check more info about this %sshortcode configuration%s', 'booking' )
600 + <li><?php
601 + /* translators: 1: ... */
602 + echo wp_kses_post( sprintf( __( 'Insert %1$s shortcode into some post(s) or page(s). Check more info about this %2$sshortcode configuration%3$s', 'booking' )
598 603 , '<code>[booking-manager-import ...]</code>'
599 604 , '<a target="_blank" href="https://oplugins.com/plugins/wp-booking-manager/booking-manager-help/#events-import">'
600 605 , '</a>'
601 - );
606 + ) );
602 607 ?>.
603 608 <div class="wpbc-settings-notice notice-info"
604 609 style='margin-left:25px;text-align:left;border-top:1px solid #f0f0f0;border-right:1px solid #f0f0f0;'><?php
605 610
611 + /* translators: 1: ... */
606 612 $message_ics = sprintf( __( 'Using such shortcodes in pages give a great flexibility to import from different .ics feeds (sources) into the same resource.%sAlso its possible to define different CRON parameters for accessing such different pages with different time intervals.', 'booking' )
607 613 , '<br/>'
608 614 );
609 615 $message_ics = str_replace( array( '.ics', 'CRON' ), array( '<strong>.ics</strong>', '<a target="_blank" href="https://wpbookingcalendar.com/faq/cron-script/"><strong>CRON</strong></a>' ), $message_ics );
610 - echo $message_ics;
616 + echo wp_kses_post( $message_ics );
611 617 ?>
612 618 </div>
613 619 <span style="padding:0 15px;">
614 620 <?php
@@ -613,18 +619,19 @@
613 619 <span style="padding:0 15px;">
614 620 <?php
615 621 $message_ics = sprintf( __( 'Or you can import .ics feed or file directly at current page.', 'booking' ) );
616 622 $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
617 - echo $message_ics;
623 + echo wp_kses_post( $message_ics );
618 624 ?>
619 625 </span>
620 626 </li>
621 627 <li> <?php
628 + /* translators: 1: ... */
622 629 $message_ics = sprintf( __( 'If you have inserted import shortcodes from %s, then you can configure your CRON for periodically access these pages and import .ics feeds.', 'booking' )
623 630 , '<a target="_blank" href="https://wordpress.org/plugins/booking-manager/"><strong>Booking Manager</strong></a> <code>[booking-manager-import ...]</code>'
624 631 );
625 632 $message_ics = str_replace( array( '.ics', 'CRON' ), array( '<strong>.ics</strong>', '<a target="_blank" href="https://wpbookingcalendar.com/faq/cron-script/"><strong>CRON</strong></a>' ), $message_ics );
626 - echo $message_ics;
633 + echo wp_kses_post( $message_ics );
627 634 ?>
628 635 </li>
629 636 </ol>
630 637 <?php } else { ?>
@@ -631,26 +638,29 @@
631 638 <h4 style="font-size:1.1em;">
632 639 <?php
633 640 $message_ics = sprintf( __( 'How to start export of .ics feeds (files)?', 'booking' ) );
634 641 $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
635 - echo $message_ics;
642 + echo wp_kses_post( $message_ics );
636 643 ?>
637 644 </h4>
638 645 <ol style="list-style-type: decimal !important;list-style-position: inside;margin-left: 15px;">
639 - <li><?php
640 - printf( __( 'Install %s plugin.', 'booking' )
641 - , '<a target="_blank" href="https://wordpress.org/plugins/booking-manager/"><strong>Booking Manager</strong></a>' );
646 + <li><?php
647 + /* translators: 1: ... */
648 + echo wp_kses_post( sprintf( __( 'Install %s plugin.', 'booking' ), '<a class="thickbox open-plugin-details-modal" target="_blank" href="plugin-install.php?tab=plugin-information&plugin=booking-manager&TB_iframe=true&width=772&height=435" aria-label="Booking Manager" data-title="Booking Manager"><strong>Booking Manager</strong></a>' ) );
649 + echo ' ';
650 + /* translators: 1: URL of Booking Manager plugin page.*/
651 + echo wp_kses_post( sprintf( __( 'WordPress directory %s page.', 'booking' ), '<a target="_blank" href="https://wordpress.org/plugins/booking-manager/"><strong>Booking Manager</strong></a>' ) );
642 652 ?></li>
643 - <li>
644 - <?php _e( 'Configure ULR feed(s) at this settings page.', 'booking' ); ?>
653 + <li> <?php esc_html_e( 'Configure ULR feed(s) at this settings page.', 'booking' ); ?>
645 654 <div class="wpbc-settings-notice notice-info"
646 655 style='margin-left:25px;text-align:left;border-top:1px solid #f0f0f0;border-right:1px solid #f0f0f0;'>
647 656 <?php
648 657 $message_ics = sprintf(
658 + /* translators: 1: ... */
649 659 __( 'Using such URL(s) you can import .ics feeds, from interface of other websites. %sCheck more info about how to import .ics feeds into other websites at the support pages of sepcific website.', 'booking' )
650 660 , '<br/>');
651 661 $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
652 - echo $message_ics;
662 + echo wp_kses_post( $message_ics );
653 663 ?>
654 664 </div>
655 665 </li>
656 666 <li>
@@ -656,9 +666,9 @@
656 666 <li>
657 667 <?php
658 668 $message_ics = sprintf( __( 'Visit these (previously configured URL feeds) pages for downloading .ics files.', 'booking' ) );
659 669 $message_ics = str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ), $message_ics );
660 - echo $message_ics;
670 + echo wp_kses_post( $message_ics );
661 671 ?>
662 672 </li>
663 673 </ol>
664 674 <?php } ?>
@@ -707,13 +717,13 @@
707 717 user_id: params_obj.user_id ,
708 718 nonce: params_obj.nonce,
709 719 params: params_obj
710 720 },
711 - function ( response_data, textStatus, jqXHR ) { // success
712 -
713 - var my_message = '<?php echo html_entity_decode( esc_js( __('Done' ,'booking') ),ENT_QUOTES) ; ?>';
721 + function ( response_data, textStatus, jqXHR ) { // success
722 +
723 + var my_message = '<?php echo esc_js( __('Done' ,'booking') ); ?>';
714 724 wpbc_admin_show_message( my_message, 'info', 10000 , false );
715 -
725 +
716 726 //console.log( response_data ); console.log( textStatus); console.log( jqXHR ); // Debug
717 727 //jQuery( '.wpbc_system_info_log' ).show(); //Show Debug info
718 728 jQuery( '.wpbc_system_info_log' ).html( response_data ); // For ability to show response, add such DIV element to page
719 729 }
@@ -732,11 +742,12 @@
732 742 <?php
733 743 }
734 744
735 745
736 -/** Ajax Response */
746 +/** Ajax Response $ */
737 747 function wpbc_ajax_WPBC_IMPORT_ICS_URL() {
738 748
749 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
739 750 if ( ! isset( $_POST['params'] ) || empty( $_POST['params'] ) ) {
740 751 exit;
741 752 }
742 753
@@ -753,16 +764,15 @@
753 764
754 765 //////////////////////////////////////////////////////////////////////
755 766 // Import events from .ics feed to specific booking resource
756 767 //////////////////////////////////////////////////////////////////////
757 - do_action( 'wpbm_ics_import_start'
758 - , array(
759 - 'url' => esc_url_raw( $_POST['params']['wpbc_import_url'] )
760 - , 'resource_id' => intval( $_POST['params']['wpbc_import_br_selection'] )
761 - , 'import_conditions' => '' // Check dates availability and process only
762 - // if dates available in specific booking resource!
763 - )
764 - );
768 + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
769 + do_action( 'wpbm_ics_import_start', array(
770 + 'url' => esc_url_raw( $_POST['params']['wpbc_import_url'] ), // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated, WordPress.Security.ValidatedSanitizedInput.MissingUnslash
771 + 'resource_id' => intval( $_POST['params']['wpbc_import_br_selection'] ), // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated
772 + 'import_conditions' => '',
773 + // Check dates availability and process only if dates available in specific booking resource!
774 + ) );
765 775
766 776 if ( $is_show_debug_info )
767 777 remove_action( 'wpbc_show_debug', 'wpbc_start_showing_debug', 10 );
768 778