PluginProbe
Booking Calendar / 10.11.3
Booking Calendar v10.11.3
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 10.11.3, at includes/_toolbar_ui/ui__settings_panel.php

2,376 lines 95.6 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 if ( ! empty( $params['is_use_permalink'] ) ) {
514 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_availability_tab';
515 $onclick = "";
516 } else {
517 $permalink = 'javascript:void(0);';
518 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_availability_tab a' ,'#wpbc_general_settings_availability_metabox', '" . $title . "' );";
519 }
520
521 ?><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">
522 <div class="wpbc_ui_settings__text_row">
523 <i class="menu_icon icon-1x wpbc-bi-calendar-check bi-calendar2-day"></i>
524 <h1>
525 <a onclick="<?php
526 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
527 echo $onclick; ?>" href="<?php
528 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
529 echo $permalink; ?>">
530 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
531 </a>
532 </h1>
533 </div>
534 <div class="wpbc_ui_settings__text_row">
535 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
536 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
537 echo $onclick; ?>" href="<?php
538 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
539 echo $permalink; ?>"> <?php esc_html_e( 'Define unavailable weekdays, add booking buffers, and customize unavailable day options.', 'booking' ); ?>
540 </a>
541 </div>
542 </div><?php
543
544 }
545
546 /**
547 * Show == Dashboard Card - General Availability ==
548 *
549 * @return void
550 */
551 function wpbc_ui_settings_panel__card__capacity( $params = array() ){
552
553 $title = esc_attr__( 'Booking Capacity', 'booking' );
554
555 if ( ! empty( $params['is_use_permalink'] ) ) {
556 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_capacity_tab';
557 $onclick = "";
558 } else {
559 $permalink = 'javascript:void(0);';
560 $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 . "' );";
561 }
562
563 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__capacity">
564 <div class="wpbc_ui_settings__text_row">
565 <i class="menu_icon icon-1x wpbc_icn_filter_none"></i>
566 <h1>
567 <a onclick="<?php
568 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
569 echo $onclick; ?>" href="<?php
570 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
571 echo $permalink; ?>">
572 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
573 </a>
574 </h1>
575 </div>
576 <div class="wpbc_ui_settings__text_row">
577 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
578 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
579 echo $onclick; ?>" href="<?php
580 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
581 echo $permalink; ?>"> <?php esc_html_e( 'Manage the ability to accept multiple bookings for the same date or time slot.', 'booking' ); ?>
582 </a>
583 </div>
584 </div><?php
585
586 }
587
588 // ---------------------------------------------------------------------------------------------------------------------
589
590 /**
591 * Show Settings = Form = Panel
592 *
593 * @return void
594 */
595 function wpbc_ui_settings__panel__form( $params = array() ){
596
597 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__form"><?php
598
599 wpbc_ui_settings__panel_start();
600
601 wpbc_ui_settings_panel__card__form_fields( $params );
602 wpbc_ui_settings_panel__card__time_fields( $params );
603 wpbc_ui_settings_panel__card__time_slots_options( $params );
604 wpbc_ui_settings_panel__card__form_options( $params );
605
606 wpbc_ui_settings__panel_end();
607
608 ?></div><?php
609
610 }
611
612 /**
613 * Show == Dashboard Card - Booking Form Fields ==
614 *
615 * @return void
616 */
617 function wpbc_ui_settings_panel__card__form_fields( $params = array() ){
618
619 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
620 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=form' ) . '" ';
621
622 ?><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">
623 <div class="wpbc_ui_settings__text_row">
624 <i class="menu_icon icon-1x wpbc_icn_dashboard"></i>
625 <h1>
626 <a onclick="<?php
627 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
628 echo $onclick; ?>" <?php
629 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
630 echo $url; ?>>
631 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Booking Form Fields','booking'); ?></span>
632 </a>
633 </h1>
634 </div>
635 <div class="wpbc_ui_settings__text_row">
636 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
637 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
638 echo $onclick; ?>" <?php
639 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
640 echo $url; ?>> <?php esc_html_e( 'Add, remove, or customize fields in your booking form.', 'booking' ); ?>
641 </a>
642 </div>
643 </div><?php
644
645 }
646
647 /**
648 * Show == Dashboard Card - Time Fields ==
649 *
650 * @return void
651 */
652 function wpbc_ui_settings_panel__card__time_fields( $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=form&field_type=timeslots' ) . '" ';
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__time_fields">
658 <div class="wpbc_ui_settings__text_row">
659 <i class="menu_icon icon-1x wpbc_icn_schedule"></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__('Time Slot Configuration','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( 'Enable and configure time selection fields in your booking form.', 'booking' ); ?>
676 </a>
677 </div>
678 </div><?php
679
680 }
681
682
683 /**
684 * Show == Dashboard Card - Form Options ==
685 *
686 * @return void
687 */
688 function wpbc_ui_settings_panel__card__form_options( $params = array() ){
689
690 $title = esc_attr__( 'Booking Form Options', 'booking' );
691
692 if ( ! empty( $params['is_use_permalink'] ) ) {
693 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_form_tab';
694 $onclick = '';
695 } else {
696 $permalink = 'javascript:void(0);';
697 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_form_tab a' ,'#wpbc_general_settings_form_metabox', '" . $title . "' );";
698 }
699 $onclick = '';
700 $permalink = wpbc_get_settings_url() . '&tab=form&subtab=form_options';
701
702 ?><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">
703 <div class="wpbc_ui_settings__text_row">
704 <i class="menu_icon icon-1x wpbc-bi-toggle2-off"></i>
705 <h1>
706 <a onclick="<?php
707 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
708 echo $onclick; ?>" href="<?php
709 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
710 echo $permalink; ?>">
711 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
712 </a>
713 </h1>
714 </div>
715 <div class="wpbc_ui_settings__text_row">
716 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
717 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
718 echo $onclick; ?>" href="<?php
719 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
720 echo $permalink; ?>">
721 <?php esc_html_e( 'Enable CAPTCHA, auto-fill fields, and customize the form\'s color theme.', 'booking' ); ?>
722 </a>
723 </div>
724 </div><?php
725 }
726
727 /**
728 * Show == Dashboard Card - Time Slots Options ==
729 *
730 * @return void
731 */
732 function wpbc_ui_settings_panel__card__time_slots_options( $params = array() ){
733
734 $title = esc_attr__( 'Time Slot Appearance', 'booking' );
735
736 if ( ! empty( $params['is_use_permalink'] ) ) {
737 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_time_slots_tab';
738 $onclick = '';
739 } else {
740 $permalink = 'javascript:void(0);';
741 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_time_slots_tab a' ,'#wpbc_general_settings_time_slots_metabox', '" . $title . "' );";
742 }
743 $permalink = wpbc_get_settings_url() . '&tab=color_themes';
744 $onclick = '';
745
746 ?><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">
747 <div class="wpbc_ui_settings__text_row">
748 <i class="menu_icon icon-1x wpbc_icn_more_time"></i>
749 <h1>
750 <a onclick="<?php
751 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
752 echo $onclick; ?>" href="<?php
753 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
754 echo $permalink; ?>">
755 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
756 </a>
757 </h1>
758 </div>
759 <div class="wpbc_ui_settings__text_row">
760 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
761 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
762 echo $onclick; ?>" href="<?php
763 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
764 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' ); ?>
765 </a>
766 </div>
767 </div><?php
768 }
769
770 // ---------------------------------------------------------------------------------------------------------------------
771
772 /**
773 * Show Settings = Booking Confirmation = Panel
774 *
775 * @return void
776 */
777 function wpbc_ui_settings__panel__booking_confirmation( $params = array() ){
778
779 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__booking_confirmation"><?php
780
781 wpbc_ui_settings__panel_start();
782
783 wpbc_ui_settings_panel__card__booking_confirmation( $params );
784
785 wpbc_ui_settings__panel_end();
786
787 ?></div><?php
788
789 }
790
791 /**
792 * Show == Dashboard Card - Booking Confirmation ==
793 *
794 * @return void
795 */
796 function wpbc_ui_settings_panel__card__booking_confirmation( $params = array() ){
797
798 $title = esc_attr__( 'Booking Confirmation', 'booking' );
799
800 if ( ! empty( $params['is_use_permalink'] ) ) {
801 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_booking_confirmation_tab';
802 $onclick = "";
803 } else {
804 $permalink = 'javascript:void(0);';
805 $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 . "' );";
806 }
807
808 ?><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">
809 <div class="wpbc_ui_settings__text_row">
810 <i class="menu_icon icon-1x wpbc-bi-card-checklist 0_icn_grading 0receipt"></i>
811 <h1>
812 <a onclick="<?php
813 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
814 echo $onclick; ?>" href="<?php
815 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
816 echo $permalink; ?>">
817 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
818 </a>
819 </h1>
820 </div>
821 <div class="wpbc_ui_settings__text_row">
822 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
823 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
824 echo $onclick; ?>" href="<?php
825 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
826 echo $permalink; ?>"> <?php esc_html_e( 'Customize how the booking summary is displayed after a booking is created.', 'booking' ); ?>
827 </a>
828 </div>
829 </div><?php
830 }
831
832 // ---------------------------------------------------------------------------------------------------------------------
833
834 /**
835 * Show Settings = Emails = Panel
836 *
837 * @return void
838 */
839 function wpbc_ui_settings__panel__notifications( $params = array() ){
840
841 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__notifications"><?php
842
843 wpbc_ui_settings__panel_start();
844
845 wpbc_ui_settings_panel__card__emails( $params );
846
847 wpbc_ui_settings__panel_end();
848
849 ?></div><?php
850
851 }
852
853 /**
854 * Show == Dashboard Card - Emails ==
855 *
856 * @return void
857 */
858 function wpbc_ui_settings_panel__card__emails( $params = array() ){
859
860 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
861 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=email' ) . '" ';
862
863 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__emails">
864 <div class="wpbc_ui_settings__text_row">
865 <i class="menu_icon icon-1x wpbc-bi-envelope-at 0paper _icn_mail_outline"></i>
866 <h1>
867 <a onclick="<?php
868 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
869 echo $onclick; ?>" <?php
870 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
871 echo $url; ?>>
872 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Emails','booking'); ?></span>
873 </a>
874 </h1>
875 </div>
876 <div class="wpbc_ui_settings__text_row">
877 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
878 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
879 echo $onclick; ?>" <?php
880 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
881 echo $url; ?>> <?php esc_html_e( 'Set up automatic email notifications for different booking actions.', 'booking' ); ?>
882 </a>
883 </div>
884 </div><?php
885
886 }
887
888 // ---------------------------------------------------------------------------------------------------------------------
889
890 /**
891 * Show Settings = Sync = Panel
892 *
893 * @return void
894 */
895 function wpbc_ui_settings__panel__sync_setup( $params = array() ){
896
897 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__sync_setup"><?php
898
899 wpbc_ui_settings__panel_start();
900
901 wpbc_ui_settings_panel__card__sync_options( $params );
902 wpbc_ui_settings_panel__card__import_ics( $params );
903 wpbc_ui_settings_panel__card__export_ics( $params );
904 wpbc_ui_settings_panel__card__import_google_cal( $params );
905
906 wpbc_ui_settings__panel_end();
907
908 ?></div><?php
909
910 }
911
912 /**
913 * Show == Dashboard Card - Sync Options ==
914 *
915 * @return void
916 */
917 function wpbc_ui_settings_panel__card__sync_options( $params = array() ){
918
919 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
920 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=sync&subtab=general' ) . '" ';
921
922 ?><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">
923 <div class="wpbc_ui_settings__text_row">
924 <i class="menu_icon icon-1x wpbc_icn_sync_alt"></i>
925 <h1>
926 <a onclick="<?php
927 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
928 echo $onclick; ?>" <?php
929 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
930 echo $url; ?>>
931 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Sync Options','booking'); ?></span>
932 </a>
933 </h1>
934 </div>
935 <div class="wpbc_ui_settings__text_row">
936 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
937 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
938 echo $onclick; ?>" <?php
939 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
940 echo $url; ?>> <?php esc_html_e( 'Configure import/export rules, timezones, and which fields to include in sync operations.', 'booking' ); ?>
941 </a>
942 </div>
943 </div><?php
944
945 }
946
947
948 /**
949 * Show == Dashboard Card - Import - .ics ==
950 *
951 * @return void
952 */
953 function wpbc_ui_settings_panel__card__import_ics( $params = array() ){
954
955 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
956 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=sync&subtab=import' ) . '" ';
957
958 ?><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">
959 <div class="wpbc_ui_settings__text_row">
960 <i class="menu_icon icon-1x wpbc-bi-box-arrow-in-down-right"></i>
961 <h1>
962 <a onclick="<?php
963 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
964 echo $onclick; ?>" <?php
965 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
966 echo $url; ?>>
967 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Import Bookings via .ics','booking'); ?></span>
968 </a>
969 </h1>
970 </div>
971 <div class="wpbc_ui_settings__text_row">
972 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
973 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
974 echo $onclick; ?>" <?php
975 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
976 echo $url; ?>> <?php esc_html_e( 'Set up and configure the import of events using .ics feeds.', 'booking' ); ?>
977 </a>
978 </div>
979 </div><?php
980
981 }
982
983
984 /**
985 * Show == Dashboard Card - Export - .ics ==
986 *
987 * @return void
988 */
989 function wpbc_ui_settings_panel__card__export_ics( $params = array() ){
990
991 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
992 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=sync&subtab=export' ) . '" ';
993
994 ?><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">
995 <div class="wpbc_ui_settings__text_row">
996 <i class="menu_icon icon-1x wpbc-bi-box-arrow-up-right"></i>
997 <h1>
998 <a onclick="<?php
999 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1000 echo $onclick; ?>" <?php
1001 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1002 echo $url; ?>>
1003 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Export Bookings via .ics','booking'); ?></span>
1004 </a>
1005 </h1>
1006 </div>
1007 <div class="wpbc_ui_settings__text_row">
1008 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1009 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1010 echo $onclick; ?>" <?php
1011 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1012 echo $url; ?>> <?php esc_html_e( 'Set up and configure the export of bookings into .ics feeds.', 'booking' ); ?>
1013 </a>
1014 </div>
1015 </div><?php
1016
1017 }
1018
1019
1020 /**
1021 * Show == Dashboard Card - Import - .ics ==
1022 *
1023 * @return void
1024 */
1025 function wpbc_ui_settings_panel__card__import_google_cal( $params = array() ){
1026
1027 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
1028 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=sync&subtab=gcal' ) . '" ';
1029
1030 ?><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">
1031 <div class="wpbc_ui_settings__text_row">
1032 <i class="menu_icon icon-1x wpbc_icn_event"></i>
1033 <h1>
1034 <a onclick="<?php
1035 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1036 echo $onclick; ?>" <?php
1037 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1038 echo $url; ?>>
1039 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Import Google Calendar Events','booking'); ?></span>
1040 </a>
1041 </h1>
1042 </div>
1043 <div class="wpbc_ui_settings__text_row">
1044 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1045 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1046 echo $onclick; ?>" <?php
1047 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1048 echo $url; ?>> <?php esc_html_e( 'Set up and configure the import of Google Calendar events using the API.', 'booking' ); ?>
1049 </a>
1050 </div>
1051 </div><?php
1052
1053 }
1054
1055 // ---------------------------------------------------------------------------------------------------------------------
1056
1057 /**
1058 * Show Settings = Payment Setup = Panel
1059 *
1060 * @return void
1061 */
1062 function wpbc_ui_settings__panel__payment_setup( $params = array() ){
1063
1064 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__payment_setup"><?php
1065
1066 wpbc_ui_settings__panel_start();
1067
1068 wpbc_ui_settings_panel__card__payment_setup( $params );
1069 wpbc_ui_settings_panel__card__currency( $params );
1070 wpbc_ui_settings_panel__card__payment_options( $params );
1071
1072 wpbc_ui_settings__panel_end();
1073
1074 ?></div><?php
1075
1076 }
1077
1078 /**
1079 * Show == Dashboard Card - Payment Gateways ==
1080 *
1081 * @return void
1082 */
1083 function wpbc_ui_settings_panel__card__payment_setup( $params = array() ){
1084
1085 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
1086 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
1087 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=payment' ) . '" ';
1088 } else {
1089 $onclick = '';
1090 $url = ' href="https://wpbookingcalendar.com/features/#payments" ';
1091 }
1092
1093 ?><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">
1094 <div class="wpbc_ui_settings__text_row">
1095 <i class="menu_icon icon-1x wpbc-bi-credit-card-2-back"></i>
1096 <h1>
1097 <a <?php
1098 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1099 echo $url; ?> <?php
1100 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1101 echo $onclick; ?> >
1102 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Payment Gateways','booking'); ?></span>
1103 </a>
1104 </h1>
1105 <?php if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { ?>
1106 <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>
1107 <?php } ?>
1108 </div>
1109 <div class="wpbc_ui_settings__text_row">
1110 <a class="wpbc_ui_settings__text_color__black" <?php
1111 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1112 echo $url; ?> <?php
1113 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1114 echo $onclick; ?> >
1115 <?php
1116 /* translators: 1: ... */
1117 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, ...') ); ?>
1118 </a>
1119 </div>
1120 </div><?php
1121
1122 }
1123
1124 /**
1125 * Show == Dashboard Card - Currency ==
1126 *
1127 * @return void
1128 */
1129 function wpbc_ui_settings_panel__card__currency( $params = array() ){
1130
1131 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
1132 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
1133 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=payment#wpbc_settings_payment_currency_metabox' ) . '" ';
1134 } else {
1135 $onclick = '';
1136 $url = ' href="https://wpbookingcalendar.com/features/#payments" ';
1137 }
1138
1139 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__currency">
1140 <div class="wpbc_ui_settings__text_row">
1141 <i class="menu_icon icon-1x wpbc-bi-currency-exchange _icn_attach_money"></i>
1142 <h1>
1143 <a <?php
1144 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1145 echo $url; ?> <?php
1146 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1147 echo $onclick; ?> >
1148 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Set Currency','booking'); ?></span>
1149 </a>
1150 </h1>
1151 <?php if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { ?>
1152 <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>
1153 <?php } ?>
1154 </div>
1155 <div class="wpbc_ui_settings__text_row">
1156 <a class="wpbc_ui_settings__text_color__black" <?php
1157 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1158 echo $url; ?> <?php
1159 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1160 echo $onclick; ?> > <?php esc_html_e( 'Configure the currency used for bookings and payments.', 'booking' ); ?>
1161 </a>
1162 </div>
1163 </div><?php
1164
1165 }
1166
1167 /**
1168 * Show == Dashboard Card - Payment Options ==
1169 *
1170 * @return void
1171 */
1172 function wpbc_ui_settings_panel__card__payment_options( $params = array() ){
1173
1174 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
1175 $onclick = '';// ' onclick="' . "javascript:wpbc_navigation_click_show_section(this,'#wpbc_general_settings_calendar_metabox' );" . '" ';
1176 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=payment#wpbc_settings_payment_options_metabox' ) . '" ';
1177 } else {
1178 $onclick = '';
1179 $url = ' href="https://wpbookingcalendar.com/features/#payments" ';
1180 }
1181
1182 ?><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">
1183 <div class="wpbc_ui_settings__text_row">
1184 <i class="menu_icon icon-1x wpbc-bi-cash-coin wallet2"></i>
1185 <h1>
1186 <a <?php
1187 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1188 echo $url; ?> <?php
1189 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1190 echo $onclick; ?> >
1191 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Payment Options','booking'); ?></span>
1192 </a>
1193 </h1>
1194 <?php if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { ?>
1195 <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>
1196 <?php } ?>
1197 </div>
1198 <div class="wpbc_ui_settings__text_row">
1199 <a class="wpbc_ui_settings__text_color__black" <?php
1200 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1201 echo $url; ?> <?php
1202 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1203 echo $onclick; ?> >
1204 <?php esc_html_e('Configure cost per day or night, and set up different payment methods and pricing options.' , 'booking'); ?>
1205 </a>
1206 </div>
1207 </div><?php
1208
1209 }
1210
1211
1212
1213 /**
1214 * Show Settings = Search Availability = Panel
1215 *
1216 * @return void
1217 */
1218 function wpbc_ui_settings__panel__search_availability( $params = array() ){
1219
1220 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__search_availability"><?php
1221
1222 wpbc_ui_settings__panel_start();
1223
1224 wpbc_ui_settings_panel__card__search_availability( $params );
1225
1226 wpbc_ui_settings__panel_end();
1227
1228 ?></div><?php
1229
1230 }
1231
1232 /**
1233 * Show == Dashboard Card - Search Availability ==
1234 *
1235 * @return void
1236 */
1237 function wpbc_ui_settings_panel__card__search_availability( $params = array() ){
1238
1239 if ( class_exists( 'wpdev_bk_biz_l' ) ) {
1240 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=search' ) . '" ';
1241 } else {
1242 $url = ' href="https://wpbookingcalendar.com/features/#search" ';
1243 }
1244
1245 ?><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">
1246 <div class="wpbc_ui_settings__text_row">
1247 <i class="menu_icon icon-1x wpbc_icn_youtube_searched_for"></i>
1248 <h1>
1249 <a <?php
1250 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1251 echo $url; ?>>
1252 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Search Availability','booking'); ?></span>
1253 </a>
1254 </h1>
1255 <?php if ( ! class_exists( 'wpdev_bk_biz_l' ) ) { ?>
1256 <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>
1257 <?php } ?>
1258 </div>
1259 <div class="wpbc_ui_settings__text_row">
1260 <a class="wpbc_ui_settings__text_color__black" <?php
1261 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1262 echo $url; ?>> <?php esc_html_e( 'Configure the layout and functionality of both the search form and search results', 'booking' ); ?>.
1263 </a>
1264 </div>
1265 </div><?php
1266 }
1267
1268 // ---------------------------------------------------------------------------------------------------------------------
1269
1270 /**
1271 * Show Settings = MultiUser = Panel
1272 *
1273 * @return void
1274 */
1275 function wpbc_ui_settings__panel__mu( $params = array() ){
1276
1277 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__mu"><?php
1278
1279 wpbc_ui_settings__panel_start();
1280
1281 wpbc_ui_settings_panel__card__mu( $params );
1282
1283 wpbc_ui_settings__panel_end();
1284
1285 ?></div><?php
1286
1287 }
1288
1289 /**
1290 * Show == Dashboard Card - MultiUser ==
1291 *
1292 * @return void
1293 */
1294 function wpbc_ui_settings_panel__card__mu( $params = array() ){
1295
1296 if ( class_exists( 'wpdev_bk_multiuser' ) ) {
1297 $url = ' href="' . esc_url( wpbc_get_settings_url() . '&tab=users' ) . '" ';
1298 } else {
1299 $url = ' href="https://wpbookingcalendar.com/features/#multiuser" ';
1300 }
1301
1302 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__mu">
1303 <div class="wpbc_ui_settings__text_row">
1304 <i class="menu_icon icon-1x wpbc_icn_people_alt"></i>
1305 <h1>
1306 <a <?php
1307 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1308 echo $url; ?>>
1309 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html__('Multiuser Admin Panels','booking'); ?></span>
1310 </a>
1311 </h1>
1312 <?php if ( ! class_exists( 'wpdev_bk_multiuser' ) ) { ?>
1313 <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>
1314 <?php } ?>
1315 </div>
1316 <div class="wpbc_ui_settings__text_row">
1317 <a class="wpbc_ui_settings__text_color__black" <?php
1318 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1319 echo $url; ?>> <?php esc_html_e( 'Enable separate booking admin panels for different WordPress users.', 'booking' ); ?>
1320 </a>
1321 </div>
1322 </div><?php
1323
1324 }
1325
1326
1327 // ---------------------------------------------------------------------------------------------------------------------
1328
1329 /**
1330 * Show Settings = Manage Bookings = Panel
1331 *
1332 * @return void
1333 */
1334 function wpbc_ui_settings__panel__manage_bookings( $params = array() ){
1335
1336 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__manage_bookings"><?php
1337
1338 wpbc_ui_settings__panel_start();
1339
1340 wpbc_ui_settings_panel__card__timeline_front_end( $params );
1341 wpbc_ui_settings_panel__card__manage_bookings( $params );
1342 wpbc_ui_settings_panel__card__auto_cancel_approve( $params );
1343
1344 wpbc_ui_settings__panel_end();
1345
1346 ?></div><?php
1347
1348 }
1349
1350 /**
1351 * Show == Dashboard Card - TimeLine Front-End ==
1352 *
1353 * @return void
1354 */
1355 function wpbc_ui_settings_panel__card__timeline_front_end( $params = array() ){
1356
1357 $title = esc_attr__( 'Timeline (Front-End)', 'booking' );
1358
1359 if ( ! empty( $params['is_use_permalink'] ) ) {
1360 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_booking_timeline_tab';
1361 $onclick = "";
1362 } else {
1363 $permalink = 'javascript:void(0);';
1364 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_timeline_tab a' ,'#wpbc_general_settings_booking_timeline_metabox', '" . $title . "' );";
1365 }
1366
1367 ?><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">
1368 <div class="wpbc_ui_settings__text_row">
1369 <i class="menu_icon icon-1x wpbc_icn_rotate_90 wpbc_icn_align_vertical_bottom"></i>
1370 <h1>
1371 <a onclick="<?php
1372 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1373 echo $onclick; ?>" href="<?php
1374 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1375 echo $permalink; ?>">
1376 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1377 </a>
1378 </h1>
1379 </div>
1380 <div class="wpbc_ui_settings__text_row">
1381 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1382 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1383 echo $onclick; ?>" href="<?php
1384 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1385 echo $permalink; ?>"> <?php esc_html_e( 'Customize timeline options, including the display of booking details.', 'booking' ); ?>
1386 <?php if ( ! class_exists( 'wpdev_bk_personal' ) ) { ?>
1387 <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>
1388 <?php } ?>
1389
1390 </a>
1391 </div>
1392 </div><?php
1393 }
1394
1395 /**
1396 * Show == Dashboard Card - Manage Bookings ==
1397 *
1398 * @return void
1399 */
1400 function wpbc_ui_settings_panel__card__manage_bookings( $params = array() ){
1401
1402 $dismiss_id = 'wpbc_is_dismissed__card__manage_bookings';
1403 list( $is_panel_visible, $dismiss_x_button ) = wpbc_is_dissmissed__in_settings_panel_card( $dismiss_id, 'wpdev_bk_personal' );
1404 if ( ! $is_panel_visible ) { return; }
1405
1406 $title = esc_attr__( 'Manage Bookings', 'booking' );
1407
1408 if ( class_exists( 'wpdev_bk_personal' ) ) {
1409 $onclick = ' onclick="';
1410 $onclick .= "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_bookings_options_tab a' ,'#wpbc_general_settings_bookings_options_metabox', '" . $title . "' );";
1411 //$onclick .= " wpbc_blink_element('.wpbc_tr_set_gen_booking_range_selection_time_is_active', 4, 350); ";
1412 $onclick .= '" ';
1413
1414 $url = ' href="javascript:void(0);" ';
1415
1416 if ( ! empty( $params['is_use_permalink'] ) ) {
1417 $url = ' href="'. esc_url( wpbc_get_settings_url() ) . '&scroll_to_section=wpbc_general_settings_bookings_options_tab" ';
1418 $onclick = "";
1419 }
1420
1421 } else {
1422 $onclick = '';
1423 $url = ' href="https://wpbookingcalendar.com/features/#manage-bookings" ';
1424 }
1425
1426 ?><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">
1427 <div class="wpbc_ui_settings__text_row">
1428 <i class="menu_icon icon-1x wpbc_icn_app_registration mode_edit_outline edit_calendar"></i>
1429 <h1>
1430 <a <?php
1431 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1432 echo $url; ?> <?php
1433 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1434 echo $onclick; ?> >
1435 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1436 </a>
1437 </h1>
1438 <?php if ( ! class_exists( 'wpdev_bk_personal' ) ) { ?>
1439 <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>
1440 <?php
1441 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1442 echo $dismiss_x_button; ?>
1443 <?php } ?>
1444 </div>
1445 <div class="wpbc_ui_settings__text_row">
1446 <a class="wpbc_ui_settings__text_color__black" <?php
1447 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1448 echo $url; ?> <?php
1449 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1450 echo $onclick; ?> > <?php esc_html_e( 'Allow customers to edit or cancel their own bookings.', 'booking' ); ?>
1451 </a>
1452 </div>
1453 </div><?php
1454
1455 }
1456
1457 /**
1458 * Show == Dashboard Card - Auto Cancellation / Auto Approval ==
1459 *
1460 * @return void
1461 */
1462 function wpbc_ui_settings_panel__card__auto_cancel_approve( $params = array() ){
1463
1464 $dismiss_id = 'wpbc_is_dismissed__card__auto_cancel_approve';
1465 list( $is_panel_visible, $dismiss_x_button ) = wpbc_is_dissmissed__in_settings_panel_card( $dismiss_id, 'wpdev_bk_biz_s' );
1466 if ( ! $is_panel_visible ) { return; }
1467
1468 $title = esc_attr__( 'Auto Cancellation / Auto Approval', 'booking' );
1469
1470 if ( class_exists( 'wpdev_bk_biz_s' ) ) {
1471 $onclick = ' onclick="';
1472 $onclick .= "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_auto_cancelation_approval_tab a' ,'#wpbc_general_settings_auto_cancelation_approval_metabox', '" . $title . "' );";
1473 //$onclick .= " wpbc_blink_element('.wpbc_tr_set_gen_booking_range_selection_time_is_active', 4, 350); ";
1474 $onclick .= '" ';
1475 $url = ' href="javascript:void(0);" ';
1476
1477 if ( ! empty( $params['is_use_permalink'] ) ) {
1478 $url = ' href="'. esc_url( wpbc_get_settings_url() ) . '&scroll_to_section=wpbc_general_settings_auto_cancelation_approval_tab" ';
1479 $onclick = "";
1480 }
1481
1482 } else {
1483 $onclick = '';
1484 $url = ' href="https://wpbookingcalendar.com/features/#auto-cancellation" ';
1485 }
1486
1487 ?><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">
1488 <div class="wpbc_ui_settings__text_row">
1489 <i class="menu_icon icon-1x wpbc_icn_published_with_changes"></i>
1490 <h1>
1491 <a <?php
1492 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1493 echo $url; ?> <?php
1494 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1495 echo $onclick; ?> >
1496 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1497 </a>
1498 </h1>
1499 <?php if ( ! class_exists( 'wpdev_bk_biz_s' ) ) { ?>
1500 <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>
1501 <?php
1502 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1503 echo $dismiss_x_button; ?>
1504 <?php } ?>
1505 </div>
1506 <div class="wpbc_ui_settings__text_row">
1507 <a class="wpbc_ui_settings__text_color__black" <?php
1508 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1509 echo $url; ?> <?php
1510 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1511 echo $onclick; ?> > <?php esc_html_e( 'Enable automatic approval or cancellation of bookings.', 'booking' ); ?>
1512 </a>
1513 </div>
1514 </div><?php
1515 }
1516
1517
1518 // ---------------------------------------------------------------------------------------------------------------------
1519
1520 /**
1521 * Show Settings = Admin Panel = Panel
1522 *
1523 * @return void
1524 */
1525 function wpbc_ui_settings__panel__admin_panel( $params = array() ){
1526
1527 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__admin_panel"><?php
1528
1529 wpbc_ui_settings__panel_start();
1530
1531 wpbc_ui_settings_panel__card__admin_panel( $params );
1532 wpbc_ui_settings_panel__card__plugin_menu_permistions( $params );
1533 wpbc_ui_settings_panel__card__translations( $params );
1534 wpbc_ui_settings_panel__card__timeline_back_end( $params );
1535 wpbc_ui_settings_panel__card__date_time_format( $params );
1536
1537 wpbc_ui_settings__panel_end();
1538
1539 ?></div><?php
1540
1541 }
1542
1543
1544 /**
1545 * Show == Dashboard Card - Admin Panel ==
1546 *
1547 * @return void
1548 */
1549 function wpbc_ui_settings_panel__card__admin_panel( $params = array() ){
1550
1551 $title = esc_attr__( 'Admin Panel', 'booking' );
1552
1553 if ( ! empty( $params['is_use_permalink'] ) ) {
1554 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_booking_listing_tab';
1555 $onclick = "";
1556 } else {
1557 $permalink = 'javascript:void(0);';
1558 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_listing_tab a' ,'#wpbc_general_settings_booking_listing_metabox', '" . $title . "' );";
1559 }
1560
1561 ?><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">
1562 <div class="wpbc_ui_settings__text_row">
1563 <i class="menu_icon icon-1x wpbc-bi-speedometer2"></i>
1564 <h1>
1565 <a onclick="<?php
1566 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1567 echo $onclick; ?>" href="<?php
1568 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1569 echo $permalink; ?>">
1570 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1571 </a>
1572 </h1>
1573 </div>
1574 <div class="wpbc_ui_settings__text_row">
1575 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1576 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1577 echo $onclick; ?>" href="<?php
1578 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1579 echo $permalink; ?>"> <?php esc_html_e( 'Configure various options and settings in the admin panel.', 'booking' ); ?>
1580 </a>
1581 </div>
1582 </div><?php
1583 }
1584
1585 /**
1586 * Show == Dashboard Card - TimeLine Back-End ==
1587 *
1588 * @return void
1589 */
1590 function wpbc_ui_settings_panel__card__timeline_back_end( $params = array() ){
1591
1592 $title = esc_attr__('Timeline View','booking') . ' (' . esc_attr__('Back-End','booking') . ')';
1593
1594 if ( ! empty( $params['is_use_permalink'] ) ) {
1595 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_booking_calendar_overview_tab';
1596 $onclick = "";
1597 } else {
1598 $permalink = 'javascript:void(0);';
1599 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_calendar_overview_tab a' ,'#wpbc_general_settings_booking_calendar_overview_metabox', '" . $title . "' );";
1600 }
1601
1602 ?><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">
1603 <div class="wpbc_ui_settings__text_row">
1604 <i class="menu_icon icon-1x wpbc-bi-bar-chart-steps _icn_timeline 0wpbc_icn_rotate_45 0wpbc_icn_align_vertical_bottom"></i>
1605 <h1>
1606 <a onclick="<?php
1607 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1608 echo $onclick; ?>" href="<?php
1609 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1610 echo $permalink; ?>">
1611 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1612 </a>
1613 </h1>
1614 </div>
1615 <div class="wpbc_ui_settings__text_row">
1616 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1617 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1618 echo $onclick; ?>" href="<?php
1619 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1620 echo $permalink; ?>"> <?php esc_html_e( 'Customize timeline options in the admin panel, including displaying booking details.', 'booking' ); ?>
1621 </a>
1622 </div>
1623 </div><?php
1624 }
1625
1626
1627 /**
1628 * Show == Dashboard Card - TimeLine Back-End ==
1629 *
1630 * @return void
1631 */
1632 function wpbc_ui_settings_panel__card__date_time_format( $params = array() ){
1633
1634 $title = esc_attr__( 'Date and Time Formats', 'booking' );
1635
1636 if ( ! empty( $params['is_use_permalink'] ) ) {
1637 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_datestimes_tab';
1638 $onclick = "";
1639 } else {
1640 $permalink = 'javascript:void(0);';
1641 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_datestimes_tab a' ,'#wpbc_general_settings_datestimes_metabox', '" . $title . "' );";
1642 }
1643
1644 ?><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">
1645 <div class="wpbc_ui_settings__text_row">
1646 <i class="menu_icon icon-1x wpbc-bi-braces-asterisk _icn_password"></i>
1647 <h1>
1648 <a onclick="<?php
1649 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1650 echo $onclick; ?>" href="<?php
1651 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1652 echo $permalink; ?>">
1653 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1654 </a>
1655 </h1>
1656 </div>
1657 <div class="wpbc_ui_settings__text_row">
1658 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1659 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1660 echo $onclick; ?>" href="<?php
1661 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1662 echo $permalink; ?>"> <?php esc_html_e( 'Customize the display format for dates and times.', 'booking' ); ?>
1663 </a>
1664 </div>
1665 </div><?php
1666 }
1667
1668
1669 /**
1670 * Show == Dashboard Card - Plugin Menu / Permissions ==
1671 *
1672 * @return void
1673 */
1674 function wpbc_ui_settings_panel__card__plugin_menu_permistions( $params = array() ){
1675
1676 $title = esc_attr__( 'Plugin Menu / Permissions', 'booking' );
1677
1678 if ( ! empty( $params['is_use_permalink'] ) ) {
1679 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_permissions_tab';
1680 $onclick = "";
1681 } else {
1682 $permalink = 'javascript:void(0);';
1683 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_permissions_tab a' ,'#wpbc_general_settings_permissions_metabox', '" . $title . "' );";
1684 }
1685
1686 ?><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">
1687 <div class="wpbc_ui_settings__text_row">
1688 <i class="menu_icon icon-1x wpbc-bi-key"></i>
1689 <h1>
1690 <a onclick="<?php
1691 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1692 echo $onclick; ?>" href="<?php
1693 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1694 echo $permalink; ?>">
1695 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1696 </a>
1697 </h1>
1698 </div>
1699 <div class="wpbc_ui_settings__text_row">
1700 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1701 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1702 echo $onclick; ?>" href="<?php
1703 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1704 echo $permalink; ?>"> <?php esc_html_e( 'Set user permissions for accessing plugin menu pages and configure the menu position.', 'booking' ); ?>
1705 </a>
1706 </div>
1707 </div><?php
1708 }
1709
1710
1711 /**
1712 * Show == Dashboard Card - Translations ==
1713 *
1714 * @return void
1715 */
1716 function wpbc_ui_settings_panel__card__translations( $params = array() ){
1717
1718 $title = esc_attr__( 'Translations', 'booking' );
1719
1720 if ( ! empty( $params['is_use_permalink'] ) ) {
1721 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_translations_tab';
1722 $onclick = "";
1723 } else {
1724 $permalink = 'javascript:void(0);';
1725 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_translations_tab a' ,'#wpbc_general_settings_translations_metabox', '" . $title . "' );";
1726 }
1727
1728 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__translations">
1729 <div class="wpbc_ui_settings__text_row">
1730 <i class="menu_icon icon-1x wpbc_icn_translate 0wpbc-bi-translate"></i>
1731 <h1>
1732 <a onclick="<?php
1733 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1734 echo $onclick; ?>" href="<?php
1735 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1736 echo $permalink; ?>">
1737 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1738 </a>
1739 </h1>
1740 </div>
1741 <div class="wpbc_ui_settings__text_row">
1742 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1743 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1744 echo $onclick; ?>" href="<?php
1745 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1746 echo $permalink; ?>"> <?php esc_html_e( 'Choose whether to use local translations or WordPress translations.', 'booking' ); ?>
1747 </a>
1748 </div>
1749 </div><?php
1750 }
1751
1752
1753 // ---------------------------------------------------------------------------------------------------------------------
1754
1755 /**
1756 * Show Settings = Advanced Settings = Panel
1757 *
1758 * @return void
1759 */
1760 function wpbc_ui_settings__panel__advanced_settings( $params = array() ){
1761
1762 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__advanced_settings"><?php
1763
1764 wpbc_ui_settings__panel_start();
1765
1766 wpbc_ui_settings_panel__card__advanced_settings( $params );
1767 wpbc_ui_settings_panel__card__uninstall( $params );
1768 wpbc_ui_settings_panel__card__info_news( $params );
1769 //wpbc_ui_settings_panel__card__tools( $params );
1770
1771 wpbc_ui_settings__panel_end();
1772
1773 ?></div><?php
1774
1775 }
1776
1777
1778 /**
1779 * Show == Dashboard Card - Advanced ==
1780 *
1781 * @return void
1782 */
1783 function wpbc_ui_settings_panel__card__advanced_settings( $params = array() ){
1784
1785 $title = esc_attr__( 'Advanced Options', 'booking' );
1786
1787 if ( ! empty( $params['is_use_permalink'] ) ) {
1788 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_advanced_tab';
1789 $onclick = "";
1790 } else {
1791 $permalink = 'javascript:void(0);';
1792 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_advanced_tab a' ,'#wpbc_general_settings_advanced_metabox', '" . $title . "' );";
1793 }
1794
1795 ?><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">
1796 <div class="wpbc_ui_settings__text_row">
1797 <i class="menu_icon icon-1x wpbc-bi-gear _icn_adjust 0wpbc-bi-translate"></i>
1798 <h1>
1799 <a onclick="<?php
1800 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1801 echo $onclick; ?>" href="<?php
1802 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1803 echo $permalink; ?>">
1804 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1805 </a>
1806 </h1>
1807 </div>
1808 <div class="wpbc_ui_settings__text_row">
1809 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1810 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1811 echo $onclick; ?>" href="<?php
1812 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1813 echo $permalink; ?>"> <?php esc_html_e( 'Configure loading of CSS/JavaScript files, set the number of simultaneous requests, and other advanced options.', 'booking' ); ?>
1814 </a>
1815 </div>
1816 </div><?php
1817 }
1818
1819 /**
1820 * Show == Dashboard Card - Advanced ==
1821 *
1822 * @return void
1823 */
1824 function wpbc_ui_settings_panel__card__uninstall( $params = array() ){
1825
1826 $title = esc_attr__( 'Uninstall / Deactivation', 'booking' );
1827
1828 if ( ! empty( $params['is_use_permalink'] ) ) {
1829 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_uninstall_tab';
1830 $onclick = "";
1831 } else {
1832 $permalink = 'javascript:void(0);';
1833 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_uninstall_tab a' ,'#wpbc_general_settings_uninstall_metabox', '" . $title . "' );";
1834 }
1835
1836 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__uninstall">
1837 <div class="wpbc_ui_settings__text_row">
1838 <i class="menu_icon icon-1x wpbc-bi-trash _icn_adjust 0wpbc-bi-translate"></i>
1839 <h1>
1840 <a onclick="<?php
1841 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1842 echo $onclick; ?>" href="<?php
1843 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1844 echo $permalink; ?>">
1845 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1846 </a>
1847 </h1>
1848 </div>
1849 <div class="wpbc_ui_settings__text_row">
1850 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1851 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1852 echo $onclick; ?>" href="<?php
1853 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1854 echo $permalink; ?>"> <?php esc_html_e( 'Enable the option to fully erase booking data when the plugin is deactivated.', 'booking' ); ?>
1855 </a>
1856 </div>
1857 </div><?php
1858 }
1859
1860
1861 /**
1862 * Show == Dashboard Card - Advanced ==
1863 *
1864 * @return void
1865 */
1866 function wpbc_ui_settings_panel__card__info_news( $params = array() ){
1867
1868 $title = esc_attr__( 'Plugin Info & News', 'booking' );
1869
1870 if ( ! empty( $params['is_use_permalink'] ) ) {
1871 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_information_tab';
1872 $onclick = "";
1873 } else {
1874 $permalink = 'javascript:void(0);';
1875 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_information_tab a' ,'#wpbc_general_settings_information_metabox', '" . $title . "' );";
1876 }
1877
1878 ?><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">
1879 <div class="wpbc_ui_settings__text_row">
1880 <i class="menu_icon icon-1x wpbc_icn_newspaper -bi-newspaper _icn_news 0wpbc-bi-translate"></i>
1881 <h1>
1882 <a onclick="<?php
1883 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1884 echo $onclick; ?>" href="<?php
1885 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1886 echo $permalink; ?>">
1887 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1888 </a>
1889 </h1>
1890 </div>
1891 <div class="wpbc_ui_settings__text_row">
1892 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1893 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1894 echo $onclick; ?>" href="<?php
1895 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1896 echo $permalink; ?>"> <?php esc_html_e( 'Stay informed with the latest news and details about the plugin.', 'booking' ); ?>
1897 </a>
1898 </div>
1899 </div><?php
1900 }
1901
1902
1903 /**
1904 * Show == Dashboard Card - Advanced ==
1905 *
1906 * @return void
1907 */
1908 function wpbc_ui_settings_panel__card__tools( $params = array() ){
1909
1910 $title = esc_attr__( 'Tools', 'booking' );
1911
1912 if ( ! empty( $params['is_use_permalink'] ) ) {
1913 $permalink = wpbc_get_settings_url() . '&scroll_to_section=wpbc_general_settings_help_tab';
1914 $onclick = "";
1915 } else {
1916 $permalink = 'javascript:void(0);';
1917 $onclick = "javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_help_tab a' ,'#wpbc_general_settings_help_metabox', '" . $title . "' );";
1918 }
1919
1920 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__tools">
1921 <div class="wpbc_ui_settings__text_row">
1922 <i class="menu_icon icon-1x wpbc-bi-wrench-adjustable-circle 0wpbc-bi-translate"></i>
1923 <h1>
1924 <a onclick="<?php
1925 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1926 echo $onclick; ?>" href="<?php
1927 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1928 echo $permalink; ?>">
1929 <span class="0wpbc_ui_settings__text_color__black2"><?php echo esc_html( $title ); ?></span>
1930 </a>
1931 </h1>
1932 </div>
1933 <div class="wpbc_ui_settings__text_row">
1934 <a class="wpbc_ui_settings__text_color__black" onclick="<?php
1935 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1936 echo $onclick; ?>" href="<?php
1937 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
1938 echo $permalink; ?>"> <?php esc_html_e( 'View system information and recover lost bookings or booking resources.', 'booking' ); ?>
1939 </a>
1940 </div>
1941 </div><?php
1942 }
1943
1944
1945
1946
1947
1948 // =====================================================================================================================
1949 // == Other Panels ==
1950 // =====================================================================================================================
1951
1952 // ---------------------------------------------------------------------------------------------------------------------
1953 // Panel == Plugin Version | & Buttons ==
1954 // ---------------------------------------------------------------------------------------------------------------------
1955
1956 /**
1957 * Show Settings Statistic | Agenda Panel
1958 *
1959 * @return void
1960 */
1961 function wpbc_ui_settings__panel__plugin_version(){
1962
1963 ?><div class="wpbc_ui_settings__flex_container"><?php
1964
1965 wpbc_ui_settings__panel_start();
1966
1967 wpbc_ui_settings_panel__card__setup_wizard();
1968
1969 wpbc_ui_settings_panel__card__transaltion_download();
1970
1971 wpbc_ui_settings_panel__card__transaltion_status();
1972
1973 wpbc_ui_settings_panel__card__version();
1974
1975 wpbc_ui_settings__panel_end();
1976
1977 ?></div><?php
1978 }
1979
1980 // ---------------------------------------------------------------------------------------------------------------------
1981 // Panel == Statistic | Agenda ==
1982 // ---------------------------------------------------------------------------------------------------------------------
1983
1984 /**
1985 * Show Settings Statistic | Agenda Panel
1986 *
1987 * @return void
1988 */
1989 function wpbc_ui_settings__panel__statistic(){
1990
1991 $is_panel_visible = wpbc_is_dismissed_panel_visible( 'wpbc_dashboard_section_statistic' ); // FixIn: 9.9.0.8.
1992
1993 if (! $is_panel_visible) {
1994 return;
1995 }
1996
1997 $statistic_cards_arr = ( $is_panel_visible ) ? wpbc_db_dashboard_get_bookings_count_arr() : array();
1998
1999
2000 ?><div id="wpbc_dashboard_section_statistic" class="wpbc_ui_settings__flex_container"><?php
2001
2002 wpbc_ui_settings__panel_start();
2003
2004 ?><div style="padding: 5px 8px 0 0;flex: 1 1 100%;margin-bottom: -100%;"><?php
2005 $is_panel_visible = wpbc_is_dismissed( 'wpbc_dashboard_section_statistic' ); // Close Panel
2006 ?></div><?php
2007
2008 //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 ) {
2009 foreach ( array( "all", "new", "pending", "approved" ) as $card_name ) { // FixIn: 10.6.2.2.
2010 wpbc_ui_settings_panel__card__statistic( $card_name , $statistic_cards_arr );
2011 }
2012 wpbc_ui_settings__panel_end();
2013
2014 /* ?>
2015 <div class="wpbc_ui_settings__row">
2016 <div class="wpbc_ui_settings__panel"><?php
2017 foreach ( array("check_in_today","check_out_today","check_in_tomorrow","check_out_tomorrow") as $card_name ) {
2018 wpbc_ui_settings_panel__card__statistic( $card_name , $statistic_cards_arr );
2019 }
2020 ?></div>
2021 </div>
2022 <?php */ ?>
2023 </div>
2024 <?php
2025 }
2026
2027 function wpbc_ui_settings_panel__card__setup_wizard() {
2028 ?>
2029 <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2030 <div class="wpbc_ui_settings__center wpbc_container wpbc_container_booking_form">
2031 <a class="wpbc_button_light button-primary wpbc_button_green tooltip_top" style="padding: 12px 24px;"
2032 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>' ) ); ?>"
2033 href="<?php echo esc_url( wpbc_get_settings_url() . '&wpbc_setup_wizard=reset&_wpnonce=' . wp_create_nonce( 'wpbc_settings_url_nonce' ) ); ?>"><?php
2034 esc_html_e( 'Start Setup Wizard', 'booking' )
2035 ?></a>
2036 </div>
2037 </div>
2038 <?php
2039 }
2040
2041 function wpbc_ui_settings_panel__card__transaltion_download() {
2042 ?>
2043 <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2044 <div class="wpbc_ui_settings__center">
2045 <a class="button tooltip_top"
2046 title="<?php
2047 /* translators: 1: ... */
2048 echo esc_attr( sprintf( __( 'Download translation PO files from %s and update the current translation version.', 'booking' ), 'wp.org / wpbookingcalendar.com' ) );?>"
2049 href="<?php echo esc_url( wpbc_get_settings_url() . '&system_info=show&_wpnonce='. wp_create_nonce( 'wpbc_settings_url_nonce' ) )
2050 .'&update_translations=1#wpbc_general_settings_system_info_metabox'; ?>"><?php
2051 esc_html_e( 'Update Translations', 'booking' )
2052 ?></a>
2053 </div>
2054 </div>
2055 <?php
2056 }
2057
2058 function wpbc_ui_settings_panel__card__transaltion_status() {
2059 ?>
2060 <div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2061 <div class="wpbc_ui_settings__center">
2062 <a class="button tooltip_top"
2063 title="<?php echo esc_attr( __( 'Show exist translations status', 'booking' ) );?>"
2064 href="<?php echo esc_url( wpbc_get_settings_url() . '&system_info=show&_wpnonce='. wp_create_nonce( 'wpbc_settings_url_nonce' ) )
2065 .'&show_translation_status=1#wpbc_general_settings_system_info_metabox'; ?>"><?php
2066 esc_html_e( 'Show translations status', 'booking' )
2067 ?></a>
2068 </div>
2069 </div>
2070 <?php
2071 }
2072
2073 /**
2074 * Show Version card in top panel
2075 *
2076 * @return void
2077 */
2078 function wpbc_ui_settings_panel__card__version(){
2079 // Version ---------------------------------------------------------------------------------------------------------
2080
2081 $version_title = '';
2082
2083 if ( class_exists( 'wpdev_bk_personal' ) ) {
2084 $version_title .= wpbc_dashboard_info_get_version_type_readable();
2085 }
2086 if ( wpbc_is_this_demo() ) {
2087 $version_title .= ' (Demo)';
2088 } else {
2089 if ( 'free' != wpbc_dashboard_info_get_version_type() ) {
2090 $version_title .= ' (' . __( 'for', 'booking' ) . ' ' . trim( wpbc_dashboard_info_get_version_type_sites() ) . ')';
2091 }
2092 }
2093
2094 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right" style="align-items: center;">
2095 <div class="wpbc_ui_settings__text_row" style="justify-content: center;margin-left:-1em;">
2096 <i class="menu_icon icon-1x wpbc_icn_numbers -bi-balloon-heart bi-activity"></i>
2097 <h1>
2098 <a class="" href="https://wpbookingcalendar.com/changelog/#<?php
2099 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2100 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 ) ) ); ?>">
2101 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_attr( WP_BK_VERSION_NUM ); ?></span>
2102 </a>
2103 </h1>
2104 </div>
2105 <div class="wpbc_ui_settings__text_row" style="justify-content: center;">
2106 <a class="wpbc_ui_settings__text_color__purple2"
2107 href="https://wpbookingcalendar.com/faq/difference-single-developer-multi-site/#<?php
2108 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2109 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 ) ) ); ?>"
2110 ><?php
2111 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2112 echo $version_title
2113 ?></a>
2114 </div>
2115 </div><?php
2116 }
2117
2118 /**
2119 * Show Version card in top panel
2120 *
2121 * @return void
2122 */
2123 function wpbc_ui_settings_panel__top_path__version(){
2124 // Version ---------------------------------------------------------------------------------------------------------
2125
2126 $version_title = '';
2127
2128 if ( class_exists( 'wpdev_bk_personal' ) ) {
2129 $version_title .= wpbc_dashboard_info_get_version_type_readable();
2130 }
2131 if ( wpbc_is_this_demo() ) {
2132 $version_title .= ' (Demo)';
2133 } else {
2134 if ( 'free' != wpbc_dashboard_info_get_version_type() ) {
2135 $version_title .= ' (' . __( 'for', 'booking' ) . ' ' . trim( wpbc_dashboard_info_get_version_type_sites() ) . ')';
2136 }
2137 }
2138
2139 ?><style type="text/css">
2140 .wpbc_settings_path_el .wpbc_icn_numbers::before{
2141 font-size: 12px;
2142 vertical-align: -.19em;
2143 }
2144 </style>
2145 <div class="wpbc_settings_path_el wpbc_ui_settings__flex_container" style="margin-left:auto;flex-flow: row nowrap;">
2146 <a class="" href="https://wpbookingcalendar.com/changelog/#<?php
2147 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2148 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 ) ) ); ?>">
2149 <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>
2150 </a>
2151 <a class="wpbc_ui_settings__text_color__purple2" style="margin-left:1em;"
2152 href="https://wpbookingcalendar.com/faq/difference-single-developer-multi-site/#<?php
2153 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2154 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 ) ) ); ?>"
2155 ><?php
2156 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
2157 echo $version_title
2158 ?></a>
2159 </div><?php
2160 }
2161
2162 /**
2163 * Show statistic card in top panel
2164 *
2165 * @param $card_name
2166 * @param $statistic_cards_arr
2167 *
2168 * @return void
2169 */
2170 function wpbc_ui_settings_panel__card__statistic( $card_name , $statistic_cards_arr ){
2171
2172 if ( ( empty( $statistic_cards_arr ) ) || ( ! isset( $statistic_cards_arr[ $card_name ] ) ) ) {
2173 return;
2174 }
2175
2176 $bk_admin_url = wpbc_get_bookings_url();
2177 $count_name = $card_name;
2178 $count_num = $statistic_cards_arr[ $card_name ];
2179
2180
2181 switch ( $count_name ) {
2182 case 'all':
2183
2184 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2185 <div class="wpbc_ui_settings__text_row">
2186 <i class="menu_icon icon-1x wpbc_icn_trending_up"></i>
2187 <h1>
2188 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[0]=3&tab=vm_booking_listing&overwrite=1' ); ?>">
2189 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2190 </a>
2191 </h1>
2192 </div>
2193 <div class="wpbc_ui_settings__text_row">
2194 <a class="wpbc_ui_settings__text_color__black2" style="font-weight: 600;"
2195 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' ); ?>
2196 </a>
2197 </div>
2198 </div><?php
2199
2200 break;
2201
2202 case 'new':
2203
2204 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2205 <div class="wpbc_ui_settings__text_row">
2206 <i class="menu_icon icon-1x wpbc-bi-eye"></i>
2207 <h1>
2208 <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' ); ?>">
2209 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2210 </a>
2211 </h1>
2212 </div>
2213 <div class="wpbc_ui_settings__text_row">
2214 <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' ); ?>
2215 </a>
2216 </div>
2217 </div><?php
2218
2219 break;
2220
2221 case 'pending':
2222
2223 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2224 <div class="wpbc_ui_settings__text_row">
2225 <i class="menu_icon icon-1x wpbc-bi-slash-circle 0wpbc_icn_block"></i>
2226 <h1>
2227 <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' ); ?>">
2228 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2229 </a>
2230 </h1>
2231 </div>
2232 <div class="wpbc_ui_settings__text_row">
2233 <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' ); ?>">
2234 <?php esc_html_e( 'Pending booking(s)' ,'booking'); ?>
2235 </a>
2236 </div>
2237 </div><?php
2238
2239 break;
2240
2241 case 'approved':
2242
2243 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2244 <div class="wpbc_ui_settings__text_row">
2245 <i class="menu_icon icon-1x wpbc-bi-check2-circle 0check-circle 0wpbc_icn_check_circle_outline"></i>
2246 <h1>
2247 <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' ); ?>">
2248 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2249 </a>
2250 </h1>
2251 </div>
2252 <div class="wpbc_ui_settings__text_row">
2253 <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' ); ?>">
2254 <?php esc_html_e( 'Approved booking(s)' ,'booking'); ?>
2255 </a>
2256 </div>
2257 </div><?php
2258
2259 break;
2260
2261 case 'booking_today':
2262 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2263 <div class="wpbc_ui_settings__text_row">
2264 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2265 <h1>
2266 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=1&tab=vm_booking_listing&overwrite=1' ); ?>">
2267 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2268 </a>
2269 </h1>
2270 </div>
2271 <div class="wpbc_ui_settings__text_row">
2272 <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' ); ?>">
2273 <?php esc_html_e( 'Booking(s) for today' ,'booking');?>
2274 </a>
2275 </div>
2276 </div><?php
2277
2278 break;
2279
2280 case 'was_made_today':
2281
2282 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2283 <div class="wpbc_ui_settings__text_row">
2284 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2285 <h1>
2286 <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' ); ?>">
2287 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2288 </a>
2289 </h1>
2290 </div>
2291 <div class="wpbc_ui_settings__text_row">
2292 <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' ); ?>
2293 </a>
2294 </div>
2295 </div><?php
2296
2297 break;
2298
2299 case 'check_in_today':
2300
2301 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2302 <div class="wpbc_ui_settings__text_row">
2303 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2304 <h1>
2305 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=10&tab=vm_booking_listing&overwrite=1' ); ?>">
2306 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2307 </a>
2308 </h1>
2309 </div>
2310 <div class="wpbc_ui_settings__text_row">
2311 <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' ); ?>
2312 </a>
2313 </div>
2314 </div><?php
2315
2316 break;
2317
2318 case 'check_out_today':
2319
2320 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2321 <div class="wpbc_ui_settings__text_row">
2322 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2323 <h1>
2324 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=11&tab=vm_booking_listing&overwrite=1' ); ?>">
2325 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2326 </a>
2327 </h1>
2328 </div>
2329 <div class="wpbc_ui_settings__text_row">
2330 <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' ); ?>
2331 </a>
2332 </div>
2333 </div><?php
2334
2335 break;
2336
2337 case 'check_in_tomorrow':
2338
2339 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2340 <div class="wpbc_ui_settings__text_row">
2341 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2342 <h1>
2343 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=7&tab=vm_booking_listing&overwrite=1' ); ?>">
2344 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2345 </a>
2346 </h1>
2347 </div>
2348 <div class="wpbc_ui_settings__text_row">
2349 <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' ); ?>
2350 </a>
2351 </div>
2352 </div><?php
2353
2354 break;
2355
2356 case 'check_out_tomorrow':
2357
2358 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_divider_right">
2359 <div class="wpbc_ui_settings__text_row">
2360 <i class="menu_icon icon-1x wpbc_icn_tune"></i>
2361 <h1>
2362 <a href="<?php echo esc_url( $bk_admin_url .'&wh_trash=0&wh_booking_date[]=8&tab=vm_booking_listing&overwrite=1' ); ?>">
2363 <span class="wpbc_ui_settings__text_color__black2"><?php echo esc_html( $statistic_cards_arr[$count_name] ); ?></span>
2364 </a>
2365 </h1>
2366 </div>
2367 <div class="wpbc_ui_settings__text_row">
2368 <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' ); ?>
2369 </a>
2370 </div>
2371 </div><?php
2372
2373 break;
2374 }
2375
2376 }