PluginProbe
Booking Calendar / 10.10
Booking Calendar v10.10
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 10.10, at core/wpbc_welcome.php

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