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-email-deny.php +16 -11 10.10.211.8.4 View file →
@@ -28,9 +28,9 @@
28 28 - 'modification'
29 29 */
30 30
31 31
32 -require_once( WPBC_PLUGIN_DIR . '/core/any/api-emails.php' ); // API
32 +require_once WPBC_PLUGIN_DIR . '/core/any/api-emails.php'; // API
33 33
34 34
35 35
36 36 // <editor-fold defaultstate="collapsed" desc=" Import Old Data " >
@@ -580,9 +580,9 @@
580 580
581 581 $subtabs['deny'] = array(
582 582 'type' => 'subtab' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
583 583 , 'title' => '<span>' . esc_html__( 'Pending', 'booking' ) . $sufix . '</span>' // Title of TAB
584 - , 'page_title' => __('Emails Settings', 'booking') // Title of Page
584 + , 'page_title' => __('Emails Settings', 'booking') . ' - <span>' . esc_html__( 'Pending', 'booking' ) . $sufix . '</span>' // Title of Page.
585 585 , 'hint' => __('Customization of email template, which is sent to Visitor, when booking status is set to Pending' ,'booking') //FixIn: 8.1.2.17.1
586 586 , 'link' => '' // link
587 587 , 'position' => '' // 'left' || 'right' || ''
588 588 , 'css_classes' => 'wpbc_navigation_top_border' // CSS class(es)
@@ -587,14 +587,13 @@
587 587 , 'position' => '' // 'left' || 'right' || ''
588 588 , 'css_classes' => 'wpbc_navigation_top_border' // CSS class(es)
589 589 //, 'icon' => 'http://.../icon.png' // Icon - link to the real PNG img
590 590 //, 'font_icon' => 'wpbc_icn_mail_outline' // CSS definition of Font Icon
591 - , 'header_font_icon' => 'wpbc_icn_mail_outline' // CSS definition of Font Icon // FixIn: 9.6.1.4.
592 - , 'default' => false // Is this sub tab activated by default or not: true || false.
591 + , 'default' => false // Is this sub tab activated by default or not: true || false.
593 592 , 'disabled' => false // Is this sub tab deactivated: true || false.
594 593 , 'checkbox' => false // or definition array for specific checkbox: array( 'checked' => true, 'name' => 'feature1_active_status' ) //, 'checkbox' => array( 'checked' => $is_checked, 'name' => 'enabled_active_status' )
595 594 , 'content' => 'content' // Function to load as conten of this TAB
596 - , 'is_use_left_navigation' => true
595 + , 'font_icon' => 'wpbc_icn_hourglass_empty'
597 596 , 'show_checked_icon' => true
598 597 , 'checked_data' => WPBC_EMAIL_NEW_ADMIN_PREFIX . WPBC_EMAIL_DENY_ID // This is where we get content
599 598 );
600 599
@@ -903,9 +902,15 @@
903 902 $replace[ 'check_in_only_date' ] = $my_check_in_onlydate;
904 903 $replace[ 'check_out_only_date' ] = $my_check_out_onlydate;
905 904
906 905 $replace[ 'check_out_plus1day'] = $my_check_out_plus1day; // FixIn: 6.0.1.11.
907 - $replace[ 'dates_count' ] = count( $my_dates4emeil_check_in_out );
906 +
907 + $replace['dates_count'] = count( $my_dates4emeil_check_in_out );
908 + $replace['days_count'] = intval( $replace['dates_count'] ); // FixIn: 10.15.1.3.
909 + $replace['nights_count'] = ( $replace['days_count'] > 1 ) ? intval( $replace['days_count'] - 1 ) : 1;
910 + $replace['days_count_plus1day'] = intval( $replace['days_count'] + 1 );
911 +
912 +
908 913 $replace['cost'] = $booking_cost;
909 914 $replace['cost_digits_only'] = $booking_cost_digits_only;
910 915 $replace[ 'siteurl' ] = htmlspecialchars_decode( '<a href="' . esc_url( home_url() ) . '">' . home_url() . '</a>' );
911 916 $replace[ 'resource_title'] = wpbc_lang( $bk_title );
@@ -931,9 +936,9 @@
931 936
932 937 // Links ///////////////////////////////////////////////////////////////////
933 938 $replace[ 'moderatelink' ] = htmlspecialchars_decode(
934 939 // '<a href="' .
935 - esc_url( wpbc_get_bookings_url() . '&view_mode=vm_listing&tab=actions&wh_booking_id=' . $booking_id )
940 + esc_url( wpbc_get_bookings_url() . '&tab=vm_booking_listing&wh_booking_id=' . $booking_id )
936 941 // . '">' . esc_html__('here', 'booking') . '</a>'
937 942 );
938 943 $replace[ 'visitorbookingediturl' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[visitorbookingediturl]', $booking_id );
939 944 $replace[ 'visitorbookingslisting' ] = apply_bk_filter( 'wpdev_booking_set_booking_edit_link_at_email', '[visitorbookingslisting]', $booking_id ); //FixIn: 8.1.3.5.1
@@ -977,9 +982,9 @@
977 982 function wpbc_send_email_deny( $deny_id_str, $is_send_emeils, $denyreason = '' ) {
978 983
979 984 global $wpdb;
980 985 $sql = "SELECT * FROM {$wpdb->prefix}booking as bk WHERE bk.booking_id IN ({$deny_id_str})";
981 - // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
986 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, PluginCheck.Security.DirectDB.UnescapedDBParameter
982 987 $result = $wpdb->get_results( $sql );
983 988
984 989 foreach ( $result as $res ) {
985 990
@@ -1022,11 +1027,11 @@
1022 1027
1023 1028 if ( $mail_api->fields_values['enabled'] == 'Off' ) return false; // Email template deactivated - exit.
1024 1029
1025 1030
1026 - $replace = wpbc__get_replace_shortcodes__email_deny( $booking_id, $bktype, $formdata );
1027 - $replace[ 'denyreason' ] = $denyreason; // FixIn: 7.0.1.1.
1028 -
1031 + $replace = wpbc__get_replace_shortcodes__email_deny( $booking_id, $bktype, $formdata );
1032 + $replace['denyreason'] = $denyreason; // FixIn: 7.0.1.1.
1033 + $replace['reason'] = $denyreason;
1029 1034 // Replace shortcodes with custom URL parameter, like: 'visitorbookingediturl', 'visitorbookingcancelurl', 'visitorbookingpayurl'
1030 1035 foreach ( array( 'visitorbookingediturl', 'visitorbookingcancelurl', 'visitorbookingpayurl' , 'visitorbookingslisting') as $url_shortcode ) { //FixIn: 7.0.1.8 //FixIn: 8.1.3.5.1
1031 1036
1032 1037 // Loop to search if we are having several such shortcodes in our $mail_api->fields_values['content'] (For example, if we have several languges ).