PluginProbe
Booking Calendar / 11.8.1
Booking Calendar v11.8.1
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 10.11.3 All 202 releases
booking / core / wpbc_welcome.php

wpbc_welcome.php in Booking Calendar 11.8.1, at core/wpbc_welcome.php

321 lines 11.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @version 1.0
4 * @package Booking Calendar
5 * @subpackage Welcome Panel Functions
6 * @category Functions
7 *
8 * @author wpdevelop
9 * @link https://wpbookingcalendar.com/
10 * @email info@wpbookingcalendar.com
11 *
12 * @modified 2023-10-24
13 */
14
15 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
16
17
18 // <editor-fold defaultstate="collapsed" desc=" == Welcome Content 2 == 2024-11-06 " >
19
20 function wpbc_welcome_panel() {
21
22 if ( ! wpbc_is_user_can_access_wizard_page() ){
23 return;
24 }
25
26 $is_live_demo = wpbc_is_this_demo();
27
28 ?><script type="text/javascript">
29 jQuery( document ).ready( function (){
30 jQuery( document ).on( 'click.wpbcWelcomePanelDemo', '[data-wpbc-welcome-panel-demo-dismiss]', function () {
31 jQuery( '#wpbc_welcome_panel__version2' ).slideUp( 500 );
32 } );
33 setTimeout( function (){
34 if ( jQuery( '[data-wpbc-booking-pages-open-dialog]' ).length ) {
35 return;
36 }
37 if ( jQuery( '#wpbc_welcome_panel__version2' ).is( ':visible' ) ){
38 jQuery( '#wpbc_welcome_panel__version2' ).slideUp( 1000 );
39 }
40 }, 60000 );
41 } );
42 </script>
43 <div id="wpbc_welcome_panel__version2" style="display:<?php echo esc_attr( $is_live_demo ? 'block' : 'none' ); ?>;">
44 <?php
45 if ( $is_live_demo ) {
46 $is_panel_visible = true;
47 ?>
48 <button
49 type="button"
50 class="wpbc_panel_get_started_dismiss0 wpbc_welcome_panel__dismiss"
51 data-wpbc-welcome-panel-demo-dismiss="1"
52 aria-label="<?php esc_attr_e( 'Dismiss', 'booking' ); ?>"
53 title="<?php esc_attr_e( 'Dismiss', 'booking' ); ?>"
54 >
55 <i class="menu_icon icon-1x wpbc_icn_close" aria-hidden="true"></i>
56 </button>
57 <?php
58 } else {
59 $is_panel_visible = wpbc_is_dismissed(
60 'wpbc_welcome_panel__version2',
61 array(
62 'title' => '<i class="menu_icon icon-1x wpbc_icn_close" aria-hidden="true"></i><span class="screen-reader-text">' . esc_html__( 'Dismiss', 'booking' ) . '</span>',
63 'hint' => __( 'Dismiss', 'booking' ),
64 'class' => 'wpbc_panel_get_started_dismiss0 wpbc_welcome_panel__dismiss',
65 'css' => '',
66 )
67 );
68 }
69 if ( $is_panel_visible ) {
70 wpbc_welcome_panel__version2__content();
71 }
72 ?>
73 </div><?php
74 }
75
76 function wpbc_welcome_panel__version2__content() {
77
78 ?><div class="wpbc_welcome_panel"><?php
79
80 wpbc_ui_settings__panel__welcome();
81
82 ?></div><?php
83 }
84
85
86 // ---------------------------------------------------------------------------------------------------------------------
87 // Panel == Plugin Version | & Buttons ==
88 // ---------------------------------------------------------------------------------------------------------------------
89
90 /**
91 * Show Settings Statistic | Agenda Panel
92 *
93 * @return void
94 */
95 function wpbc_ui_settings__panel__welcome(){
96
97 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__welcome"><?php
98
99 wpbc_ui_settings__panel_start();
100
101 wpbc_ui_settings__panel__welcome__header();
102
103
104 wpbc_ui_settings_panel__card__open_test_pages_popup();
105
106 wpbc_ui_settings_panel__card__setup_wizard();
107
108 wpbc_ui_settings_panel__card__version();
109
110 ?><div style="flex:100%;border-bottom: 1px solid #eeeff1;"></div><?php // Divider
111
112 wpbc_ui_settings_panel__card__integreate_into_new();
113 wpbc_ui_settings_panel__card__shortcodes_help();
114 wpbc_ui_settings_panel__card__welcome__have_questions();
115
116 //wpbc_ui_settings_panel__card__welcome__next_steps();
117 wpbc_ui_settings__panel_end();
118
119 ?></div><?php
120 }
121
122
123 function wpbc_ui_settings__panel__welcome__header() {
124
125 ?><div class="wpbc_ui_settings__panel__welcome_header">
126 <p class="about-description"><?php esc_html_e( 'We&#8217;ve assembled some links to get you started:', 'booking' ); ?></p>
127 </div><?php
128 }
129
130
131
132
133 /**
134 * Show == Dashboard Card - integreate into new ==
135 *
136 * @return void
137 */
138 function wpbc_ui_settings_panel__card__integreate_into_new(){
139
140
141
142 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__publish_into_new">
143 <div class="wpbc_ui_settings__text_row">
144 <i class="menu_icon icon-1x wpbc-bi-box-arrow-in-down-left"></i>
145 <h1>
146 <span>
147 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Insert shortcode in a page', 'booking' ); ?></span>
148 </span>
149 </h1>
150 </div>
151 <div class="wpbc_ui_settings__text_row">
152 <span class="wpbc_ui_settings__text_color__black">
153 <?php
154 esc_html_e( 'Integrate booking form into a page on your website.', 'booking' );
155 ?>
156 </span>
157 </div>
158 <div style="align-self:center;margin: 0px 0 0;" class="wpbc_flextable_col">
159 <?php
160
161 ?>
162 <div class="wpbc_ajx_toolbar wpbc_no_borders" style="margin: 0 auto;margin-top: 15px;">
163 <div class="ui_container ui_container_small">
164 <div class="ui_group ui_group__publish_btn" style="align-items: center;">
165 <div class="ui_element" style="margin: 0 15px 0 0;">
166 <a href="<?php echo esc_url( wpbc_get_resources_url() ); ?>"
167 id="ui_btn_publish_into_exist" class="wpbc_ui_control wpbc_ui_button wpbc_ui_button_danger0 tooltip_top "
168 title="<?php echo esc_attr(
169 sprintf( __( 'Integrate booking form into a page on your website.', 'booking' ), '', '' )
170 ); ?>" >
171 <span><?php esc_html_e('Integrate booking form', 'booking'); ?>&nbsp;&nbsp;&nbsp;</span>
172 <i class="menu_icon icon-1x wpbc-bi-arrow-right-short" style="margin: 0;"></i>
173 </a>
174 </div>
175 </div>
176 </div>
177 </div>
178 <?php
179
180 ?>
181 </div>
182
183 </div><?php
184 }
185
186
187 /**
188 * Show == Dashboard Card - Shortcodes Help ==
189 *
190 * @return void
191 */
192 function wpbc_ui_settings_panel__card__shortcodes_help(){
193
194 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__publish_into_new">
195 <div class="wpbc_ui_settings__text_row">
196 <i class="menu_icon icon-1x wpbc_icn_code"></i>
197 <h1>
198 <span>
199 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Shortcodes', 'booking' ); ?></span>
200 </span>
201 </h1>
202 </div>
203 <div class="wpbc_ui_settings__text_row">
204 <span class="wpbc_ui_settings__text_color__black">
205 <ul>
206 <li style="font-size: 0.94em;"><span class="welcome-icon"><?php
207
208 /* translators: 1: ... */
209 $text_description = __( 'Learn how to %1$sAdd the Booking Form or Calendar to your page%2$s in WordPress Block Editor, Elementor, or other non-standard editors.', 'booking' );
210 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
211 printf( $text_description, '<strong><a href="https://wpbookingcalendar.com/faq/insert-booking-calendar-into-page/" target="_blank">', '</a></strong>' );
212
213 echo '</span> <span class="welcome-icon">';
214
215 /* translators: 1: ... */
216 $text_description = __( 'See %1$sall shortcodes%2$s of the Booking Calendar that you can use in pages.', 'booking' );
217 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
218 printf( $text_description, '<strong><a href="https://wpbookingcalendar.com/faq/#shortcodes" target="_blank">', '</a></strong>' );
219
220 ?></span></li>
221 </ul>
222 </span>
223 </div>
224 </div><?php
225 }
226
227
228 /**
229 * Show == Dashboard Card - Next Steps ==
230 *
231 * @return void
232 */
233 function wpbc_ui_settings_panel__card__welcome__next_steps(){
234
235 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right wpbc_ui_settings_panel__card__welcome__next_steps">
236 <div class="wpbc_ui_settings__text_row">
237 <i class="menu_icon icon-1x wpbc_icn_code"></i>
238 <h1>
239 <span>
240 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Next Steps', 'booking' ); ?></span>
241 </span>
242 </h1>
243 </div>
244 <div class="wpbc_ui_settings__text_row">
245 <span class="wpbc_ui_settings__text_color__black">
246 <ul>
247
248 <?php if ( ! empty( $wp_post_booking_absolute ) ) { ?>
249 <li><div class="welcome-icon"><?php
250 /* translators: 1: ... */
251 echo esc_html( sprintf( __( 'Start creating %1$snew bookings%2$s from %3$syour page%4$s or in the %5$sAdmin Panel%6$s.', 'booking' )
252 , '<strong>', '</strong>'
253 , '<strong><a href="' . esc_url( $wp_post_booking_absolute ) . '" target="_blank">', '</a></strong>'
254 , '<a href="' . esc_url( wpbc_get_new_booking_url() ) . '">', '</a>'
255 ) );
256 ?></div></li>
257 <?php } ?>
258
259 <li><div class="welcome-icon"><?php
260 /* translators: 1: ... */
261 echo esc_html( sprintf( __( 'Check %1$sBooking Listing%2$s page for new bookings.', 'booking' )
262 , '<a href="' . esc_url( wpbc_get_bookings_url(true, false) . '&tab=vm_booking_listing' ) . '">', '</a>'
263 ) );
264 ?></div></li>
265 <li><div class="welcome-icon"><?php
266 /* translators: 1: ... */
267 echo esc_html( sprintf( __( 'Configure %1$sForm Fields%2$s, %3$sEmails%4$s and other %5$sSettings%6$s.', 'booking' )
268 , '<a href="' . esc_url( wpbc_get_settings_url(true, false) . '&tab=builder_booking_form' ) . '">', '</a>'
269 , '<a href="' . esc_url( wpbc_get_settings_url(true, false) . '&tab=email' ) . '">', '</a>'
270 , '<a href="' . esc_url( wpbc_get_settings_url(true, false) ) . '">', '</a>'
271 ) );
272 ?></div></li>
273 </ul>
274 </span>
275 </div>
276 </div><?php
277 }
278
279
280 /**
281 * Show == Dashboard Card - Have a questions? ==
282 *
283 * @return void
284 */
285 function wpbc_ui_settings_panel__card__welcome__have_questions(){
286
287 ?><div class="wpbc_ui_settings__card wpbc_ui_settings__card_text_small wpbc_ui_settings__card_divider_right0 wpbc_ui_settings_panel__card__welcome__have_questions">
288 <div class="wpbc_ui_settings__text_row">
289 <i class="menu_icon icon-1x wpbc_icn_help_outline"></i>
290 <h1>
291 <span>
292 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Have a questions?', 'booking' ); ?></span>
293 </span>
294 </h1>
295 </div>
296 <div class="wpbc_ui_settings__text_row">
297 <span class="wpbc_ui_settings__text_color__black">
298 <ul>
299 <li><span class="welcome-icon"><?php
300
301 /* translators: 1: ... */
302 $text_description = __( 'See %1$sFAQ%2$s.', 'booking' );
303 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
304 printf( $text_description, '<a href="https://wpbookingcalendar.com/faq/" target="_blank">', '</a> , ' . '<a href="https://wpbookingcalendar.com/support/" target="_blank">' . esc_html__( 'Support Forum', 'booking' ) . '</a>' );
305 echo '</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="welcome-icon">';
306 /* translators: 1: ... */
307 $text_description = __( 'Contact %1$sSupport%2$s.', 'booking' );
308 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
309 printf( $text_description, '<a href="mailto:support@wpbookingcalendar.com" target="_blank">', '</a>' );
310 ?></span></li>
311 </span>
312 </div>
313 </div><?php
314 }
315
316
317
318 // </editor-fold>
319
320
321