PluginProbe
Booking Calendar / 11.8
Booking Calendar v11.8
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, at core/wpbc_welcome.php

335 lines 11.6 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 ?><script type="text/javascript">
27 jQuery( document ).ready( function (){
28 setTimeout( function (){
29 if ( jQuery( '#wpbc_welcome_panel__version2' ).is( ':visible' ) ){
30 jQuery( '#wpbc_welcome_panel__version2' ).slideUp( 1000 );
31 }
32 }, 60000 );
33 } );
34 </script>
35 <div id="wpbc_welcome_panel__version2" style="display:none;">
36 <?php
37 $is_panel_visible = wpbc_is_dismissed( 'wpbc_welcome_panel__version2', array(
38 'title' => '<i class="menu_icon icon-1x wpbc_icn_close"></i> ',
39 'hint' => __( 'Dismiss', 'booking' ),
40 'class' => 'wpbc_panel_get_started_dismiss0',
41 'css' => 'text-decoration: none;font-weight: 600;float:right;background: #fff;border-radius: 7px;z-index: 1;position: relative;margin: 16px 15px 0 -32px;'
42 ));
43 if ( $is_panel_visible ) {
44 wpbc_welcome_panel__version2__content();
45 }
46 ?>
47 </div><?php
48 }
49
50 function wpbc_welcome_panel__version2__content() {
51
52 ?><div class="wpbc_welcome_panel" style="margin: 1px 0 20px;"><?php
53
54 wpbc_ui_settings__panel__welcome();
55
56 ?></div><?php
57 }
58
59
60 // ---------------------------------------------------------------------------------------------------------------------
61 // Panel == Plugin Version | & Buttons ==
62 // ---------------------------------------------------------------------------------------------------------------------
63
64 /**
65 * Show Settings Statistic | Agenda Panel
66 *
67 * @return void
68 */
69 function wpbc_ui_settings__panel__welcome(){
70
71
72 ?><style type="text/css">
73 .wpbc_ui_settings__panel__welcome .wpbc_ajx_toolbar.wpbc_no_borders{
74 margin-top: 5px !important;
75 }
76 .wpbc_ui_settings__panel__welcome .wpbc_ui_settings__card_text_small h1{
77 line-height: 1.2;
78 margin: 0;
79 }
80 .wpbc_ui_settings__panel__welcome .about-description {
81 flex: 100%;
82 margin: 0;
83 color: #8a8a8a;
84 font-size: 20px;
85 font-weight: 600;
86 border-bottom: 1px solid #eee;
87 padding: 10px 20px;
88 }
89 .wpbc_ui_settings__panel__welcome .wpbc_ajx_toolbar .ui_container.ui_container_small .ui_group .ui_element .wpbc_ui_button {
90 white-space: wrap;
91 flex-flow: row nowrap;
92 height: auto;
93 padding: 5px 15px;
94 line-height: 1.74;
95 }
96 .wpbc_ui_settings__panel__welcome .wpbc_ui_settings__panel h1 {
97 margin: 0;
98 }
99 </style><?php
100
101 ?><div class="wpbc_ui_settings__flex_container wpbc_ui_settings__panel__welcome"><?php
102
103 wpbc_ui_settings__panel_start();
104
105 wpbc_ui_settings__panel__welcome__header();
106
107 // wpbc_ui_settings_panel__card__setup_wizard();
108
109 wpbc_ui_settings_panel__card__version( array( 'is_show_wizard_button' => true ) );
110
111 if (
112 function_exists( 'wpbc_stp_wiz__is_exist_published_page_with_booking_form' )
113 && ! empty( wpbc_stp_wiz__is_exist_published_page_with_booking_form() )
114 ) {
115 wpbc_ui_settings_panel__card__publish_into_exist( array() );
116 }
117
118
119 //Info: If needs to show "Shortcode Popup Dialog" and create new Pages, please uncomment all rows marked with: // FixIn: 10.6.6.2.
120 // wpbc_ui_settings_panel__card__publish_into_new( array() ); // FixIn: 10.6.6.2.
121
122 ?><div style="flex:100%;border-bottom: 1px solid #eeeff1;"></div><?php // Divider
123
124
125 wpbc_ui_settings_panel__card__integreate_into_new();
126 wpbc_ui_settings_panel__card__shortcodes_help();
127 wpbc_ui_settings_panel__card__welcome__have_questions();
128
129 //wpbc_ui_settings_panel__card__welcome__next_steps();
130
131
132
133
134
135 wpbc_ui_settings__panel_end();
136
137 ?></div><?php
138 }
139
140
141 function wpbc_ui_settings__panel__welcome__header() {
142
143 ?><p class="about-description"><?php esc_html_e( 'We&#8217;ve assembled some links to get you started:', 'booking' ); ?></p><?php
144 }
145
146
147 /**
148 * Show == Dashboard Card - integreate into new ==
149 *
150 * @return void
151 */
152 function wpbc_ui_settings_panel__card__integreate_into_new(){
153
154
155
156 ?><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">
157 <div class="wpbc_ui_settings__text_row">
158 <i class="menu_icon icon-1x wpbc-bi-box-arrow-in-down-left"></i>
159 <h1>
160 <span>
161 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Insert shortcode in a page', 'booking' ); ?></span>
162 </span>
163 </h1>
164 </div>
165 <div class="wpbc_ui_settings__text_row">
166 <span class="wpbc_ui_settings__text_color__black">
167 <?php
168 esc_html_e( 'Integrate booking form into a page on your website.', 'booking' );
169 ?>
170 </span>
171 </div>
172 <div style="align-self:center;margin: 0px 0 0;" class="wpbc_flextable_col">
173 <?php
174
175 ?>
176 <div class="wpbc_ajx_toolbar wpbc_no_borders" style="margin: 0 auto;margin-top: 15px;">
177 <div class="ui_container ui_container_small">
178 <div class="ui_group ui_group__publish_btn" style="align-items: center;">
179 <div class="ui_element" style="margin: 0 15px 0 0;">
180 <a href="<?php echo esc_url( wpbc_get_resources_url() ); ?>"
181 id="ui_btn_publish_into_exist" class="wpbc_ui_control wpbc_ui_button wpbc_ui_button_danger0 tooltip_top "
182 title="<?php echo esc_attr(
183 sprintf( __( 'Integrate booking form into a page on your website.', 'booking' ), '', '' )
184 ); ?>" >
185 <span><?php esc_html_e('Integrate booking form', 'booking'); ?>&nbsp;&nbsp;&nbsp;</span>
186 <i class="menu_icon icon-1x wpbc-bi-arrow-right-short" style="margin: 0;"></i>
187 </a>
188 </div>
189 </div>
190 </div>
191 </div>
192 <?php
193
194 ?>
195 </div>
196
197 </div><?php
198 }
199
200
201 /**
202 * Show == Dashboard Card - Shortcodes Help ==
203 *
204 * @return void
205 */
206 function wpbc_ui_settings_panel__card__shortcodes_help(){
207
208 ?><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">
209 <div class="wpbc_ui_settings__text_row">
210 <i class="menu_icon icon-1x wpbc_icn_code"></i>
211 <h1>
212 <span>
213 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Shortcodes', 'booking' ); ?></span>
214 </span>
215 </h1>
216 </div>
217 <div class="wpbc_ui_settings__text_row">
218 <span class="wpbc_ui_settings__text_color__black">
219 <ul>
220 <li style="font-size: 0.94em;"><span class="welcome-icon"><?php
221
222 /* translators: 1: ... */
223 $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' );
224 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
225 printf( $text_description, '<strong><a href="https://wpbookingcalendar.com/faq/insert-booking-calendar-into-page/" target="_blank">', '</a></strong>' );
226
227 echo '</span> <span class="welcome-icon">';
228
229 /* translators: 1: ... */
230 $text_description = __( 'See %1$sall shortcodes%2$s of the Booking Calendar that you can use in pages.', 'booking' );
231 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
232 printf( $text_description, '<strong><a href="https://wpbookingcalendar.com/faq/#shortcodes" target="_blank">', '</a></strong>' );
233
234 ?></span></li>
235 </ul>
236 </span>
237 </div>
238 </div><?php
239 }
240
241
242 /**
243 * Show == Dashboard Card - Next Steps ==
244 *
245 * @return void
246 */
247 function wpbc_ui_settings_panel__card__welcome__next_steps(){
248
249 ?><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">
250 <div class="wpbc_ui_settings__text_row">
251 <i class="menu_icon icon-1x wpbc_icn_code"></i>
252 <h1>
253 <span>
254 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Next Steps', 'booking' ); ?></span>
255 </span>
256 </h1>
257 </div>
258 <div class="wpbc_ui_settings__text_row">
259 <span class="wpbc_ui_settings__text_color__black">
260 <ul>
261
262 <?php if ( ! empty( $wp_post_booking_absolute ) ) { ?>
263 <li><div class="welcome-icon"><?php
264 /* translators: 1: ... */
265 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' )
266 , '<strong>', '</strong>'
267 , '<strong><a href="' . esc_url( $wp_post_booking_absolute ) . '" target="_blank">', '</a></strong>'
268 , '<a href="' . esc_url( wpbc_get_new_booking_url() ) . '">', '</a>'
269 ) );
270 ?></div></li>
271 <?php } ?>
272
273 <li><div class="welcome-icon"><?php
274 /* translators: 1: ... */
275 echo esc_html( sprintf( __( 'Check %1$sBooking Listing%2$s page for new bookings.', 'booking' )
276 , '<a href="' . esc_url( wpbc_get_bookings_url(true, false) . '&tab=vm_booking_listing' ) . '">', '</a>'
277 ) );
278 ?></div></li>
279 <li><div class="welcome-icon"><?php
280 /* translators: 1: ... */
281 echo esc_html( sprintf( __( 'Configure %1$sForm Fields%2$s, %3$sEmails%4$s and other %5$sSettings%6$s.', 'booking' )
282 , '<a href="' . esc_url( wpbc_get_settings_url(true, false) . '&tab=builder_booking_form' ) . '">', '</a>'
283 , '<a href="' . esc_url( wpbc_get_settings_url(true, false) . '&tab=email' ) . '">', '</a>'
284 , '<a href="' . esc_url( wpbc_get_settings_url(true, false) ) . '">', '</a>'
285 ) );
286 ?></div></li>
287 </ul>
288 </span>
289 </div>
290 </div><?php
291 }
292
293
294 /**
295 * Show == Dashboard Card - Have a questions? ==
296 *
297 * @return void
298 */
299 function wpbc_ui_settings_panel__card__welcome__have_questions(){
300
301 ?><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">
302 <div class="wpbc_ui_settings__text_row">
303 <i class="menu_icon icon-1x wpbc_icn_help_outline"></i>
304 <h1>
305 <span>
306 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Have a questions?', 'booking' ); ?></span>
307 </span>
308 </h1>
309 </div>
310 <div class="wpbc_ui_settings__text_row">
311 <span class="wpbc_ui_settings__text_color__black">
312 <ul>
313 <li><span class="welcome-icon"><?php
314
315 /* translators: 1: ... */
316 $text_description = __( 'See %1$sFAQ%2$s.', 'booking' );
317 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
318 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>' );
319 echo '</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="welcome-icon">';
320 /* translators: 1: ... */
321 $text_description = __( 'Contact %1$sSupport%2$s.', 'booking' );
322 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
323 printf( $text_description, '<a href="mailto:support@wpbookingcalendar.com" target="_blank">', '</a>' );
324 ?></span></li>
325 </span>
326 </div>
327 </div><?php
328 }
329
330
331
332 // </editor-fold>
333
334
335