PluginProbe
Booking Calendar / 11.2
Booking Calendar v11.2
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 10.11.2 All 203 releases
booking / includes / _toolbar_ui / ui__settings_panel.php

ui__settings_panel.php in Booking Calendar 11.2, at includes/_toolbar_ui/ui__settings_panel.php

2,427 lines 97.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php /**
2 * @version 1.0
3 * @package Booking Calendar
4 * @category UI Elements for Settings
5 * @author wpdevelop
6 *
7 * @web-site https://wpbookingcalendar.com/
8 * @email info@wpbookingcalendar.com
9 *
10 * @modified 2024-09-14
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) exit; // Exit, if accessed directly
14 /*
15 // =====================================================================================================================
16 // == Data Structure ==
17 // =====================================================================================================================
18 function wpbc_ui_settings__panel__data_structure(){
19
20 $data_sections = array();
21
22 $data_sections['calendar_settings'] = array( 'title' => __( 'Calendar Settings', 'booking' ), 'cards' => array() );
23 $cards = array();
24 $cards['calendar_look'] = array(
25 'title' => __( 'Calendar Look', 'booking' ),
26 'description' => __( 'Set calendar skin, max months to scroll, calendar legend', 'booking' ),
27 'icon' => 'wpbc-bi-calendar2-range',
28 'css' => 'wpbc_ui_settings__card_divider_right',
29 'url' => 'javascript:void(0);',
30 'onclick' => "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );",
31 'pro_url' => ( ! class_exists( 'wpdev_bk_biz_s' ) ) ? '' : '1'
32 );
33 $data_sections['calendar_settings']['cards'] = $cards;
34
35 return $data_sections;
36 }
37 */
38
39 // =====================================================================================================================
40 // Settings Panel Structure:
41 // =====================================================================================================================
42 /**
43 *
44 * <div class="wpbc_ui_settings__flex_container">
45 *
46 * <div class="wpbc_ui_settings__row">
47 * <div class="wpbc_ui_settings__panel">
48 *
49 * <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
50 * <div class="wpbc_ui_settings__center ">
51 * <a ...> Start Setup Wizard </a>
52 * </div>
53 * </div>
54 *
55 * </div>
56 * </div>
57 *
58 * <div class="wpbc_ui_settings__col">
59 * <div class="wpbc_ui_settings__panel">
60 *
61 * <div class="wpbc_ui_settings__card">
62 * <div class="wpbc_ui_settings__center ">
63 * <a ...> Start Setup Wizard </a>
64 * </div>
65 * </div>
66 *
67 * </div>
68 * </div>
69 *
70 * </div>
71 */
72
73 /**
74 * Start == Settings Panel Section ==
75 *
76 * @param $direction = 'row' | 'col'
77 *
78 * @return void
79 */
80 function wpbc_ui_settings__panel_start( $direction = 'row' ) {
81 ?>
82 <div class="<?php echo ( 'col' === $direction ) ? 'wpbc_ui_settings__col' : 'wpbc_ui_settings__row'; ?>">
83 <div class="wpbc_ui_settings__panel">
84 <?php
85 }
86
87
88 /**
89 * End == Settings Panel Section ==
90 * @return void
91 */
92 function wpbc_ui_settings__panel_end() {
93 ?>
94 </div>
95 </div>
96 <?php
97 }
98
99
100 // =====================================================================================================================
101 // == Top Path ==
102 // =====================================================================================================================
103
104 /**
105 * Top Path Line
106 *
107 * @return void
108 */
109 function wpbc_ui_settings__top_path() {
110
111 ?>
112 <div class="wpbc_settings_path">
113 <?php /* ?><div class="wpbc_settings_path_el" style="border: 1px solid #d0d0d0;margin-right: 15px;border-radius: 50%;aspect-ratio: 1 / 1;text-align: center;display: none;"> <a><i class="menu_icon icon-1x wpbc_icn_navigate_before"></i></a></div><?php */ ?>
114 <div class="wpbc_settings_path_el">
115 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_dashboard_tab a' ,'#wpbc_general_settings_dashboard_metabox', '<?php echo esc_attr__( 'Dashboard', 'booking' ); ?>' );" href="javascript:void(0);"><?php
116 esc_html_e('Settings', 'booking');
117 ?></a>
118 </div>
119 <div class="wpbc_settings_path_el"><i class="menu_icon icon-1x wpbc_icn_navigate_next"></i></div>
120 <div class="wpbc_settings_path_el wpbc_settings_path_el_active">
121 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_dashboard_tab a' ,'#wpbc_general_settings_dashboard_metabox', '<?php echo esc_attr__( 'Dashboard', 'booking' ); ?>' );" href="javascript:void(0);"><?php
122 esc_html_e('Dashboard', 'booking');
123 ?></a>
124 </div>
125 <?php wpbc_ui_settings_panel__top_path__version(); ?>
126 </div>
127 <?php
128 }
129
130
131 // =====================================================================================================================
132 // == All Settings Panels ==
133 // =====================================================================================================================
134
135 function wpbc_ui_settings__panel__all_settings_panels( $params = array() ) {
136
137 $defaults = array(
138 'is_use_permalink' => false
139 );
140 $params = wp_parse_args( $params, $defaults );
141
142 ?><style type="text/css">
143 @media (max-width: 782px) {
144 .wpbc_settings_flex_container .wpbc_settings_flex_container_left:not(.wpbc_container_collapsed) {
145 display:none;
146 }
147 }
148 </style><?php
149
150 ?><div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__calendar"><?php esc_html_e( 'Calendar Settings', 'booking' ); ?></div><?php
151
152 wpbc_ui_settings__panel__calendar( $params );
153
154 ?><div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__form"><?php esc_html_e( 'Booking Form', 'booking' ); ?></div><?php
155 wpbc_ui_settings__panel__form( $params );
156
157
158 ?><div class="wpbc_ui_settings__flex_container" style="justify-content: space-between;">
159 <div style="flex:1 1 49%;margin-right:2%;">
160 <div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__booking_confirmation"><?php esc_html_e( 'Booking Summary', 'booking' ); ?></div>
161 <?php wpbc_ui_settings__panel__booking_confirmation( $params ); ?>
162 </div>
163 <div style="flex:1 1 49%;">
164 <div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__notifications"><?php esc_html_e( 'Notifications', 'booking' ); ?></div>
165 <?php wpbc_ui_settings__panel__notifications( $params ); ?>
166 </div>
167 </div><?php
168
169 ?><div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__sync_setu"><?php esc_html_e( 'Sync Bookings', 'booking' ); ?></div><?php
170 wpbc_ui_settings__panel__sync_setup( $params );
171
172
173
174 // -- Dismiss ----------------------------------------------------------------------------------------------
175 $dismiss_id = 'wpbc_is_dismissed__card__payment_setup';
176 $dismiss_x_button = '';
177 $is_panel_visible = true;
178 if ( ( ! class_exists( 'wpdev_bk_biz_s' ) ) && ( ! wpbc_is_this_demo() ) ) {
179 $is_panel_visible = wpbc_is_dismissed_panel_visible( $dismiss_id );
180 if ( $is_panel_visible ) {
181 ob_start();
182 ?><div class="wpbc_dismiss_x__in_panel_card"><?php $is_panel_visible = wpbc_is_dismissed( $dismiss_id ); ?></div><?php // Close 'x' Button
183 $dismiss_x_button = ob_get_clean();
184 }
185 }
186 ?><div id="<?php echo esc_attr( $dismiss_id ); ?>" style="flex:1 1 100%;<?php echo ( ! $is_panel_visible ) ? 'display:none;' : ''; ?>"><?php
187 ?><div class="wpbc_dismiss_x__in_panel"><?php
188 ?><div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__payment_setup"><?php esc_html_e( 'Payment Setup', 'booking' ); ?></div><?php
189 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
190 echo $dismiss_x_button;
191 ?></div><?php
192
193 wpbc_ui_settings__panel__payment_setup( $params );
194 ?></div><?php
195
196
197 ?><div class="wpbc_ui_settings__flex_container" style="justify-content: space-between;">
198 <?php
199 // -- Dismiss ----------------------------------------------------------------------------------------------
200 $dismiss_id = 'wpbc_is_dismissed__card__search_availability';
201 $dismiss_x_button = '';
202 $is_panel_visible = true;
203 if ( ( ! class_exists( 'wpdev_bk_biz_l' ) ) && ( ! wpbc_is_this_demo() ) ) {
204 $is_panel_visible = wpbc_is_dismissed_panel_visible( $dismiss_id );
205 if ( $is_panel_visible ) {
206 ob_start();
207 ?><div class="wpbc_dismiss_x__in_panel_card"><?php $is_panel_visible = wpbc_is_dismissed( $dismiss_id ); ?></div><?php // Close 'x' Button
208 $dismiss_x_button = ob_get_clean();
209 }
210 }
211 ?>
212 <div id="<?php echo esc_attr( $dismiss_id ); ?>" style="flex:1 1 49%;margin-right:2%;<?php echo ( ! $is_panel_visible ) ? 'display:none;' : ''; ?>">
213 <div class="wpbc_dismiss_x__in_panel">
214 <div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__search_availability"><?php esc_html_e( 'Search Availability', 'booking' ); ?></div>
215 <?php
216 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
217 echo $dismiss_x_button; ?>
218 </div>
219 <?php wpbc_ui_settings__panel__search_availability( $params ); ?>
220 </div>
221 <?php
222 // -- Dismiss ----------------------------------------------------------------------------------------------
223 $dismiss_id = 'wpbc_is_dismissed__card__mu';
224 $dismiss_x_button = '';
225 $is_panel_visible = true;
226 if ( ( ! class_exists( 'wpdev_bk_multiuser' ) ) && ( ! wpbc_is_this_demo() ) ) {
227 $is_panel_visible = wpbc_is_dismissed_panel_visible( $dismiss_id );
228 if ( $is_panel_visible ) {
229 ob_start();
230 ?><div class="wpbc_dismiss_x__in_panel_card"><?php $is_panel_visible = wpbc_is_dismissed( $dismiss_id ); ?></div><?php // Close 'x' Button
231 $dismiss_x_button = ob_get_clean();
232 }
233 }
234 ?>
235 <div id="<?php echo esc_attr( $dismiss_id ); ?>" style="flex:1 1 49%;<?php echo ( ! $is_panel_visible ) ? 'display:none;' : ''; ?>">
236 <div class="wpbc_dismiss_x__in_panel">
237 <div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__mu"><?php esc_html_e( 'Multiuser Options', 'booking' ); ?></div>
238 <?php
239 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
240 echo $dismiss_x_button; ?>
241 </div>
242 <?php wpbc_ui_settings__panel__mu( $params ); ?>
243 </div>
244 </div><?php
245
246
247
248 ?><div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__manage_bookings"><?php esc_html_e( 'Manage Bookings', 'booking' ); ?></div><?php
249 wpbc_ui_settings__panel__manage_bookings( $params );
250
251
252 ?><div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__admin_panel"><?php esc_html_e( 'Admin Panel', 'booking' ); ?></div><?php
253 wpbc_ui_settings__panel__admin_panel( $params );
254
255 ?><div class="wpbc_ui_settings__panel__up_header wpbc_ui_settings__panel__up_header__advanced_settings"><?php esc_html_e( 'Advanced', 'booking' ); ?></div><?php
256 wpbc_ui_settings__panel__advanced_settings( $params );
257
258
259 }
260
261
262 // =====================================================================================================================
263 // == Is Dismissed Panel ==
264 // =====================================================================================================================
265 function wpbc_is_dissmissed__in_settings_panel_card( $dismiss_id , $class_name ){
266
267 $is_panel_visible = true;
268 $dismiss_x_button = '';
269
270 if ( ( ! class_exists( $class_name ) ) && ( ! wpbc_is_this_demo() ) ) {
271
272 $is_panel_visible = wpbc_is_dismissed_panel_visible( $dismiss_id );
273
274 if ( $is_panel_visible ) {
275 ob_start();
276 ?><div class="wpbc_dismiss_x__in_panel_card"><?php $is_panel_visible = wpbc_is_dismissed( $dismiss_id ); ?></div><?php // Close 'x' Button
277 $dismiss_x_button = ob_get_clean();
278 }
279 }
280 return array( $is_panel_visible, $dismiss_x_button );
281 }
282
283
284 // ---------------------------------------------------------------------------------------------------------------------
285 // Panel == Calendar ==
286 // ---------------------------------------------------------------------------------------------------------------------
287
288 /**
289 * Show Settings Statistic | Agenda Panel
290 *
291 * @return void
292 */
293 function wpbc_ui_settings__panel__calendar( $params = array() ) {
294
295 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__calendar"><?php
296
297 wpbc_ui_settings__panel_start();
298
299 wpbc_ui_settings_panel__card__calendar( $params );
300 wpbc_ui_settings_panel__card__days_selection( $params );
301 wpbc_ui_settings_panel__card__change_over_days( $params );
302
303 wpbc_ui_settings_panel__card__tooltips_in_days( $params );
304 wpbc_ui_settings_panel__card__general_availability( $params );
305 wpbc_ui_settings_panel__card__capacity( $params );
306
307 wpbc_ui_settings__panel_end();
308
309 ?></div><?php
310
311 }
312
313 /**
314 * Show == Dashboard Card - Calendar ==
315 *
316 * @return void
317 */
318 function wpbc_ui_settings_panel__card__calendar( $params = array() ){
319
320 $title = esc_attr__( 'Calendar Settings', 'booking' );
321
322 if ( ! empty( $params['is_use_permalink'] ) ) {
323 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_calendar_tab';
324 $onclick = "";
325 } else {
326 $permalink = 'javascript:void(0);';
327 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_calendar_tab a' ,'#wpbc_general_settings_calendar_metabox', '" . $title . "' );";
328 }
329
330 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__calendar">
331 <div class="wpbc_ui_settings__text_row">
332 <i class="menu_icon icon-1x wpbc-bi-calendar2-range"></i>
333 <h1>
334 <a onclick="<?php
335 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
336 echo $onclick; ?>" href="<?php
337 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
338 echo $permalink; ?>">
339 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
340 </a>
341 </h1>
342 </div>
343 <div class="wpbc_ui_settings__text_row">
344 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
345 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
346 echo $onclick; ?>" href="<?php
347 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
348 echo $permalink; ?>">
349 <?php esc_html_e( 'Customize various calendar settings, specify how many months can be scrolled, and defining the legend.', 'booking' ); ?>
350 </a>
351 </div>
352 </div><?php
353
354 }
355
356 /**
357 * Show == Dashboard Card - Days Selection ==
358 *
359 * @return void
360 */
361 function wpbc_ui_settings_panel__card__days_selection( $params = array() ){
362
363 $title = esc_attr__( 'Days Selection', 'booking' );
364 if ( ! empty( $params['is_use_permalink'] ) ) {
365 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_calendar_tab';
366 $onclick = "";
367 } else {
368 $permalink = 'javascript:void(0);';
369 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_calendar_tab a' ,'#wpbc_general_settings_calendar_metabox', '" . $title . "' );";
370 $onclick .= "wpbc_blink_element('.wpbc_tr_set_gen_booking_type_of_day_selections', 4, 350); ";
371 }
372
373 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__days_selection">
374 <div class="wpbc_ui_settings__text_row">
375 <i class="menu_icon icon-1x wpbc-bi-calendar3-week"></i>
376 <h1>
377 <a onclick="<?php
378 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
379 echo $onclick; ?>" href="<?php
380 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
381 echo $permalink; ?>">
382 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
383 </a>
384 </h1>
385 </div>
386 <div class="wpbc_ui_settings__text_row">
387 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
388 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
389 echo $onclick; ?>" href="<?php
390 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
391 echo $permalink; ?>"> <?php esc_html_e( 'Choose how users can select days: single day, multiple days, or a date range with minimum and maximum limits.', 'booking' ); ?>
392 </a>
393 </div>
394 </div><?php
395
396 }
397
398 /**
399 * Show == Dashboard Card - Change Over Days ==
400 *
401 * @return void
402 */
403 function wpbc_ui_settings_panel__card__change_over_days( $params = array() ){
404
405 $dismiss_id = 'wpbc_is_dismissed__card__change_over_days';
406 list( $is_panel_visible, $dismiss_x_button ) = wpbc_is_dissmissed__in_settings_panel_card( $dismiss_id, 'wpdev_bk_biz_s' );
407 if ( ! $is_panel_visible ) { return; }
408
409 $title = esc_attr__( 'Changeover Days', 'booking' );
410
411 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
412 $onclick = ' onclick="';
413 $onclick .= "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_calendar_tab a' ,'#wpbc_general_settings_calendar_metabox', '" . $title . "' );";
414 //$onclick .= " jQuery( '#type_of_day_selections_range').prop('checked',true).trigger('change'); "; // Enable Range Days selection
415 //$onclick .= " jQuery( '#range_selection_type_dynamic').prop('checked',true).trigger('change'); "; // Enable Range Days selection
416 $onclick .= " wpbc_blink_element('.wpbc_tr_set_gen_booking_range_selection_time_is_active', 4, 350); ";
417 $onclick .= " wpbc_scroll_to('.wpbc_tr_set_gen_booking_range_selection_time_is_active' ); ";
418 $onclick .= '" ';
419
420 $url = ' href="javascript:void(0);" ';
421
422 if ( ! empty( $params['is_use_permalink'] ) ) {
423 $url = ' href="'. esc_url( wpbc_get_settings_url() ) . '&scroll_to_section=wpbc_general_settings_calendar_tab" '; // Direct link
424 $onclick = "";
425 }
426
427 } else {
428 $onclick = '';
429 $url = ' href="https://wpbookingcalendar.com/features/#change-over-days" ';
430 }
431
432 ?><div id="<?php echo esc_attr( $dismiss_id ); ?>" class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__change_over_days">
433 <div class="wpbc_ui_settings__text_row">
434 <i class="menu_icon icon-1x wpbc_icn_flip"></i>
435 <h1>
436 <a <?php
437 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
438 echo $url; ?> <?php
439 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
440 echo $onclick; ?> >
441 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
442 </a>
443 </h1>
444 <?php if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { ?>
445 <div class="wpbc_ui_settings__text_right"><a href="https://wpbookingcalendar.com/features/#change-over-days" class="wpbc_ui_settings__text_pro" target="_blank"><?php esc_html_e('Pro','booking'); ?></a></div>
446 <?php
447 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
448 echo $dismiss_x_button; ?>
449 <?php } ?>
450 </div>
451 <div class="wpbc_ui_settings__text_row">
452 <a class="wpbc_ui_settings__text_color__black" <?php
453 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
454 echo $url; ?> <?php
455 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
456 echo $onclick; ?> > <?php esc_html_e( 'Set up check-in and check-out days for multi-day bookings, with visual indicators like diagonal or vertical lines. Ideal for bookings that require split days.', 'booking' ); ?>
457 </a>
458 </div>
459 </div><?php
460 }
461
462 /**
463 * Show == Dashboard Card - Tooltips in Days ==
464 *
465 * @return void
466 */
467 function wpbc_ui_settings_panel__card__tooltips_in_days( $params = array() ){
468
469 $title = esc_attr__( 'Day Tooltips', 'booking' );
470
471 if ( ! empty( $params['is_use_permalink'] ) ) {
472 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_days_tooltips_tab';
473 $onclick = "";
474 } else {
475 $permalink = 'javascript:void(0);';
476 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_days_tooltips_tab a' ,'#wpbc_general_settings_days_tooltips_metabox', '" . $title . "' );";
477 }
478
479 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__tooltips_in_days">
480 <div class="wpbc_ui_settings__text_row">
481 <i class="menu_icon icon-1x wpbc-bi-chat-square-dots"></i>
482 <h1>
483 <a onclick="<?php
484 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
485 echo $onclick; ?>" href="<?php
486 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
487 echo $permalink; ?>">
488 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
489 </a>
490 </h1>
491 </div>
492 <div class="wpbc_ui_settings__text_row">
493 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
494 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
495 echo $onclick; ?>" href="<?php
496 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
497 echo $permalink; ?>"> <?php esc_html_e( 'Configure tooltips to display information like booked times, costs, details, and availability when hovering over calendar days.', 'booking' ); ?>
498 </a>
499 </div>
500 </div><?php
501
502 }
503
504 /**
505 * Show == Dashboard Card - General Availability ==
506 *
507 * @return void
508 */
509 function wpbc_ui_settings_panel__card__general_availability( $params = array() ){
510
511 $title = esc_attr__( 'General Availability', 'booking' );
512
513 $permalink = function_exists( 'wpbc_get_general_availability_url' ) ? wpbc_get_general_availability_url() : admin_url( 'admin.php?page=wpbc-availability&tab=general_availability' );
514 $onclick = "";
515
516 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__general_availability">
517 <div class="wpbc_ui_settings__text_row">
518 <i class="menu_icon icon-1x wpbc-bi-calendar-check bi-calendar2-day"></i>
519 <h1>
520 <a onclick="<?php
521 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
522 echo $onclick; ?>" href="<?php
523 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
524 echo $permalink; ?>">
525 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
526 </a>
527 </h1>
528 </div>
529 <div class="wpbc_ui_settings__text_row">
530 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
531 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
532 echo $onclick; ?>" href="<?php
533 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
534 echo $permalink; ?>"> <?php esc_html_e( 'Define unavailable weekdays, add booking buffers, and customize unavailable day options.', 'booking' ); ?>
535 </a>
536 </div>
537 </div><?php
538
539 }
540
541 /**
542 * Show == Dashboard Card - General Availability ==
543 *
544 * @return void
545 */
546 function wpbc_ui_settings_panel__card__capacity( $params = array() ){
547
548 $title = esc_attr__( 'Booking Capacity', 'booking' );
549
550 if ( ! empty( $params['is_use_permalink'] ) ) {
551 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_capacity_tab';
552 $onclick = "";
553 } else {
554 $permalink = 'javascript:void(0);';
555 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_capacity_tab a' ,'#wpbc_general_settings_capacity_metabox,#wpbc_general_settings_capacity_upgrade_metabox', '" . $title . "' );";
556 }
557
558 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__capacity">
559 <div class="wpbc_ui_settings__text_row">
560 <i class="menu_icon icon-1x wpbc_icn_filter_none"></i>
561 <h1>
562 <a onclick="<?php
563 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
564 echo $onclick; ?>" href="<?php
565 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
566 echo $permalink; ?>">
567 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
568 </a>
569 </h1>
570 </div>
571 <div class="wpbc_ui_settings__text_row">
572 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
573 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
574 echo $onclick; ?>" href="<?php
575 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
576 echo $permalink; ?>"> <?php esc_html_e( 'Manage the ability to accept multiple bookings for the same date or time slot.', 'booking' ); ?>
577 </a>
578 </div>
579 </div><?php
580
581 }
582
583 // ---------------------------------------------------------------------------------------------------------------------
584
585 /**
586 * Show Settings = Form = Panel
587 *
588 * @return void
589 */
590 function wpbc_ui_settings__panel__form( $params = array() ){
591
592 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__form"><?php
593
594 wpbc_ui_settings__panel_start();
595
596 if ( WPBC_Frontend_Settings::is_bfb_enabled( null ) ) {
597 wpbc_ui_settings_panel__card__bfb( $params );
598 } else {
599 wpbc_ui_settings_panel__card__form_fields( $params );
600 wpbc_ui_settings_panel__card__time_fields( $params );
601 wpbc_ui_settings_panel__card__time_slots_options( $params );
602 wpbc_ui_settings_panel__card__form_options( $params );
603 }
604
605 wpbc_ui_settings__panel_end();
606
607 ?></div><?php
608
609 }
610
611 /**
612 * Show == Dashboard Card - Booking Form Fields ==
613 *
614 * @return void
615 */
616 function wpbc_ui_settings_panel__card__form_fields( $params = array() ){
617
618 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
619 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=form' ) . '" ';
620
621 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__form_fields">
622 <div class="wpbc_ui_settings__text_row">
623 <i class="menu_icon icon-1x wpbc_icn_dashboard"></i>
624 <h1>
625 <a onclick="<?php
626 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
627 echo $onclick; ?>" <?php
628 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
629 echo $url; ?>>
630 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Booking Form Fields','booking'); ?></span>
631 </a>
632 </h1>
633 </div>
634 <div class="wpbc_ui_settings__text_row">
635 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
636 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
637 echo $onclick; ?>" <?php
638 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
639 echo $url; ?>> <?php esc_html_e( 'Add, remove, or customize fields in your booking form.', 'booking' ); ?>
640 </a>
641 </div>
642 </div><?php
643
644 }
645
646
647 /**
648 * Show == Dashboard Card - Booking Form Fields ==
649 *
650 * @return void
651 */
652 function wpbc_ui_settings_panel__card__bfb( $params = array() ){
653
654 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
655 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=builder_booking_form' ) . '" ';
656
657 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__form_fields">
658 <div class="wpbc_ui_settings__text_row">
659 <i class="menu_icon icon-1x wpbc_icn_dashboard"></i>
660 <h1>
661 <a onclick="<?php
662 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
663 echo $onclick; ?>" <?php
664 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
665 echo $url; ?>>
666 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Drag & Drop Booking Form Builder','booking'); ?></span>
667 </a>
668 </h1>
669 </div>
670 <div class="wpbc_ui_settings__text_row">
671 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
672 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
673 echo $onclick; ?>" <?php
674 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
675 echo $url; ?>> <?php esc_html_e( 'Add, remove, or customize fields in your booking form.', 'booking' ); ?>
676 </a>
677 </div>
678 </div><?php
679
680 }
681
682 /**
683 * Show == Dashboard Card - Time Fields ==
684 *
685 * @return void
686 */
687 function wpbc_ui_settings_panel__card__time_fields( $params = array() ){
688
689 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
690 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=form&field_type=timeslots' ) . '" ';
691
692 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__time_fields">
693 <div class="wpbc_ui_settings__text_row">
694 <i class="menu_icon icon-1x wpbc_icn_schedule"></i>
695 <h1>
696 <a onclick="<?php
697 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
698 echo $onclick; ?>" <?php
699 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
700 echo $url; ?>>
701 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Time Slot Configuration','booking'); ?></span>
702 </a>
703 </h1>
704 </div>
705 <div class="wpbc_ui_settings__text_row">
706 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
707 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
708 echo $onclick; ?>" <?php
709 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
710 echo $url; ?>> <?php esc_html_e( 'Enable and configure time selection fields in your booking form.', 'booking' ); ?>
711 </a>
712 </div>
713 </div><?php
714
715 }
716
717
718 /**
719 * Show == Dashboard Card - Form Options ==
720 *
721 * @return void
722 */
723 function wpbc_ui_settings_panel__card__form_options( $params = array() ){
724
725 $title = esc_attr__( 'Booking Form Options', 'booking' );
726
727 if ( ! empty( $params['is_use_permalink'] ) ) {
728 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_form_tab';
729 $onclick = '';
730 } else {
731 $permalink = 'javascript:void(0);';
732 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_form_tab a' ,'#wpbc_general_settings_form_metabox', '" . $title . "' );";
733 }
734 $onclick = '';
735 $permalink = wpbc_get_settings_url() . '&tab=form&subtab=form_options';
736
737 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__form_options">
738 <div class="wpbc_ui_settings__text_row">
739 <i class="menu_icon icon-1x wpbc-bi-toggle2-off"></i>
740 <h1>
741 <a onclick="<?php
742 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
743 echo $onclick; ?>" href="<?php
744 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
745 echo $permalink; ?>">
746 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
747 </a>
748 </h1>
749 </div>
750 <div class="wpbc_ui_settings__text_row">
751 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
752 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
753 echo $onclick; ?>" href="<?php
754 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
755 echo $permalink; ?>">
756 <?php esc_html_e( 'Enable CAPTCHA, auto-fill fields, and customize the form\'s color theme.', 'booking' ); ?>
757 </a>
758 </div>
759 </div><?php
760 }
761
762 /**
763 * Show == Dashboard Card - Time Slots Options ==
764 *
765 * @return void
766 */
767 function wpbc_ui_settings_panel__card__time_slots_options( $params = array() ){
768
769 $title = esc_attr__( 'Time Slot Appearance', 'booking' );
770
771 if ( ! empty( $params['is_use_permalink'] ) ) {
772 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_time_slots_tab';
773 $onclick = '';
774 } else {
775 $permalink = 'javascript:void(0);';
776 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_time_slots_tab a' ,'#wpbc_general_settings_time_slots_metabox', '" . $title . "' );";
777 }
778 $permalink = wpbc_get_settings_url() . '&tab=color_themes';
779 $onclick = '';
780
781 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__time_slots_options">
782 <div class="wpbc_ui_settings__text_row">
783 <i class="menu_icon icon-1x wpbc_icn_more_time"></i>
784 <h1>
785 <a onclick="<?php
786 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
787 echo $onclick; ?>" href="<?php
788 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
789 echo $permalink; ?>">
790 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
791 </a>
792 </h1>
793 </div>
794 <div class="wpbc_ui_settings__text_row">
795 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
796 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
797 echo $onclick; ?>" href="<?php
798 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
799 echo $permalink; ?>"> <?php esc_html_e( 'Choose how time slots are shown in the form: as a dropdown list or a time picker, and set a color theme.', 'booking' ); ?>
800 </a>
801 </div>
802 </div><?php
803 }
804
805 // ---------------------------------------------------------------------------------------------------------------------
806
807 /**
808 * Show Settings = Booking Confirmation = Panel
809 *
810 * @return void
811 */
812 function wpbc_ui_settings__panel__booking_confirmation( $params = array() ){
813
814 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__booking_confirmation"><?php
815
816 wpbc_ui_settings__panel_start();
817
818 wpbc_ui_settings_panel__card__booking_confirmation( $params );
819
820 wpbc_ui_settings__panel_end();
821
822 ?></div><?php
823
824 }
825
826 /**
827 * Show == Dashboard Card - Booking Confirmation ==
828 *
829 * @return void
830 */
831 function wpbc_ui_settings_panel__card__booking_confirmation( $params = array() ){
832
833 $title = esc_attr__( 'Booking Confirmation', 'booking' );
834
835 if ( ! empty( $params['is_use_permalink'] ) ) {
836 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_booking_confirmation_tab';
837 $onclick = "";
838 } else {
839 $permalink = 'javascript:void(0);';
840 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_confirmation_tab a' ,'#wpbc_general_settings_booking_confirmation_metabox,#wpbc_general_settings_booking_confirmation_left_metabox,#wpbc_general_settings_booking_confirmation_right_metabox,#wpbc_general_settings_booking_confirmation_help_metabox', '" . $title . "' );";
841 }
842
843 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__booking_confirmation">
844 <div class="wpbc_ui_settings__text_row">
845 <i class="menu_icon icon-1x wpbc-bi-card-checklist 0_icn_grading 0receipt"></i>
846 <h1>
847 <a onclick="<?php
848 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
849 echo $onclick; ?>" href="<?php
850 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
851 echo $permalink; ?>">
852 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
853 </a>
854 </h1>
855 </div>
856 <div class="wpbc_ui_settings__text_row">
857 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
858 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
859 echo $onclick; ?>" href="<?php
860 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
861 echo $permalink; ?>"> <?php esc_html_e( 'Customize how the booking summary is displayed after a booking is created.', 'booking' ); ?>
862 </a>
863 </div>
864 </div><?php
865 }
866
867 // ---------------------------------------------------------------------------------------------------------------------
868
869 /**
870 * Show Settings = Emails = Panel
871 *
872 * @return void
873 */
874 function wpbc_ui_settings__panel__notifications( $params = array() ){
875
876 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__notifications"><?php
877
878 wpbc_ui_settings__panel_start();
879
880 wpbc_ui_settings_panel__card__emails( $params );
881
882 wpbc_ui_settings__panel_end();
883
884 ?></div><?php
885
886 }
887
888 /**
889 * Show == Dashboard Card - Emails ==
890 *
891 * @return void
892 */
893 function wpbc_ui_settings_panel__card__emails( $params = array() ){
894
895 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
896 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=email' ) . '" ';
897
898 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__emails">
899 <div class="wpbc_ui_settings__text_row">
900 <i class="menu_icon icon-1x wpbc-bi-envelope-at 0paper _icn_mail_outline"></i>
901 <h1>
902 <a onclick="<?php
903 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
904 echo $onclick; ?>" <?php
905 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
906 echo $url; ?>>
907 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Emails','booking'); ?></span>
908 </a>
909 </h1>
910 </div>
911 <div class="wpbc_ui_settings__text_row">
912 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
913 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
914 echo $onclick; ?>" <?php
915 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
916 echo $url; ?>> <?php esc_html_e( 'Set up automatic email notifications for different booking actions.', 'booking' ); ?>
917 </a>
918 </div>
919 </div><?php
920
921 }
922
923 // ---------------------------------------------------------------------------------------------------------------------
924
925 /**
926 * Show Settings = Sync = Panel
927 *
928 * @return void
929 */
930 function wpbc_ui_settings__panel__sync_setup( $params = array() ){
931
932 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__sync_setup"><?php
933
934 wpbc_ui_settings__panel_start();
935
936 wpbc_ui_settings_panel__card__sync_options( $params );
937 wpbc_ui_settings_panel__card__import_ics( $params );
938 wpbc_ui_settings_panel__card__export_ics( $params );
939 wpbc_ui_settings_panel__card__import_google_cal( $params );
940
941 wpbc_ui_settings__panel_end();
942
943 ?></div><?php
944
945 }
946
947 /**
948 * Show == Dashboard Card - Sync Options ==
949 *
950 * @return void
951 */
952 function wpbc_ui_settings_panel__card__sync_options( $params = array() ){
953
954 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
955 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=sync&subtab=general' ) . '" ';
956
957 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__sync_options">
958 <div class="wpbc_ui_settings__text_row">
959 <i class="menu_icon icon-1x wpbc_icn_sync_alt"></i>
960 <h1>
961 <a onclick="<?php
962 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
963 echo $onclick; ?>" <?php
964 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
965 echo $url; ?>>
966 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Sync Options','booking'); ?></span>
967 </a>
968 </h1>
969 </div>
970 <div class="wpbc_ui_settings__text_row">
971 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
972 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
973 echo $onclick; ?>" <?php
974 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
975 echo $url; ?>> <?php esc_html_e( 'Configure import/export rules, timezones, and which fields to include in sync operations.', 'booking' ); ?>
976 </a>
977 </div>
978 </div><?php
979
980 }
981
982
983 /**
984 * Show == Dashboard Card - Import - .ics ==
985 *
986 * @return void
987 */
988 function wpbc_ui_settings_panel__card__import_ics( $params = array() ){
989
990 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
991 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=sync&subtab=import' ) . '" ';
992
993 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__import_ics">
994 <div class="wpbc_ui_settings__text_row">
995 <i class="menu_icon icon-1x wpbc-bi-box-arrow-in-down-right"></i>
996 <h1>
997 <a onclick="<?php
998 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
999 echo $onclick; ?>" <?php
1000 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1001 echo $url; ?>>
1002 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Import Bookings via .ics','booking'); ?></span>
1003 </a>
1004 </h1>
1005 </div>
1006 <div class="wpbc_ui_settings__text_row">
1007 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1008 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1009 echo $onclick; ?>" <?php
1010 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1011 echo $url; ?>> <?php esc_html_e( 'Set up and configure the import of events using .ics feeds.', 'booking' ); ?>
1012 </a>
1013 </div>
1014 </div><?php
1015
1016 }
1017
1018
1019 /**
1020 * Show == Dashboard Card - Export - .ics ==
1021 *
1022 * @return void
1023 */
1024 function wpbc_ui_settings_panel__card__export_ics( $params = array() ){
1025
1026 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
1027 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=sync&subtab=export' ) . '" ';
1028
1029 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__export_ics">
1030 <div class="wpbc_ui_settings__text_row">
1031 <i class="menu_icon icon-1x wpbc-bi-box-arrow-up-right"></i>
1032 <h1>
1033 <a onclick="<?php
1034 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1035 echo $onclick; ?>" <?php
1036 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1037 echo $url; ?>>
1038 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Export Bookings via .ics','booking'); ?></span>
1039 </a>
1040 </h1>
1041 </div>
1042 <div class="wpbc_ui_settings__text_row">
1043 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1044 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1045 echo $onclick; ?>" <?php
1046 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1047 echo $url; ?>> <?php esc_html_e( 'Set up and configure the export of bookings into .ics feeds.', 'booking' ); ?>
1048 </a>
1049 </div>
1050 </div><?php
1051
1052 }
1053
1054
1055 /**
1056 * Show == Dashboard Card - Import - .ics ==
1057 *
1058 * @return void
1059 */
1060 function wpbc_ui_settings_panel__card__import_google_cal( $params = array() ){
1061
1062 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
1063 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=sync&subtab=gcal' ) . '" ';
1064
1065 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__import_google_cal">
1066 <div class="wpbc_ui_settings__text_row">
1067 <i class="menu_icon icon-1x wpbc_icn_event"></i>
1068 <h1>
1069 <a onclick="<?php
1070 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1071 echo $onclick; ?>" <?php
1072 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1073 echo $url; ?>>
1074 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Import Google Calendar Events','booking'); ?></span>
1075 </a>
1076 </h1>
1077 </div>
1078 <div class="wpbc_ui_settings__text_row">
1079 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1080 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1081 echo $onclick; ?>" <?php
1082 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1083 echo $url; ?>> <?php esc_html_e( 'Set up and configure the import of Google Calendar events using the API.', 'booking' ); ?>
1084 </a>
1085 </div>
1086 </div><?php
1087
1088 }
1089
1090 // ---------------------------------------------------------------------------------------------------------------------
1091
1092 /**
1093 * Show Settings = Payment Setup = Panel
1094 *
1095 * @return void
1096 */
1097 function wpbc_ui_settings__panel__payment_setup( $params = array() ){
1098
1099 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__payment_setup"><?php
1100
1101 wpbc_ui_settings__panel_start();
1102
1103 wpbc_ui_settings_panel__card__payment_setup( $params );
1104 wpbc_ui_settings_panel__card__currency( $params );
1105 wpbc_ui_settings_panel__card__payment_options( $params );
1106
1107 wpbc_ui_settings__panel_end();
1108
1109 ?></div><?php
1110
1111 }
1112
1113 /**
1114 * Show == Dashboard Card - Payment Gateways ==
1115 *
1116 * @return void
1117 */
1118 function wpbc_ui_settings_panel__card__payment_setup( $params = array() ){
1119
1120 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
1121 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
1122 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=payment' ) . '" ';
1123 } else {
1124 $onclick = '';
1125 $url = ' href="https://wpbookingcalendar.com/features/#payments" ';
1126 }
1127
1128 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__payment_setup">
1129 <div class="wpbc_ui_settings__text_row">
1130 <i class="menu_icon icon-1x wpbc-bi-credit-card-2-back"></i>
1131 <h1>
1132 <a <?php
1133 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1134 echo $url; ?> <?php
1135 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1136 echo $onclick; ?> >
1137 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Payment Gateways','booking'); ?></span>
1138 </a>
1139 </h1>
1140 <?php if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { ?>
1141 <div class="wpbc_ui_settings__text_right"><a href="https://wpbookingcalendar.com/features/#payments" class="wpbc_ui_settings__text_pro" target="_blank"><?php esc_html_e('Pro','booking'); ?></a></div>
1142 <?php } ?>
1143 </div>
1144 <div class="wpbc_ui_settings__text_row">
1145 <a class="wpbc_ui_settings__text_color__black" <?php
1146 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1147 echo $url; ?> <?php
1148 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1149 echo $onclick; ?> >
1150 <?php
1151 /* translators: 1: ... */
1152 echo wp_kses_post( sprintf( __( 'Set up payment methods such as %s','booking') , 'Stripe, PayPal, iDeal, Authorize.Net, Opayo - Elavon, Bank Transfer, Pay in Cash, iPay88, ...') ); ?>
1153 </a>
1154 </div>
1155 </div><?php
1156
1157 }
1158
1159 /**
1160 * Show == Dashboard Card - Currency ==
1161 *
1162 * @return void
1163 */
1164 function wpbc_ui_settings_panel__card__currency( $params = array() ){
1165
1166 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
1167 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
1168 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=payment#wpbc_settings_payment_currency_metabox' ) . '" ';
1169 } else {
1170 $onclick = '';
1171 $url = ' href="https://wpbookingcalendar.com/features/#payments" ';
1172 }
1173
1174 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__currency">
1175 <div class="wpbc_ui_settings__text_row">
1176 <i class="menu_icon icon-1x wpbc-bi-currency-exchange _icn_attach_money"></i>
1177 <h1>
1178 <a <?php
1179 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1180 echo $url; ?> <?php
1181 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1182 echo $onclick; ?> >
1183 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Set Currency','booking'); ?></span>
1184 </a>
1185 </h1>
1186 <?php if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { ?>
1187 <div class="wpbc_ui_settings__text_right"><a href="https://wpbookingcalendar.com/features/#payments" class="wpbc_ui_settings__text_pro" target="_blank"><?php esc_html_e('Pro','booking'); ?></a></div>
1188 <?php } ?>
1189 </div>
1190 <div class="wpbc_ui_settings__text_row">
1191 <a class="wpbc_ui_settings__text_color__black" <?php
1192 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1193 echo $url; ?> <?php
1194 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1195 echo $onclick; ?> > <?php esc_html_e( 'Configure the currency used for bookings and payments.', 'booking' ); ?>
1196 </a>
1197 </div>
1198 </div><?php
1199
1200 }
1201
1202 /**
1203 * Show == Dashboard Card - Payment Options ==
1204 *
1205 * @return void
1206 */
1207 function wpbc_ui_settings_panel__card__payment_options( $params = array() ){
1208
1209 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
1210 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
1211 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=payment#wpbc_settings_payment_options_metabox' ) . '" ';
1212 } else {
1213 $onclick = '';
1214 $url = ' href="https://wpbookingcalendar.com/features/#payments" ';
1215 }
1216
1217 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__payment_options">
1218 <div class="wpbc_ui_settings__text_row">
1219 <i class="menu_icon icon-1x wpbc-bi-cash-coin wallet2"></i>
1220 <h1>
1221 <a <?php
1222 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1223 echo $url; ?> <?php
1224 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1225 echo $onclick; ?> >
1226 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Payment Options','booking'); ?></span>
1227 </a>
1228 </h1>
1229 <?php if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { ?>
1230 <div class="wpbc_ui_settings__text_right"><a href="https://wpbookingcalendar.com/features/#payments" class="wpbc_ui_settings__text_pro" target="_blank"><?php esc_html_e('Pro','booking'); ?></a></div>
1231 <?php } ?>
1232 </div>
1233 <div class="wpbc_ui_settings__text_row">
1234 <a class="wpbc_ui_settings__text_color__black" <?php
1235 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1236 echo $url; ?> <?php
1237 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1238 echo $onclick; ?> >
1239 <?php esc_html_e('Configure cost per day or night, and set up different payment methods and pricing options.' , 'booking'); ?>
1240 </a>
1241 </div>
1242 </div><?php
1243
1244 }
1245
1246
1247
1248 /**
1249 * Show Settings = Search Availability = Panel
1250 *
1251 * @return void
1252 */
1253 function wpbc_ui_settings__panel__search_availability( $params = array() ){
1254
1255 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__search_availability"><?php
1256
1257 wpbc_ui_settings__panel_start();
1258
1259 wpbc_ui_settings_panel__card__search_availability( $params );
1260
1261 wpbc_ui_settings__panel_end();
1262
1263 ?></div><?php
1264
1265 }
1266
1267 /**
1268 * Show == Dashboard Card - Search Availability ==
1269 *
1270 * @return void
1271 */
1272 function wpbc_ui_settings_panel__card__search_availability( $params = array() ){
1273
1274 if ( class_exists( 'wpdev_bk_biz_l' ) ) {
1275 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=search' ) . '" ';
1276 } else {
1277 $url = ' href="https://wpbookingcalendar.com/features/#search" ';
1278 }
1279
1280 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__search_availability">
1281 <div class="wpbc_ui_settings__text_row">
1282 <i class="menu_icon icon-1x wpbc_icn_youtube_searched_for"></i>
1283 <h1>
1284 <a <?php
1285 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1286 echo $url; ?>>
1287 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Search Availability','booking'); ?></span>
1288 </a>
1289 </h1>
1290 <?php if ( ! class_exists( 'wpdev_bk_biz_l' ) ) { ?>
1291 <div class="wpbc_ui_settings__text_right"><a href="https://wpbookingcalendar.com/features/#search" class="wpbc_ui_settings__text_pro" target="_blank"><?php esc_html_e('Pro','booking'); ?></a></div>
1292 <?php } ?>
1293 </div>
1294 <div class="wpbc_ui_settings__text_row">
1295 <a class="wpbc_ui_settings__text_color__black" <?php
1296 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1297 echo $url; ?>> <?php esc_html_e( 'Configure the layout and functionality of both the search form and search results', 'booking' ); ?>.
1298 </a>
1299 </div>
1300 </div><?php
1301 }
1302
1303 // ---------------------------------------------------------------------------------------------------------------------
1304
1305 /**
1306 * Show Settings = MultiUser = Panel
1307 *
1308 * @return void
1309 */
1310 function wpbc_ui_settings__panel__mu( $params = array() ){
1311
1312 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__mu"><?php
1313
1314 wpbc_ui_settings__panel_start();
1315
1316 wpbc_ui_settings_panel__card__mu( $params );
1317
1318 wpbc_ui_settings__panel_end();
1319
1320 ?></div><?php
1321
1322 }
1323
1324 /**
1325 * Show == Dashboard Card - MultiUser ==
1326 *
1327 * @return void
1328 */
1329 function wpbc_ui_settings_panel__card__mu( $params = array() ){
1330
1331 if ( class_exists( 'wpdev_bk_multiuser' ) ) {
1332 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=users' ) . '" ';
1333 } else {
1334 $url = ' href="https://wpbookingcalendar.com/features/#multiuser" ';
1335 }
1336
1337 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__mu">
1338 <div class="wpbc_ui_settings__text_row">
1339 <i class="menu_icon icon-1x wpbc_icn_people_alt"></i>
1340 <h1>
1341 <a <?php
1342 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1343 echo $url; ?>>
1344 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Multiuser Admin Panels','booking'); ?></span>
1345 </a>
1346 </h1>
1347 <?php if ( ! class_exists( 'wpdev_bk_multiuser' ) ) { ?>
1348 <div class="wpbc_ui_settings__text_right"><a href="https://wpbookingcalendar.com/features/#multiuser" class="wpbc_ui_settings__text_pro" target="_blank"><?php esc_html_e('Pro','booking'); ?></a></div>
1349 <?php } ?>
1350 </div>
1351 <div class="wpbc_ui_settings__text_row">
1352 <a class="wpbc_ui_settings__text_color__black" <?php
1353 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1354 echo $url; ?>> <?php esc_html_e( 'Enable separate booking admin panels for different WordPress users.', 'booking' ); ?>
1355 </a>
1356 </div>
1357 </div><?php
1358
1359 }
1360
1361
1362 // ---------------------------------------------------------------------------------------------------------------------
1363
1364 /**
1365 * Show Settings = Manage Bookings = Panel
1366 *
1367 * @return void
1368 */
1369 function wpbc_ui_settings__panel__manage_bookings( $params = array() ){
1370
1371 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__manage_bookings"><?php
1372
1373 wpbc_ui_settings__panel_start();
1374
1375 wpbc_ui_settings_panel__card__timeline_front_end( $params );
1376 wpbc_ui_settings_panel__card__manage_bookings( $params );
1377 wpbc_ui_settings_panel__card__auto_cancel_approve( $params );
1378
1379 wpbc_ui_settings__panel_end();
1380
1381 ?></div><?php
1382
1383 }
1384
1385 /**
1386 * Show == Dashboard Card - TimeLine Front-End ==
1387 *
1388 * @return void
1389 */
1390 function wpbc_ui_settings_panel__card__timeline_front_end( $params = array() ){
1391
1392 $title = esc_attr__( 'Timeline (Front-End)', 'booking' );
1393
1394 if ( ! empty( $params['is_use_permalink'] ) ) {
1395 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_booking_timeline_tab';
1396 $onclick = "";
1397 } else {
1398 $permalink = 'javascript:void(0);';
1399 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_timeline_tab a' ,'#wpbc_general_settings_booking_timeline_metabox', '" . $title . "' );";
1400 }
1401
1402 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__timeline_front_end">
1403 <div class="wpbc_ui_settings__text_row">
1404 <i class="menu_icon icon-1x wpbc_icn_rotate_90 wpbc_icn_align_vertical_bottom"></i>
1405 <h1>
1406 <a onclick="<?php
1407 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1408 echo $onclick; ?>" href="<?php
1409 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1410 echo $permalink; ?>">
1411 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1412 </a>
1413 </h1>
1414 </div>
1415 <div class="wpbc_ui_settings__text_row">
1416 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1417 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1418 echo $onclick; ?>" href="<?php
1419 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1420 echo $permalink; ?>"> <?php esc_html_e( 'Customize timeline options, including the display of booking details.', 'booking' ); ?>
1421 <?php if ( ! class_exists( 'wpdev_bk_personal' ) ) { ?>
1422 <div class="wpbc_ui_settings__text_right" style="font-size: 10px;"><a href="https://wpbookingcalendar.com/features/#show-booking-details" class="wpbc_ui_settings__text_pro" target="_blank"><?php esc_html_e('Pro','booking'); ?></a></div>
1423 <?php } ?>
1424
1425 </a>
1426 </div>
1427 </div><?php
1428 }
1429
1430 /**
1431 * Show == Dashboard Card - Manage Bookings ==
1432 *
1433 * @return void
1434 */
1435 function wpbc_ui_settings_panel__card__manage_bookings( $params = array() ){
1436
1437 $dismiss_id = 'wpbc_is_dismissed__card__manage_bookings';
1438 list( $is_panel_visible, $dismiss_x_button ) = wpbc_is_dissmissed__in_settings_panel_card( $dismiss_id, 'wpdev_bk_personal' );
1439 if ( ! $is_panel_visible ) { return; }
1440
1441 $title = esc_attr__( 'Manage Bookings', 'booking' );
1442
1443 if ( class_exists( 'wpdev_bk_personal' ) ) {
1444 $onclick = ' onclick="';
1445 $onclick .= "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_bookings_options_tab a' ,'#wpbc_general_settings_bookings_options_metabox', '" . $title . "' );";
1446 //$onclick .= " wpbc_blink_element('.wpbc_tr_set_gen_booking_range_selection_time_is_active', 4, 350); ";
1447 $onclick .= '" ';
1448
1449 $url = ' href="javascript:void(0);" ';
1450
1451 if ( ! empty( $params['is_use_permalink'] ) ) {
1452 $url = ' href="'. esc_url( wpbc_get_settings_url() ) . '&scroll_to_section=wpbc_general_settings_bookings_options_tab" ';
1453 $onclick = "";
1454 }
1455
1456 } else {
1457 $onclick = '';
1458 $url = ' href="https://wpbookingcalendar.com/features/#manage-bookings" ';
1459 }
1460
1461 ?><div id="<?php echo esc_attr( $dismiss_id ); ?>" class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__manage_bookings">
1462 <div class="wpbc_ui_settings__text_row">
1463 <i class="menu_icon icon-1x wpbc_icn_app_registration mode_edit_outline edit_calendar"></i>
1464 <h1>
1465 <a <?php
1466 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1467 echo $url; ?> <?php
1468 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1469 echo $onclick; ?> >
1470 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1471 </a>
1472 </h1>
1473 <?php if ( ! class_exists( 'wpdev_bk_personal' ) ) { ?>
1474 <div class="wpbc_ui_settings__text_right"><a href="https://wpbookingcalendar.com/faq/configure-editing-cancel-payment-bookings-for-visitors/" class="wpbc_ui_settings__text_pro" target="_blank"><?php esc_html_e('Pro','booking'); ?></a></div>
1475 <?php
1476 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1477 echo $dismiss_x_button; ?>
1478 <?php } ?>
1479 </div>
1480 <div class="wpbc_ui_settings__text_row">
1481 <a class="wpbc_ui_settings__text_color__black" <?php
1482 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1483 echo $url; ?> <?php
1484 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1485 echo $onclick; ?> > <?php esc_html_e( 'Allow customers to edit or cancel their own bookings.', 'booking' ); ?>
1486 </a>
1487 </div>
1488 </div><?php
1489
1490 }
1491
1492 /**
1493 * Show == Dashboard Card - Auto Cancellation / Auto Approval ==
1494 *
1495 * @return void
1496 */
1497 function wpbc_ui_settings_panel__card__auto_cancel_approve( $params = array() ){
1498
1499 $dismiss_id = 'wpbc_is_dismissed__card__auto_cancel_approve';
1500 list( $is_panel_visible, $dismiss_x_button ) = wpbc_is_dissmissed__in_settings_panel_card( $dismiss_id, 'wpdev_bk_biz_s' );
1501 if ( ! $is_panel_visible ) { return; }
1502
1503 $title = esc_attr__( 'Auto Cancellation / Auto Approval', 'booking' );
1504
1505 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
1506 $onclick = ' onclick="';
1507 $onclick .= "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_auto_cancelation_approval_tab a' ,'#wpbc_general_settings_auto_cancelation_approval_metabox', '" . $title . "' );";
1508 //$onclick .= " wpbc_blink_element('.wpbc_tr_set_gen_booking_range_selection_time_is_active', 4, 350); ";
1509 $onclick .= '" ';
1510 $url = ' href="javascript:void(0);" ';
1511
1512 if ( ! empty( $params['is_use_permalink'] ) ) {
1513 $url = ' href="'. esc_url( wpbc_get_settings_url() ) . '&scroll_to_section=wpbc_general_settings_auto_cancelation_approval_tab" ';
1514 $onclick = "";
1515 }
1516
1517 } else {
1518 $onclick = '';
1519 $url = ' href="https://wpbookingcalendar.com/features/#auto-cancellation" ';
1520 }
1521
1522 ?><div id="<?php echo esc_attr( $dismiss_id ); ?>" class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__auto_cancel_approve">
1523 <div class="wpbc_ui_settings__text_row">
1524 <i class="menu_icon icon-1x wpbc_icn_published_with_changes"></i>
1525 <h1>
1526 <a <?php
1527 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1528 echo $url; ?> <?php
1529 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1530 echo $onclick; ?> >
1531 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1532 </a>
1533 </h1>
1534 <?php if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { ?>
1535 <div class="wpbc_ui_settings__text_right"><a href="https://wpbookingcalendar.com/features/#auto-cancellation" class="wpbc_ui_settings__text_pro" target="_blank"><?php esc_html_e('Pro','booking'); ?></a></div>
1536 <?php
1537 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1538 echo $dismiss_x_button; ?>
1539 <?php } ?>
1540 </div>
1541 <div class="wpbc_ui_settings__text_row">
1542 <a class="wpbc_ui_settings__text_color__black" <?php
1543 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1544 echo $url; ?> <?php
1545 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1546 echo $onclick; ?> > <?php esc_html_e( 'Enable automatic approval or cancellation of bookings.', 'booking' ); ?>
1547 </a>
1548 </div>
1549 </div><?php
1550 }
1551
1552
1553 // ---------------------------------------------------------------------------------------------------------------------
1554
1555 /**
1556 * Show Settings = Admin Panel = Panel
1557 *
1558 * @return void
1559 */
1560 function wpbc_ui_settings__panel__admin_panel( $params = array() ){
1561
1562 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__admin_panel"><?php
1563
1564 wpbc_ui_settings__panel_start();
1565
1566 wpbc_ui_settings_panel__card__admin_panel( $params );
1567 wpbc_ui_settings_panel__card__plugin_menu_permistions( $params );
1568 wpbc_ui_settings_panel__card__translations( $params );
1569 wpbc_ui_settings_panel__card__timeline_back_end( $params );
1570 wpbc_ui_settings_panel__card__date_time_format( $params );
1571
1572 wpbc_ui_settings__panel_end();
1573
1574 ?></div><?php
1575
1576 }
1577
1578
1579 /**
1580 * Show == Dashboard Card - Admin Panel ==
1581 *
1582 * @return void
1583 */
1584 function wpbc_ui_settings_panel__card__admin_panel( $params = array() ){
1585
1586 $title = esc_attr__( 'Admin Panel', 'booking' );
1587
1588 if ( ! empty( $params['is_use_permalink'] ) ) {
1589 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_booking_listing_tab';
1590 $onclick = "";
1591 } else {
1592 $permalink = 'javascript:void(0);';
1593 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_listing_tab a' ,'#wpbc_general_settings_booking_listing_metabox', '" . $title . "' );";
1594 }
1595
1596 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__admin_panel">
1597 <div class="wpbc_ui_settings__text_row">
1598 <i class="menu_icon icon-1x wpbc-bi-speedometer2"></i>
1599 <h1>
1600 <a onclick="<?php
1601 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1602 echo $onclick; ?>" href="<?php
1603 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1604 echo $permalink; ?>">
1605 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1606 </a>
1607 </h1>
1608 </div>
1609 <div class="wpbc_ui_settings__text_row">
1610 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1611 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1612 echo $onclick; ?>" href="<?php
1613 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1614 echo $permalink; ?>"> <?php esc_html_e( 'Configure various options and settings in the admin panel.', 'booking' ); ?>
1615 </a>
1616 </div>
1617 </div><?php
1618 }
1619
1620 /**
1621 * Show == Dashboard Card - TimeLine Back-End ==
1622 *
1623 * @return void
1624 */
1625 function wpbc_ui_settings_panel__card__timeline_back_end( $params = array() ){
1626
1627 $title = esc_attr__('Timeline View','booking') . ' (' . esc_attr__('Back-End','booking') . ')';
1628
1629 if ( ! empty( $params['is_use_permalink'] ) ) {
1630 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_booking_calendar_overview_tab';
1631 $onclick = "";
1632 } else {
1633 $permalink = 'javascript:void(0);';
1634 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_calendar_overview_tab a' ,'#wpbc_general_settings_booking_calendar_overview_metabox', '" . $title . "' );";
1635 }
1636
1637 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__timeline_back_end">
1638 <div class="wpbc_ui_settings__text_row">
1639 <i class="menu_icon icon-1x wpbc-bi-bar-chart-steps _icn_timeline 0wpbc_icn_rotate_45 0wpbc_icn_align_vertical_bottom"></i>
1640 <h1>
1641 <a onclick="<?php
1642 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1643 echo $onclick; ?>" href="<?php
1644 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1645 echo $permalink; ?>">
1646 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1647 </a>
1648 </h1>
1649 </div>
1650 <div class="wpbc_ui_settings__text_row">
1651 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1652 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1653 echo $onclick; ?>" href="<?php
1654 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1655 echo $permalink; ?>"> <?php esc_html_e( 'Customize timeline options in the admin panel, including displaying booking details.', 'booking' ); ?>
1656 </a>
1657 </div>
1658 </div><?php
1659 }
1660
1661
1662 /**
1663 * Show == Dashboard Card - TimeLine Back-End ==
1664 *
1665 * @return void
1666 */
1667 function wpbc_ui_settings_panel__card__date_time_format( $params = array() ){
1668
1669 $title = esc_attr__( 'Date and Time Formats', 'booking' );
1670
1671 if ( ! empty( $params['is_use_permalink'] ) ) {
1672 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_datestimes_tab';
1673 $onclick = "";
1674 } else {
1675 $permalink = 'javascript:void(0);';
1676 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_datestimes_tab a' ,'#wpbc_general_settings_datestimes_metabox', '" . $title . "' );";
1677 }
1678
1679 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__date_time_format">
1680 <div class="wpbc_ui_settings__text_row">
1681 <i class="menu_icon icon-1x wpbc-bi-braces-asterisk _icn_password"></i>
1682 <h1>
1683 <a onclick="<?php
1684 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1685 echo $onclick; ?>" href="<?php
1686 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1687 echo $permalink; ?>">
1688 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1689 </a>
1690 </h1>
1691 </div>
1692 <div class="wpbc_ui_settings__text_row">
1693 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1694 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1695 echo $onclick; ?>" href="<?php
1696 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1697 echo $permalink; ?>"> <?php esc_html_e( 'Customize the display format for dates and times.', 'booking' ); ?>
1698 </a>
1699 </div>
1700 </div><?php
1701 }
1702
1703
1704 /**
1705 * Show == Dashboard Card - Plugin Menu / Permissions ==
1706 *
1707 * @return void
1708 */
1709 function wpbc_ui_settings_panel__card__plugin_menu_permistions( $params = array() ){
1710
1711 $title = esc_attr__( 'Plugin Menu / Permissions', 'booking' );
1712
1713 if ( ! empty( $params['is_use_permalink'] ) ) {
1714 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_permissions_tab';
1715 $onclick = "";
1716 } else {
1717 $permalink = 'javascript:void(0);';
1718 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_permissions_tab a' ,'#wpbc_general_settings_permissions_metabox', '" . $title . "' );";
1719 }
1720
1721 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__plugin_menu_permistions">
1722 <div class="wpbc_ui_settings__text_row">
1723 <i class="menu_icon icon-1x wpbc-bi-key"></i>
1724 <h1>
1725 <a onclick="<?php
1726 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1727 echo $onclick; ?>" href="<?php
1728 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1729 echo $permalink; ?>">
1730 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1731 </a>
1732 </h1>
1733 </div>
1734 <div class="wpbc_ui_settings__text_row">
1735 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1736 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1737 echo $onclick; ?>" href="<?php
1738 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1739 echo $permalink; ?>"> <?php esc_html_e( 'Set user permissions for accessing plugin menu pages and configure the menu position.', 'booking' ); ?>
1740 </a>
1741 </div>
1742 </div><?php
1743 }
1744
1745
1746 /**
1747 * Show == Dashboard Card - Translations ==
1748 *
1749 * @return void
1750 */
1751 function wpbc_ui_settings_panel__card__translations( $params = array() ){
1752
1753 $title = esc_attr__( 'Translations', 'booking' );
1754
1755 if ( ! empty( $params['is_use_permalink'] ) ) {
1756 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_translations_tab';
1757 $onclick = "";
1758 } else {
1759 $permalink = 'javascript:void(0);';
1760 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_translations_tab a' ,'#wpbc_general_settings_translations_metabox', '" . $title . "' );";
1761 }
1762
1763 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__translations">
1764 <div class="wpbc_ui_settings__text_row">
1765 <i class="menu_icon icon-1x wpbc_icn_translate 0wpbc-bi-translate"></i>
1766 <h1>
1767 <a onclick="<?php
1768 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1769 echo $onclick; ?>" href="<?php
1770 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1771 echo $permalink; ?>">
1772 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1773 </a>
1774 </h1>
1775 </div>
1776 <div class="wpbc_ui_settings__text_row">
1777 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1778 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1779 echo $onclick; ?>" href="<?php
1780 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1781 echo $permalink; ?>"> <?php esc_html_e( 'Choose whether to use local translations or WordPress translations.', 'booking' ); ?>
1782 </a>
1783 </div>
1784 </div><?php
1785 }
1786
1787
1788 // ---------------------------------------------------------------------------------------------------------------------
1789
1790 /**
1791 * Show Settings = Advanced Settings = Panel
1792 *
1793 * @return void
1794 */
1795 function wpbc_ui_settings__panel__advanced_settings( $params = array() ){
1796
1797 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__advanced_settings"><?php
1798
1799 wpbc_ui_settings__panel_start();
1800
1801 wpbc_ui_settings_panel__card__advanced_settings( $params );
1802 wpbc_ui_settings_panel__card__uninstall( $params );
1803 wpbc_ui_settings_panel__card__info_news( $params );
1804 //wpbc_ui_settings_panel__card__tools( $params );
1805
1806 wpbc_ui_settings__panel_end();
1807
1808 ?></div><?php
1809
1810 }
1811
1812
1813 /**
1814 * Show == Dashboard Card - Advanced ==
1815 *
1816 * @return void
1817 */
1818 function wpbc_ui_settings_panel__card__advanced_settings( $params = array() ){
1819
1820 $title = esc_attr__( 'Advanced Options', 'booking' );
1821
1822 if ( ! empty( $params['is_use_permalink'] ) ) {
1823 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_advanced_tab';
1824 $onclick = "";
1825 } else {
1826 $permalink = 'javascript:void(0);';
1827 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_advanced_tab a' ,'#wpbc_general_settings_advanced_metabox', '" . $title . "' );";
1828 }
1829
1830 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__advanced_settings">
1831 <div class="wpbc_ui_settings__text_row">
1832 <i class="menu_icon icon-1x wpbc-bi-gear _icn_adjust 0wpbc-bi-translate"></i>
1833 <h1>
1834 <a onclick="<?php
1835 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1836 echo $onclick; ?>" href="<?php
1837 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1838 echo $permalink; ?>">
1839 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1840 </a>
1841 </h1>
1842 </div>
1843 <div class="wpbc_ui_settings__text_row">
1844 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1845 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1846 echo $onclick; ?>" href="<?php
1847 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1848 echo $permalink; ?>"> <?php esc_html_e( 'Configure loading of CSS/JavaScript files, set the number of simultaneous requests, and other advanced options.', 'booking' ); ?>
1849 </a>
1850 </div>
1851 </div><?php
1852 }
1853
1854 /**
1855 * Show == Dashboard Card - Advanced ==
1856 *
1857 * @return void
1858 */
1859 function wpbc_ui_settings_panel__card__uninstall( $params = array() ){
1860
1861 $title = esc_attr__( 'Uninstall / Deactivation', 'booking' );
1862
1863 if ( ! empty( $params['is_use_permalink'] ) ) {
1864 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_uninstall_tab';
1865 $onclick = "";
1866 } else {
1867 $permalink = 'javascript:void(0);';
1868 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_uninstall_tab a' ,'#wpbc_general_settings_uninstall_metabox', '" . $title . "' );";
1869 }
1870
1871 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__uninstall">
1872 <div class="wpbc_ui_settings__text_row">
1873 <i class="menu_icon icon-1x wpbc-bi-trash _icn_adjust 0wpbc-bi-translate"></i>
1874 <h1>
1875 <a onclick="<?php
1876 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1877 echo $onclick; ?>" href="<?php
1878 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1879 echo $permalink; ?>">
1880 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1881 </a>
1882 </h1>
1883 </div>
1884 <div class="wpbc_ui_settings__text_row">
1885 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1886 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1887 echo $onclick; ?>" href="<?php
1888 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1889 echo $permalink; ?>"> <?php esc_html_e( 'Enable the option to fully erase booking data when the plugin is deactivated.', 'booking' ); ?>
1890 </a>
1891 </div>
1892 </div><?php
1893 }
1894
1895
1896 /**
1897 * Show == Dashboard Card - Advanced ==
1898 *
1899 * @return void
1900 */
1901 function wpbc_ui_settings_panel__card__info_news( $params = array() ){
1902
1903 $title = esc_attr__( 'Plugin Info & News', 'booking' );
1904
1905 if ( ! empty( $params['is_use_permalink'] ) ) {
1906 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_information_tab';
1907 $onclick = "";
1908 } else {
1909 $permalink = 'javascript:void(0);';
1910 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_information_tab a' ,'#wpbc_general_settings_information_metabox', '" . $title . "' );";
1911 }
1912
1913 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__info_news">
1914 <div class="wpbc_ui_settings__text_row">
1915 <i class="menu_icon icon-1x wpbc_icn_newspaper -bi-newspaper _icn_news 0wpbc-bi-translate"></i>
1916 <h1>
1917 <a onclick="<?php
1918 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1919 echo $onclick; ?>" href="<?php
1920 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1921 echo $permalink; ?>">
1922 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1923 </a>
1924 </h1>
1925 </div>
1926 <div class="wpbc_ui_settings__text_row">
1927 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1928 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1929 echo $onclick; ?>" href="<?php
1930 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1931 echo $permalink; ?>"> <?php esc_html_e( 'Stay informed with the latest news and details about the plugin.', 'booking' ); ?>
1932 </a>
1933 </div>
1934 </div><?php
1935 }
1936
1937
1938 /**
1939 * Show == Dashboard Card - Advanced ==
1940 *
1941 * @return void
1942 */
1943 function wpbc_ui_settings_panel__card__tools( $params = array() ){
1944
1945 $title = esc_attr__( 'Tools', 'booking' );
1946
1947 if ( ! empty( $params['is_use_permalink'] ) ) {
1948 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_help_tab';
1949 $onclick = "";
1950 } else {
1951 $permalink = 'javascript:void(0);';
1952 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_help_tab a' ,'#wpbc_general_settings_help_metabox', '" . $title . "' );";
1953 }
1954
1955 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__tools">
1956 <div class="wpbc_ui_settings__text_row">
1957 <i class="menu_icon icon-1x wpbc-bi-wrench-adjustable-circle 0wpbc-bi-translate"></i>
1958 <h1>
1959 <a onclick="<?php
1960 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1961 echo $onclick; ?>" href="<?php
1962 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1963 echo $permalink; ?>">
1964 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1965 </a>
1966 </h1>
1967 </div>
1968 <div class="wpbc_ui_settings__text_row">
1969 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1970 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1971 echo $onclick; ?>" href="<?php
1972 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1973 echo $permalink; ?>"> <?php esc_html_e( 'View system information and recover lost bookings or booking resources.', 'booking' ); ?>
1974 </a>
1975 </div>
1976 </div><?php
1977 }
1978
1979
1980
1981
1982
1983 // =====================================================================================================================
1984 // == Other Panels ==
1985 // =====================================================================================================================
1986
1987 // ---------------------------------------------------------------------------------------------------------------------
1988 // Panel == Plugin Version | & Buttons ==
1989 // ---------------------------------------------------------------------------------------------------------------------
1990
1991 /**
1992 * Show Settings Statistic | Agenda Panel
1993 *
1994 * @return void
1995 */
1996 function wpbc_ui_settings__panel__plugin_version(){
1997
1998 ?><div class="wpbc_ui_settings__flex_container"><?php
1999
2000 wpbc_ui_settings__panel_start();
2001
2002 wpbc_ui_settings_panel__card__setup_wizard();
2003
2004 wpbc_ui_settings_panel__card__transaltion_download();
2005
2006 wpbc_ui_settings_panel__card__transaltion_status();
2007
2008 wpbc_ui_settings_panel__card__version();
2009
2010 wpbc_ui_settings__panel_end();
2011
2012 ?></div><?php
2013 }
2014
2015 // ---------------------------------------------------------------------------------------------------------------------
2016 // Panel == Statistic | Agenda ==
2017 // ---------------------------------------------------------------------------------------------------------------------
2018
2019 /**
2020 * Show Settings Statistic | Agenda Panel
2021 *
2022 * @return void
2023 */
2024 function wpbc_ui_settings__panel__statistic(){
2025
2026 $is_panel_visible = wpbc_is_dismissed_panel_visible( 'wpbc_dashboard_section_statistic' ); // FixIn: 9.9.0.8.
2027
2028 if (! $is_panel_visible) {
2029 return;
2030 }
2031
2032 $statistic_cards_arr = ( $is_panel_visible ) ? wpbc_db_dashboard_get_bookings_count_arr() : array();
2033
2034
2035 ?><div id="wpbc_dashboard_section_statistic" class="wpbc_ui_settings__flex_container"><?php
2036
2037 wpbc_ui_settings__panel_start();
2038
2039 ?><div style="padding: 5px 8px 0 0;flex: 1 1 100%;margin-bottom: -100%;"><?php
2040 $is_panel_visible = wpbc_is_dismissed( 'wpbc_dashboard_section_statistic' ); // Close Panel
2041 ?></div><?php
2042
2043 //foreach ( array("all","new","pending","approved","booking_today","was_made_today","check_in_today","check_out_today","check_in_tomorrow","check_out_tomorrow") as $card_name ) {
2044 foreach ( array( "all", "new", "pending", "approved" ) as $card_name ) { // FixIn: 10.6.2.2.
2045 wpbc_ui_settings_panel__card__statistic( $card_name , $statistic_cards_arr );
2046 }
2047 wpbc_ui_settings__panel_end();
2048
2049 /* ?>
2050 <div class="wpbc_ui_settings__row">
2051 <div class="wpbc_ui_settings__panel"><?php
2052 foreach ( array("check_in_today","check_out_today","check_in_tomorrow","check_out_tomorrow") as $card_name ) {
2053 wpbc_ui_settings_panel__card__statistic( $card_name , $statistic_cards_arr );
2054 }
2055 ?></div>
2056 </div>
2057 <?php */ ?>
2058 </div>
2059 <?php
2060 }
2061
2062 function wpbc_ui_settings_panel__card__setup_wizard() {
2063 ?>
2064 <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2065 <div class="wpbc_ui_settings__center wpbc_container wpbc_container_booking_form">
2066 <a class="wpbc_button_light button-primary wpbc_button_green tooltip_top" style="padding: 12px 24px;"
2067 title="<?php echo esc_attr( sprintf( __('We\'ll guide you through the steps to set up WP Booking Calendar on your site.','booking'), '<strong>WP Booking Calendar</strong>' ) ); ?>"
2068 href="<?php echo esc_url( wpbc_get_settings_url() . '&wpbc_setup_wizard=reset&_wpnonce=' . wp_create_nonce( 'wpbc_settings_url_nonce' ) ); ?>"><?php
2069 esc_html_e( 'Start Setup Wizard', 'booking' )
2070 ?></a>
2071 </div>
2072 </div>
2073 <?php
2074 }
2075
2076 function wpbc_ui_settings_panel__card__transaltion_download() {
2077 ?>
2078 <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2079 <div class="wpbc_ui_settings__center">
2080 <a class="button tooltip_top"
2081 title="<?php
2082 /* translators: 1: ... */
2083 echo esc_attr( sprintf( __( 'Download translation PO files from %s and update the current translation version.', 'booking' ), 'wp.org / wpbookingcalendar.com' ) );?>"
2084 href="<?php echo esc_url( wpbc_get_settings_url() . '&system_info=show&_wpnonce='. wp_create_nonce( 'wpbc_settings_url_nonce' ) )
2085 .'&update_translations=1#wpbc_general_settings_system_info_metabox'; ?>"><?php
2086 esc_html_e( 'Update Translations', 'booking' )
2087 ?></a>
2088 </div>
2089 </div>
2090 <?php
2091 }
2092
2093 function wpbc_ui_settings_panel__card__transaltion_status() {
2094 ?>
2095 <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2096 <div class="wpbc_ui_settings__center">
2097 <a class="button tooltip_top"
2098 title="<?php echo esc_attr( __( 'Show exist translations status', 'booking' ) );?>"
2099 href="<?php echo esc_url( wpbc_get_settings_url() . '&system_info=show&_wpnonce='. wp_create_nonce( 'wpbc_settings_url_nonce' ) )
2100 .'&show_translation_status=1#wpbc_general_settings_system_info_metabox'; ?>"><?php
2101 esc_html_e( 'Show translations status', 'booking' )
2102 ?></a>
2103 </div>
2104 </div>
2105 <?php
2106 }
2107
2108 /**
2109 * Show Version card in top panel
2110 *
2111 * @return void
2112 */
2113 function wpbc_ui_settings_panel__card__version( $params_btn = array() ){
2114
2115 $defaults = array(
2116 'is_show_wizard_button' => false,
2117 );
2118 $params_btn = wp_parse_args( $params_btn, $defaults );
2119
2120 // Version.
2121 $version_title = '';
2122
2123 if ( class_exists( 'wpdev_bk_personal' ) ) {
2124 $version_title .= wpbc_dashboard_info_get_version_type_readable();
2125 }
2126 if ( wpbc_is_this_demo() ) {
2127 $version_title .= ' (Demo)';
2128 } else {
2129 if ( 'free' != wpbc_dashboard_info_get_version_type() ) {
2130 $version_title .= ' (' . __( 'for', 'booking' ) . ' ' . trim( wpbc_dashboard_info_get_version_type_sites() ) . ')';
2131 }
2132 }
2133
2134 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right" style="align-items: center;">
2135 <div class="wpbc_ui_settings__text_row" style="justify-content: center;margin-left:-1em;">
2136 <i class="menu_icon icon-1x wpbc_icn_numbers -bi-balloon-heart bi-activity"></i>
2137 <h1>
2138 <a class="" href="https://wpbookingcalendar.com/changelog/#<?php
2139 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2140 echo wpbc_get_slug_format( trim( wpbc_dashboard_info_get_version_type_readable() . '_' . wpbc_dashboard_info_get_version_type_sites() . '_' . esc_attr( WP_BK_VERSION_NUM ) ) ); ?>">
2141 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_attr( WP_BK_VERSION_NUM ); ?></span>
2142 </a>
2143 </h1>
2144 </div>
2145 <div class="wpbc_ui_settings__text_row" style="justify-content: center;">
2146 <a class="wpbc_ui_settings__text_color__purple2"
2147 href="https://wpbookingcalendar.com/faq/difference-single-developer-multi-site/#<?php
2148 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2149 echo wpbc_get_slug_format( trim( wpbc_dashboard_info_get_version_type_readable() . '_' . wpbc_dashboard_info_get_version_type_sites() . '_' . esc_attr( WP_BK_VERSION_NUM ) ) ); ?>"
2150 ><?php
2151 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2152 echo $version_title
2153 ?></a>
2154 </div>
2155
2156 <?php if ( $params_btn['is_show_wizard_button'] ) { ?>
2157 <div class="wpbc_ui_settings__center wpbc_container wpbc_container_booking_form" style="flex: 1 1 auto;">
2158 <a class="wpbc_button_light button-primary wpbc_button_green tooltip_top" style="padding: 12px 24px;"
2159 title="<?php echo esc_attr( sprintf( __('We\'ll guide you through the steps to set up WP Booking Calendar on your site.','booking'), '<strong>WP Booking Calendar</strong>' ) ); ?>"
2160 href="<?php echo esc_url( wpbc_get_settings_url() . '&wpbc_setup_wizard=reset&_wpnonce=' . wp_create_nonce( 'wpbc_settings_url_nonce' ) ); ?>"><?php
2161 esc_html_e( 'Start Setup Wizard', 'booking' )
2162 ?></a>
2163 </div>
2164 <?php } ?>
2165 </div><?php
2166 }
2167
2168 /**
2169 * Show Version card in top panel
2170 *
2171 * @return void
2172 */
2173 function wpbc_ui_settings_panel__top_path__version(){
2174 // Version ---------------------------------------------------------------------------------------------------------
2175
2176 $version_title = '';
2177
2178 if ( class_exists( 'wpdev_bk_personal' ) ) {
2179 $version_title .= wpbc_dashboard_info_get_version_type_readable();
2180 }
2181 if ( wpbc_is_this_demo() ) {
2182 $version_title .= ' (Demo)';
2183 } else {
2184 if ( 'free' != wpbc_dashboard_info_get_version_type() ) {
2185 $version_title .= ' (' . __( 'for', 'booking' ) . ' ' . trim( wpbc_dashboard_info_get_version_type_sites() ) . ')';
2186 }
2187 }
2188
2189 ?><style type="text/css">
2190 .wpbc_settings_path_el .wpbc_icn_numbers::before{
2191 font-size: 12px;
2192 vertical-align: -.19em;
2193 }
2194 </style>
2195 <div class="wpbc_settings_path_el wpbc_ui_settings__flex_container" style="margin-left:auto;flex-flow: row nowrap;">
2196 <a class="" href="https://wpbookingcalendar.com/changelog/#<?php
2197 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2198 echo wpbc_get_slug_format( trim( wpbc_dashboard_info_get_version_type_readable() . '_' . wpbc_dashboard_info_get_version_type_sites() . '_' . esc_attr( WP_BK_VERSION_NUM ) ) ); ?>">
2199 <span class="wpbc_ui_settings__text_color__green"><i class="menu_icon icon-1x wpbc_icn_numbers -bi-balloon-heart bi-activity"></i> <?php echo esc_attr( WP_BK_VERSION_NUM ); ?></span>
2200 </a>
2201 <a class="wpbc_ui_settings__text_color__purple2" style="margin-left:1em;"
2202 href="https://wpbookingcalendar.com/faq/difference-single-developer-multi-site/#<?php
2203 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2204 echo wpbc_get_slug_format( trim( wpbc_dashboard_info_get_version_type_readable() . '_' . wpbc_dashboard_info_get_version_type_sites() . '_' . esc_attr( WP_BK_VERSION_NUM ) ) ); ?>"
2205 ><?php
2206 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2207 echo $version_title
2208 ?></a>
2209 </div><?php
2210 }
2211
2212 /**
2213 * Show statistic card in top panel
2214 *
2215 * @param $card_name
2216 * @param $statistic_cards_arr
2217 *
2218 * @return void
2219 */
2220 function wpbc_ui_settings_panel__card__statistic( $card_name , $statistic_cards_arr ){
2221
2222 if ( ( empty( $statistic_cards_arr ) ) || ( ! isset( $statistic_cards_arr[ $card_name ] ) ) ) {
2223 return;
2224 }
2225
2226 $bk_admin_url = wpbc_get_bookings_url();
2227 $count_name = $card_name;
2228 $count_num = $statistic_cards_arr[ $card_name ];
2229
2230
2231 switch ( $count_name ) {
2232 case 'all':
2233
2234 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2235 <div class="wpbc_ui_settings__text_row">
2236 <i class="menu_icon icon-1x wpbc_icn_trending_up"></i>
2237 <h1>
2238 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[0]=3&tab=vm_booking_listing&overwrite=1' ); ?>">
2239 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2240 </a>
2241 </h1>
2242 </div>
2243 <div class="wpbc_ui_settings__text_row">
2244 <a class="wpbc_ui_settings__text_color__black2" style="font-weight: 600;"
2245 href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[0]=3&tab=vm_booking_listing&overwrite=1' ); ?>"> <?php esc_html_e( 'All Bookings', 'booking' ); ?>
2246 </a>
2247 </div>
2248 </div><?php
2249
2250 break;
2251
2252 case 'new':
2253
2254 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2255 <div class="wpbc_ui_settings__text_row">
2256 <i class="menu_icon icon-1x wpbc-bi-eye"></i>
2257 <h1>
2258 <a href="<?php echo esc_url( $bk_admin_url .'&wh_what_bookings=new&wh_trash=0&wh_booking_date[]=3&tab=vm_booking_listing&overwrite=1' ); ?>">
2259 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2260 </a>
2261 </h1>
2262 </div>
2263 <div class="wpbc_ui_settings__text_row">
2264 <a class="wpbc_ui_settings__text_color__blue" href="<?php echo esc_url( $bk_admin_url .'&wh_what_bookings=new&wh_trash=0&wh_booking_date[]=3&tab=vm_booking_listing&overwrite=1' ); ?>"> <?php esc_html_e( 'New (unverified) booking(s)', 'booking' ); ?>
2265 </a>
2266 </div>
2267 </div><?php
2268
2269 break;
2270
2271 case 'pending':
2272
2273 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2274 <div class="wpbc_ui_settings__text_row">
2275 <i class="menu_icon icon-1x wpbc-bi-slash-circle 0wpbc_icn_block"></i>
2276 <h1>
2277 <a href="<?php echo esc_url( $bk_admin_url .'&wh_approved=0&wh_trash=0&wh_booking_date[]=3&tab=vm_booking_listing&overwrite=1' ); ?>">
2278 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2279 </a>
2280 </h1>
2281 </div>
2282 <div class="wpbc_ui_settings__text_row">
2283 <a class="wpbc_ui_settings__text_color__orange" href="<?php echo esc_url( $bk_admin_url .'&wh_approved=0&wh_trash=0&wh_booking_date[]=3&tab=vm_booking_listing&overwrite=1' ); ?>">
2284 <?php esc_html_e( 'Pending booking(s)' ,'booking'); ?>
2285 </a>
2286 </div>
2287 </div><?php
2288
2289 break;
2290
2291 case 'approved':
2292
2293 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2294 <div class="wpbc_ui_settings__text_row">
2295 <i class="menu_icon icon-1x wpbc-bi-check2-circle 0check-circle 0wpbc_icn_check_circle_outline"></i>
2296 <h1>
2297 <a href="<?php echo esc_url( $bk_admin_url .'&wh_approved=1&wh_trash=0&wh_booking_date[]=3&tab=vm_booking_listing&overwrite=1' ); ?>">
2298 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2299 </a>
2300 </h1>
2301 </div>
2302 <div class="wpbc_ui_settings__text_row">
2303 <a class="wpbc_ui_settings__text_color__green" href="<?php echo esc_url( $bk_admin_url .'&wh_approved=1&wh_trash=0&wh_booking_date[]=3&tab=vm_booking_listing&overwrite=1' ); ?>">
2304 <?php esc_html_e( 'Approved booking(s)' ,'booking'); ?>
2305 </a>
2306 </div>
2307 </div><?php
2308
2309 break;
2310
2311 case 'booking_today':
2312 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2313 <div class="wpbc_ui_settings__text_row">
2314 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2315 <h1>
2316 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=1&tab=vm_booking_listing&overwrite=1' ); ?>">
2317 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2318 </a>
2319 </h1>
2320 </div>
2321 <div class="wpbc_ui_settings__text_row">
2322 <a class="wpbc_ui_settings__text_color__green" href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=1&tab=vm_booking_listing&overwrite=1' ); ?>">
2323 <?php esc_html_e( 'Booking(s) for today' ,'booking');?>
2324 </a>
2325 </div>
2326 </div><?php
2327
2328 break;
2329
2330 case 'was_made_today':
2331
2332 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2333 <div class="wpbc_ui_settings__text_row">
2334 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2335 <h1>
2336 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_modification_date[]=1&wh_booking_date[]=3&tab=vm_booking_listing&overwrite=1' ); ?>">
2337 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2338 </a>
2339 </h1>
2340 </div>
2341 <div class="wpbc_ui_settings__text_row">
2342 <a class="wpbc_ui_settings__text_color__red" href="<?php echo esc_url( $bk_admin_url . '&wh_trash=0&wh_modification_date[]=1&wh_booking_date[]=3&tab=vm_booking_listing&overwrite=1' ); ?>"> <?php esc_html_e( 'New booking(s) made today', 'booking' ); ?>
2343 </a>
2344 </div>
2345 </div><?php
2346
2347 break;
2348
2349 case 'check_in_today':
2350
2351 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2352 <div class="wpbc_ui_settings__text_row">
2353 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2354 <h1>
2355 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=10&tab=vm_booking_listing&overwrite=1' ); ?>">
2356 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2357 </a>
2358 </h1>
2359 </div>
2360 <div class="wpbc_ui_settings__text_row">
2361 <a class="wpbc_ui_settings__text_color__red2" href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=10&tab=vm_booking_listing&overwrite=1' ); ?>"> <?php esc_html_e( 'Check in - Today', 'booking' ); ?>
2362 </a>
2363 </div>
2364 </div><?php
2365
2366 break;
2367
2368 case 'check_out_today':
2369
2370 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2371 <div class="wpbc_ui_settings__text_row">
2372 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2373 <h1>
2374 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=11&tab=vm_booking_listing&overwrite=1' ); ?>">
2375 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2376 </a>
2377 </h1>
2378 </div>
2379 <div class="wpbc_ui_settings__text_row">
2380 <a class="wpbc_ui_settings__text_color__blue2" href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=11&tab=vm_booking_listing&overwrite=1' ); ?>"> <?php esc_html_e( 'Check out - Today', 'booking' ); ?>
2381 </a>
2382 </div>
2383 </div><?php
2384
2385 break;
2386
2387 case 'check_in_tomorrow':
2388
2389 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2390 <div class="wpbc_ui_settings__text_row">
2391 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2392 <h1>
2393 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=7&tab=vm_booking_listing&overwrite=1' ); ?>">
2394 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2395 </a>
2396 </h1>
2397 </div>
2398 <div class="wpbc_ui_settings__text_row">
2399 <a class="wpbc_ui_settings__text_color__orange2" href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=7&tab=vm_booking_listing&overwrite=1' ); ?>"> <?php esc_html_e( 'Check in - Tomorrow', 'booking' ); ?>
2400 </a>
2401 </div>
2402 </div><?php
2403
2404 break;
2405
2406 case 'check_out_tomorrow':
2407
2408 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2409 <div class="wpbc_ui_settings__text_row">
2410 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2411 <h1>
2412 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=8&tab=vm_booking_listing&overwrite=1' ); ?>">
2413 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2414 </a>
2415 </h1>
2416 </div>
2417 <div class="wpbc_ui_settings__text_row">
2418 <a class="wpbc_ui_settings__text_color__green2" href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=8&tab=vm_booking_listing&overwrite=1' ); ?>"> <?php esc_html_e( 'Check out - Tomorrow', 'booking' ); ?>
2419 </a>
2420 </div>
2421 </div><?php
2422
2423 break;
2424 }
2425
2426 }
2427