PluginProbe
Booking Calendar / 11.8.3
Booking Calendar v11.8.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 11.8.3, at includes/_toolbar_ui/ui__settings_panel.php

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