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

332 lines 11.5 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 ( ! empty( wpbc_stp_wiz__is_exist_published_page_with_booking_form() ) ) {
112 wpbc_ui_settings_panel__card__publish_into_exist( array() );
113 }
114
115
116 //Info: If needs to show "Shortcode Popup Dialog" and create new Pages, please uncomment all rows marked with: // FixIn: 10.6.6.2.
117 // wpbc_ui_settings_panel__card__publish_into_new( array() ); // FixIn: 10.6.6.2.
118
119 ?><div style="flex:100%;border-bottom: 1px solid #eeeff1;"></div><?php // Divider
120
121
122 wpbc_ui_settings_panel__card__integreate_into_new();
123 wpbc_ui_settings_panel__card__shortcodes_help();
124 wpbc_ui_settings_panel__card__welcome__have_questions();
125
126 //wpbc_ui_settings_panel__card__welcome__next_steps();
127
128
129
130
131
132 wpbc_ui_settings__panel_end();
133
134 ?></div><?php
135 }
136
137
138 function wpbc_ui_settings__panel__welcome__header() {
139
140 ?><p class="about-description"><?php esc_html_e( 'We&#8217;ve assembled some links to get you started:', 'booking' ); ?></p><?php
141 }
142
143
144 /**
145 * Show == Dashboard Card - integreate into new ==
146 *
147 * @return void
148 */
149 function wpbc_ui_settings_panel__card__integreate_into_new(){
150
151
152
153 ?><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">
154 <div class="wpbc_ui_settings__text_row">
155 <i class="menu_icon icon-1x wpbc-bi-box-arrow-in-down-left"></i>
156 <h1>
157 <span>
158 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Insert shortcode in a page', 'booking' ); ?></span>
159 </span>
160 </h1>
161 </div>
162 <div class="wpbc_ui_settings__text_row">
163 <span class="wpbc_ui_settings__text_color__black">
164 <?php
165 esc_html_e( 'Integrate booking form into a page on your website.', 'booking' );
166 ?>
167 </span>
168 </div>
169 <div style="align-self:center;margin: 0px 0 0;" class="wpbc_flextable_col">
170 <?php
171
172 ?>
173 <div class="wpbc_ajx_toolbar wpbc_no_borders" style="margin: 0 auto;margin-top: 15px;">
174 <div class="ui_container ui_container_small">
175 <div class="ui_group ui_group__publish_btn" style="align-items: center;">
176 <div class="ui_element" style="margin: 0 15px 0 0;">
177 <a href="<?php echo esc_url( wpbc_get_resources_url() ); ?>"
178 id="ui_btn_publish_into_exist" class="wpbc_ui_control wpbc_ui_button wpbc_ui_button_danger0 tooltip_top "
179 title="<?php echo esc_attr(
180 sprintf( __( 'Integrate booking form into a page on your website.', 'booking' ), '', '' )
181 ); ?>" >
182 <span><?php esc_html_e('Integrate booking form', 'booking'); ?>&nbsp;&nbsp;&nbsp;</span>
183 <i class="menu_icon icon-1x wpbc-bi-arrow-right-short" style="margin: 0;"></i>
184 </a>
185 </div>
186 </div>
187 </div>
188 </div>
189 <?php
190
191 ?>
192 </div>
193
194 </div><?php
195 }
196
197
198 /**
199 * Show == Dashboard Card - Shortcodes Help ==
200 *
201 * @return void
202 */
203 function wpbc_ui_settings_panel__card__shortcodes_help(){
204
205 ?><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">
206 <div class="wpbc_ui_settings__text_row">
207 <i class="menu_icon icon-1x wpbc_icn_code"></i>
208 <h1>
209 <span>
210 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Shortcodes', 'booking' ); ?></span>
211 </span>
212 </h1>
213 </div>
214 <div class="wpbc_ui_settings__text_row">
215 <span class="wpbc_ui_settings__text_color__black">
216 <ul>
217 <li style="font-size: 0.94em;"><span class="welcome-icon"><?php
218
219 /* translators: 1: ... */
220 $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' );
221 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
222 printf( $text_description, '<strong><a href="https://wpbookingcalendar.com/faq/insert-booking-calendar-into-page/" target="_blank">', '</a></strong>' );
223
224 echo '</span> <span class="welcome-icon">';
225
226 /* translators: 1: ... */
227 $text_description = __( 'See %1$sall shortcodes%2$s of the Booking Calendar that you can use in pages.', 'booking' );
228 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
229 printf( $text_description, '<strong><a href="https://wpbookingcalendar.com/faq/#shortcodes" target="_blank">', '</a></strong>' );
230
231 ?></span></li>
232 </ul>
233 </span>
234 </div>
235 </div><?php
236 }
237
238
239 /**
240 * Show == Dashboard Card - Next Steps ==
241 *
242 * @return void
243 */
244 function wpbc_ui_settings_panel__card__welcome__next_steps(){
245
246 ?><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">
247 <div class="wpbc_ui_settings__text_row">
248 <i class="menu_icon icon-1x wpbc_icn_code"></i>
249 <h1>
250 <span>
251 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Next Steps', 'booking' ); ?></span>
252 </span>
253 </h1>
254 </div>
255 <div class="wpbc_ui_settings__text_row">
256 <span class="wpbc_ui_settings__text_color__black">
257 <ul>
258
259 <?php if ( ! empty( $wp_post_booking_absolute ) ) { ?>
260 <li><div class="welcome-icon"><?php
261 /* translators: 1: ... */
262 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' )
263 , '<strong>', '</strong>'
264 , '<strong><a href="' . esc_url( $wp_post_booking_absolute ) . '" target="_blank">', '</a></strong>'
265 , '<a href="' . esc_url( wpbc_get_new_booking_url() ) . '">', '</a>'
266 ) );
267 ?></div></li>
268 <?php } ?>
269
270 <li><div class="welcome-icon"><?php
271 /* translators: 1: ... */
272 echo esc_html( sprintf( __( 'Check %1$sBooking Listing%2$s page for new bookings.', 'booking' )
273 , '<a href="' . esc_url( wpbc_get_bookings_url(true, false) . '&tab=vm_booking_listing' ) . '">', '</a>'
274 ) );
275 ?></div></li>
276 <li><div class="welcome-icon"><?php
277 /* translators: 1: ... */
278 echo esc_html( sprintf( __( 'Configure %1$sForm Fields%2$s, %3$sEmails%4$s and other %5$sSettings%6$s.', 'booking' )
279 , '<a href="' . esc_url( wpbc_get_settings_url(true, false) . '&tab=form' ) . '">', '</a>'
280 , '<a href="' . esc_url( wpbc_get_settings_url(true, false) . '&tab=email' ) . '">', '</a>'
281 , '<a href="' . esc_url( wpbc_get_settings_url(true, false) ) . '">', '</a>'
282 ) );
283 ?></div></li>
284 </ul>
285 </span>
286 </div>
287 </div><?php
288 }
289
290
291 /**
292 * Show == Dashboard Card - Have a questions? ==
293 *
294 * @return void
295 */
296 function wpbc_ui_settings_panel__card__welcome__have_questions(){
297
298 ?><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">
299 <div class="wpbc_ui_settings__text_row">
300 <i class="menu_icon icon-1x wpbc_icn_help_outline"></i>
301 <h1>
302 <span>
303 <span class="0wpbc_ui_settings__text_color__black2"><?php esc_html_e( 'Have a questions?', 'booking' ); ?></span>
304 </span>
305 </h1>
306 </div>
307 <div class="wpbc_ui_settings__text_row">
308 <span class="wpbc_ui_settings__text_color__black">
309 <ul>
310 <li><span class="welcome-icon"><?php
311
312 /* translators: 1: ... */
313 $text_description = __( 'See %1$sFAQ%2$s.', 'booking' );
314 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
315 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>' );
316 echo '</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="welcome-icon">';
317 /* translators: 1: ... */
318 $text_description = __( 'Contact %1$sSupport%2$s.', 'booking' );
319 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
320 printf( $text_description, '<a href="mailto:support@wpbookingcalendar.com" target="_blank">', '</a>' );
321 ?></span></li>
322 </span>
323 </div>
324 </div><?php
325 }
326
327
328
329 // </editor-fold>
330
331
332