← All changes
|
includes/page-add-appointment/add_appointment__page.php
+14
-3
11.5
→
11.9
View file →
| @@ -14,9 +14,9 @@ | ||
| 14 | 14 | * |
| 15 | 15 | * @return bool True on the Add Appointment tab. |
| 16 | 16 | */ |
| 17 | 17 | function wpbc_add_appointment_page_is_active() { |
| 18 | - if ( ! is_admin() || ! wpbc_is_11_5_features_enabled() ) { | |
| 18 | + if ( ! is_admin() ) { | |
| 19 | 19 | return false; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | $page = isset( $_GET['page'] ) && ! is_array( $_GET['page'] ) ? sanitize_key( wp_unslash( $_GET['page'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended |
| @@ -146,8 +146,9 @@ | ||
| 146 | 146 | 'disabledLabel' => __( 'Disabled', 'booking' ), |
| 147 | 147 | 'minutesLabel' => __( 'min', 'booking' ), |
| 148 | 148 | 'allowPast' => $settings['allow_past'] ? 1 : 0, |
| 149 | 149 | 'allowPastDateArr' => $allow_past_date_arr, |
| 150 | + 'adminBookingNonce' => WPBC_Add_Booking_Component::get_admin_booking_nonce(), | |
| 150 | 151 | ) |
| 151 | 152 | ); |
| 152 | 153 | } |
| 153 | 154 | add_action( 'wpbc_enqueue_js_files', 'wpbc_add_appointment_page_enqueue_js', 73 ); |
| @@ -170,9 +171,9 @@ | ||
| 170 | 171 | return 'wpbc'; |
| 171 | 172 | } |
| 172 | 173 | |
| 173 | 174 | /** |
| 174 | - * Register the feature-gated Appointment tab and shared inspector layout. | |
| 175 | + * Register the released Appointment tab and shared inspector layout. | |
| 175 | 176 | * |
| 176 | 177 | * @return array<string,array<string,mixed>> Tab definition. |
| 177 | 178 | */ |
| 178 | 179 | public function tabs() { |
| @@ -179,9 +180,9 @@ | ||
| 179 | 180 | return array( |
| 180 | 181 | 'add-appointment' => array( |
| 181 | 182 | 'is_show_top_path' => true, |
| 182 | 183 | 'is_show_top_navigation' => true, |
| 183 | - 'left_navigation__default_view_mode' => 'min', | |
| 184 | + 'left_navigation__default_view_mode' => '', // FixIn:11.7.1.1: 'min', | |
| 184 | 185 | 'right_vertical_sidebar__is_show' => true, |
| 185 | 186 | 'right_vertical_sidebar__default_view_mode' => '', |
| 186 | 187 | 'right_vertical_sidebar_compact__is_show' => true, |
| 187 | 188 | 'page_title' => __( 'Add New Appointment', 'booking' ), |
| @@ -286,8 +287,18 @@ | ||
| 286 | 287 | 'open' => false, |
| 287 | 288 | ), |
| 288 | 289 | function () { |
| 289 | 290 | $send_emails = get_bk_option( 'booking_send_emails_off_addbooking' ) !== 'On'; |
| 291 | + wpbc_render_admin_cost_correction_control( | |
| 292 | + array( | |
| 293 | + 'input_id' => 'wpbc_add_appointment_cost_correction', | |
| 294 | + 'wrapper_class' => 'wpbc_add_appointment__setting_row wpbc_add_appointment__cost_correction', | |
| 295 | + 'label_class' => 'wpbc_add_appointment__cost_correction_label', | |
| 296 | + 'control_class' => 'wpbc_add_appointment__cost_correction_control', | |
| 297 | + 'help_class' => 'wpbc_add_appointment__tool_help', | |
| 298 | + 'help' => __( 'Leave the number empty to use the calculated Appointment cost. Enter an exact total to replace the final cost for this Appointment.', 'booking' ), | |
| 299 | + ) | |
| 300 | + ); | |
| 290 | 301 | ?> |
| 291 | 302 | <div class="wpbc_add_appointment__setting_row wpbc_add_appointment__setting_row--toggle"> |
| 292 | 303 | <?php |
| 293 | 304 | wpbc_flex_toggle( |