PluginProbe
Booking Calendar / 11.4.3
Booking Calendar v11.4.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 / core / admin / page-settings.php

page-settings.php in Booking Calendar 11.4.3, at core/admin/page-settings.php

922 lines 48.9 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 Content of Settings page
5 * @author wpdevelop
6 *
7 * @web-site https://wpbookingcalendar.com/
8 * @email info@wpbookingcalendar.com
9 *
10 * @modified 2015-11-02
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
15
16 /**
17 * Show Content
18 * Update Content
19 * Define Slug
20 * Define where to show
21 */
22 class WPBC_Page_SettingsGeneral extends WPBC_Page_Structure {
23
24 /**
25 * Link to Settings API obj
26 *
27 * @var bool
28 */
29 private $settings_api = false;
30
31 public function __construct() {
32
33 if ( ! wpbc_is_mu_user_can_be_here( 'only_super_admin' ) ) { // If this User not "super admin", then do not load this page at all
34 // If tab was not selected or selected default, then redirect it to the "form" tab.
35 // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
36 if ( ( isset( $_REQUEST['page'] ) && ( 'wpbc-settings' === $_REQUEST['page'] ) ) && ( ( ! isset( $_REQUEST['tab'] ) ) || ( 'general' === $_REQUEST['tab'] ) ) ) {
37 $_REQUEST['tab'] = 'form';
38 }
39 } else {
40 parent::__construct();
41 }
42 }
43
44 public function in_page() {
45
46 if ( ! wpbc_is_mu_user_can_be_here( 'only_super_admin' ) ) { // If this User not "super admin", then do not load this page at all.
47 return (string) wp_rand( 100000, 1000000 );
48 }
49
50 return 'wpbc-settings';
51 }
52
53
54 /**
55 * Get Settings API class - define, show, update "Fields".
56 *
57 * @return object Settings API
58 */
59 public function settings_api() {
60
61 if ( false === $this->settings_api ) {
62 $this->settings_api = new WPBC_Settings_API_General();
63 }
64
65 return $this->settings_api;
66 }
67
68
69 public function tabs() {
70
71 // Init vars.
72 $separator_i = 0;
73 $tabs = array();
74 $subtab_default = array(
75 'type' => 'subtab', // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'.
76 'title' => '',
77 'page_title' => '',
78 'hint' => '',
79 'link' => '',
80 'css_classes' => '',
81 'font_icon' => 'wpbc_icn_dashboard',
82 'font_icon_right' => 'wpbc-bi-question-circle',
83 'default' => false,
84 );
85
86 // =============================================================================================================
87 // == D A S H B O A R D ==
88 // =============================================================================================================
89 $tabs['general'] = array(
90 'is_show_top_path' => true, // true | false. By default value is: false.
91 'is_show_top_navigation' => false, // true | false. By default value is: false.
92 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
93 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
94 // translators: 1: Booking Calendar.
95 'page_description' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
96 'title' => __( 'Dashboard', 'booking' ), // Left Vertical Menu - Title.
97 // translators: 1: Booking Calendar.
98 'hint' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
99 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
100 'default' => true, // Is this tab activated by default or not: true / false.
101 'font_icon' => 'wpbc-bi-speedometer2',
102 // 'font_icon_right' => 'wpbc-bi-question-circle',
103 'css_classes' => 'do_expand__' . 'wpbc_general_settings_dashboard_metabox' . '_link',
104 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . 'wpbc_general_settings_dashboard_metabox' . "' );",
105 'folder_style' => 'order:10;',
106 );
107 // FixIn: 10.12.4.7. $tabs[ 'settings' . ( ++$separator_i ) ] = array_merge( $subtab_default, array( 'type' => 'separator' ,'folder_style' => 'order:10;' ) );
108
109
110 // =============================================================================================================
111 // == C O N F I R M A T I ON ==
112 // =============================================================================================================
113 $tabs['booking_confirmation'] = array(
114 'is_show_top_path' => true, // true | false. By default value is: true.
115 'is_show_top_navigation' => false, // true | false. By default value is: false.
116 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
117 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
118 // translators: 1: Booking Calendar.
119 'page_description' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
120 'title' => __( 'Booking Confirmation', 'booking' ), // Left Vertical Menu - Title.
121 'hint' => __( 'Customize how the booking summary is displayed after a booking is created', 'booking' ),
122 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
123 'default' => false, // Is this tab activated by default or not: true / false.
124 'font_icon' => 'wpbc-bi-card-checklist',
125 'font_icon_right' => 'wpbc-bi-question-circle',
126 'css_classes' => 'do_expand__' . 'wpbc_general_settings_booking_confirmation_metabox' . '_link',
127 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" .
128 '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' .
129 "' );",
130 'folder_style' => 'order:20;',
131 );
132
133 // FixIn: 10.12.4.7. $tabs[ 'settings' . ( ++$separator_i ) ] = array_merge( $subtab_default, array( 'type' => 'separator' ,'folder_style' => 'order:20;' ) );
134
135 // =============================================================================================================
136 // == Manage Bookings ==
137 // =============================================================================================================
138 $tabs['manage_bookings'] = array(
139 'is_show_top_path' => true, // true | false. By default value is: true.
140 'is_show_top_navigation' => false, // true | false. By default value is: false.
141 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
142 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
143 // translators: 1: Booking Calendar.
144 'page_description' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
145 'title' => __( 'Manage Bookings', 'booking' ), // Left Vertical Menu - Title.
146 // translators: 1: Booking Calendar.
147 'hint' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
148 'font_icon' => 'wpbc_icn_app_registration', // Left Vertical Menu - Icon.
149 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
150 'css_classes' => '', // CSS.
151 'icon' => '', // Icon - link to the real PNG img.
152 'default' => false, // Is this tab activated by default or not: true / false.
153 'folder_style' => 'order:1000',
154 );
155
156 $subtabs = array();
157
158 $section_id = 'wpbc_general_settings_booking_timeline_metabox';
159 $subtabs['booking_timeline'] = array_merge(
160 $subtab_default,
161 array(
162 'title' => __( 'Timeline (front-end)', 'booking' ),
163 'page_title' => __( 'General Settings', 'booking' ),
164 'hint' => __( 'Customize timeline options, including the display of booking details.', 'booking' ),
165 'font_icon' => 'wpbc_icn_align_vertical_bottom wpbc_icn_rotate_90',
166 'font_icon_right' => 'wpbc-bi-question-circle',
167 'css_classes' => 'do_expand__' . $section_id . '_link ',
168 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
169 'default' => false,
170 )
171 );
172
173 if ( class_exists('wpdev_bk_personal') ) {
174 $section_id = 'wpbc_general_settings_bookings_options_metabox';
175 $subtabs['bookings_options'] = array_merge(
176 $subtab_default,
177 array(
178 'title' => __( 'Manage Bookings', 'booking' ),
179 'page_title' => __( 'General Settings', 'booking' ),
180 'hint' => __( 'Allow customers to edit or cancel their own bookings.', 'booking' ),
181 'font_icon' => 'wpbc_icn_app_registration mode_edit_outline edit_calendar',
182 'font_icon_right' => 'wpbc-bi-question-circle',
183 'css_classes' => 'do_expand__' . $section_id . '_link ',
184 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
185 'default' => false,
186 )
187 );
188 }
189
190
191 if ( class_exists('wpdev_bk_biz_s') ) {
192 $section_id = 'wpbc_general_settings_auto_cancelation_approval_metabox';
193 $subtabs['auto_cancelation_approval'] = array_merge(
194 $subtab_default,
195 array(
196 'title' => __( 'Auto Cancellation / Auto Approval', 'booking' ),
197 'page_title' => __( 'General Settings', 'booking' ),
198 'hint' => __( 'Enable automatic approval or cancellation of bookings.', 'booking' ),
199 'font_icon' => 'wpbc_icn_published_with_changes',
200 'font_icon_right' => 'wpbc-bi-question-circle',
201 'css_classes' => 'do_expand__' . $section_id . '_link',
202 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
203 'default' => false,
204 )
205 );
206 }
207
208 $tabs['manage_bookings']['subtabs'] = $subtabs;
209
210
211 // =============================================================================================================
212 // == Admin Panel ==
213 // =============================================================================================================
214 $tabs['admin_panel'] = array(
215 'is_show_top_path' => true, // true | false. By default value is: true.
216 'is_show_top_navigation' => false, // true | false. By default value is: false.
217 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
218 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
219 'page_description' => __( 'Configure various options and settings in the admin panel.', 'booking' ), // Header - Title Description. If false, than hidden.
220 'title' => __( 'Admin Panel', 'booking' ), // Left Vertical Menu - Title.
221 // translators: 1: Booking Calendar.
222 'hint' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
223 'font_icon' => 'wpbc_icn_widgets', // Left Vertical Menu - Icon.
224 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
225 'css_classes' => '', // CSS.
226 'icon' => '', // Icon - link to the real PNG img.
227 'default' => false, // Is this tab activated by default or not: true / false.
228 'folder_style' => 'order:1000',
229 );
230
231 $subtabs = array();
232
233 $section_id = 'wpbc_general_settings_booking_listing_metabox';
234 $subtabs['booking_listing'] = array_merge(
235 $subtab_default,
236 array(
237 'title' => __( 'Booking Admin Panel', 'booking' ),
238 'page_title' => __( 'General Settings', 'booking' ),
239 'hint' => __( 'Configure various options and settings in the admin panel.', 'booking' ),
240 'font_icon' => 'wpbc-bi-list',
241 'font_icon_right' => 'wpbc-bi-question-circle',
242 'css_classes' => 'do_expand__' . $section_id . '_link',
243 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
244 'default' => false,
245 )
246 );
247
248 $section_id = 'wpbc_general_settings_booking_calendar_overview_metabox';
249 $subtabs['booking_calendar_overview'] = array_merge(
250 $subtab_default,
251 array(
252 'title' => __( 'Timeline View (Back-End)', 'booking' ),
253 'page_title' => __( 'General Settings', 'booking' ),
254 'hint' => __( 'Customize timeline options in the admin panel, including displaying booking details.', 'booking' ),
255 'font_icon' => 'wpbc-bi-bar-chart-steps _icn_timeline 0wpbc_icn_rotate_45 0wpbc_icn_align_vertical_bottom',
256 'font_icon_right' => 'wpbc-bi-question-circle',
257 'css_classes' => 'do_expand__' . $section_id . '_link',
258 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
259 'default' => false,
260 )
261 );
262
263 $section_id = 'wpbc_general_settings_datestimes_metabox';
264 $subtabs['datestimes'] = array_merge(
265 $subtab_default,
266 array(
267 'title' => __( 'Date and Time Formats', 'booking' ),
268 'page_title' => __( 'General Settings', 'booking' ),
269 'hint' => __( 'Customize the display format for dates and times.', 'booking' ),
270 'font_icon' => 'wpbc-bi-braces-asterisk _icn_password',
271 'font_icon_right' => 'wpbc-bi-question-circle',
272 'css_classes' => 'do_expand__' . $section_id . '_link',
273 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
274 'default' => false,
275 )
276 );
277
278 $section_id = 'wpbc_general_settings_permissions_metabox';
279 $subtabs['permissions'] = array_merge(
280 $subtab_default,
281 array(
282 'title' => __( 'Plugin Menu / Permissions', 'booking' ),
283 'page_title' => __( 'General Settings', 'booking' ),
284 'hint' => __( 'Set user permissions for accessing plugin menu pages and configure the menu position.', 'booking' ),
285 'font_icon' => 'wpbc-bi-key',
286 'font_icon_right' => 'wpbc-bi-question-circle',
287 'css_classes' => 'do_expand__' . $section_id . '_link',
288 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
289 'default' => false,
290 )
291 );
292
293 $section_id = 'wpbc_general_settings_translations_metabox';
294 $subtabs['translations'] = array_merge(
295 $subtab_default,
296 array(
297 'title' => __( 'Translations', 'booking' ),
298 'page_title' => __( 'General Settings', 'booking' ),
299 'hint' => __( 'Choose whether to use local translations or WordPress translations.', 'booking' ),
300 'font_icon' => 'wpbc_icn_translate 0wpbc-bi-translate',
301 'font_icon_right' => 'wpbc-bi-question-circle',
302 'css_classes' => 'do_expand__' . $section_id . '_link',
303 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
304 'default' => false,
305 )
306 );
307
308 $tabs['admin_panel']['subtabs'] = $subtabs;
309
310
311 // =============================================================================================================
312 // == Advanced ==
313 // =============================================================================================================
314 $tabs['advanced'] = array(
315 'is_show_top_path' => true, // true | false. By default value is: true.
316 'is_show_top_navigation' => false, // true | false. By default value is: false.
317 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
318 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
319 // translators: 1: Booking Calendar.
320 'page_description' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
321 'title' => __( 'Advanced', 'booking' ), // Left Vertical Menu - Title.
322 // translators: 1: Booking Calendar.
323 'hint' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
324 'font_icon' => 'wpbc-bi-gear', // Left Vertical Menu - Icon.
325 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
326 'css_classes' => '', // CSS.
327 'icon' => '', // Icon - link to the real PNG img.
328 'default' => false, // Is this tab activated by default or not: true / false.
329 'folder_style' => 'order:1000',
330 );
331
332 $subtabs = array();
333
334 $section_id = 'wpbc_general_settings_advanced_metabox';
335 $subtabs['advanced_options'] = array_merge(
336 $subtab_default,
337 array(
338 'title' => __( 'Advanced Options', 'booking' ),
339 'page_title' => __( 'General Settings', 'booking' ),
340 'hint' => __( 'Configure loading of CSS/JavaScript files, set the number of simultaneous requests, and other advanced options.', 'booking' ),
341 'font_icon' => 'wpbc_icn_adjust',
342 'font_icon_right' => 'wpbc-bi-question-circle',
343 'css_classes' => 'do_expand__' . $section_id . '_link',
344 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
345 'default' => false,
346 )
347 );
348
349 $section_id = 'wpbc_general_settings_uninstall_metabox';
350 $subtabs['uninstall'] = array_merge(
351 $subtab_default,
352 array(
353 'title' => __( 'Uninstall / Deactivation', 'booking' ),
354 'page_title' => __( 'General Settings', 'booking' ),
355 'hint' => __( 'Enable the option to fully erase booking data when the plugin is deactivated.', 'booking' ),
356 'font_icon' => 'wpbc-bi-trash',
357 'font_icon_right' => 'wpbc-bi-question-circle',
358 'css_classes' => 'do_expand__' . $section_id . '_link',
359 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
360 'default' => false,
361 )
362 );
363
364 $section_id = 'wpbc_general_settings_information_metabox';
365 $subtabs['information'] = array_merge(
366 $subtab_default,
367 array(
368 'title' => __( 'Plugin Info & News', 'booking' ),
369 'page_title' => __( 'General Settings', 'booking' ),
370 'hint' => __( 'Stay informed with the latest news and details about the plugin.', 'booking' ),
371 'font_icon' => 'wpbc_icn_newspaper -bi-newspaper _icn_news 0wpbc-bi-translate',
372 'font_icon_right' => 'wpbc-bi-question-circle',
373 'css_classes' => 'do_expand__' . $section_id . '_link',
374 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
375 'default' => false,
376 )
377 );
378
379 $section_id = 'wpbc_general_settings_help_metabox';
380 $subtabs['tools'] = array_merge(
381 $subtab_default,
382 array(
383 'title' => __( 'Tools', 'booking' ),
384 'page_title' => __( 'General Settings', 'booking' ),
385 'hint' => '', //__( 'Stay informed with the latest news and details about the plugin. ', 'booking' ),
386 'font_icon' => 'wpbc_icn_construction',
387 'font_icon_right' => '',
388 'css_classes' => 'do_expand__' . $section_id . '_link',
389 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
390 'default' => false,
391 )
392 );
393 if ( class_exists('wpdev_bk_multiuser') ) {
394 $section_id = 'wpbc_general_settings_multiuser_metabox';
395 $subtabs['multiuser'] = array_merge(
396 $subtab_default,
397 array(
398 'title' => __( 'Multiuser Options', 'booking' ),
399 'page_title' => __( 'General Settings', 'booking' ),
400 'hint' => __( 'Multiuser Options', 'booking' ),
401 'font_icon' => 'wpbc_icn_people_alt',
402 'font_icon_right' => 'wpbc-bi-question-circle',
403 'css_classes' => 'do_expand__' . $section_id . '_link',
404 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
405 'default' => false,
406 )
407 );
408 }
409
410 $tabs['advanced']['subtabs'] = $subtabs;
411
412 // FixIn: 10.12.4.7. $tabs[ 'settings' . ( ++$separator_i ) ] = array_merge( $subtab_default, array( 'type' => 'separator' ,'folder_style' => 'order:900;' ) );
413 // $tabs[ 'settings' . ( ++$separator_i ) ] = array_merge( $subtab_default, array( 'type' => 'separator' ,'folder_style' => 'order:1000;' ) );
414
415 return $tabs;
416 }
417
418
419 public function content() {
420
421 // Checking.
422
423 do_action( 'wpbc_hook_settings_page_header', 'general_settings' ); // Define Notices Section and show some static messages, if needed.
424
425 if ( ! wpbc_is_mu_user_can_be_here( 'activated_user' ) ) {
426 return false;
427 } // Check if MU user activated, otherwise show Warning message.
428
429 if ( ! wpbc_is_mu_user_can_be_here( 'only_super_admin' ) ) {
430 return false;
431 } // User is not Super admin, so exit. Basically its was already checked at the bottom of the PHP file, just in case.
432
433 // Redirect legacy Settings > Calendar links to the dedicated Calendar settings page.
434 // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
435 if ( ! empty( $_GET['scroll_to_section'] ) ) {
436 $scroll_to_section = sanitize_text_field( wp_unslash( $_GET['scroll_to_section'] ) );
437
438 if ( 'wpbc_general_settings_calendar_tab' === $scroll_to_section ) {
439 wpbc_redirect( function_exists( 'wpbc_settings_calendar__get_section_url' ) ? wpbc_settings_calendar__get_section_url( 'general' ) : admin_url( 'admin.php?page=wpbc-settings&tab=calendar_settings' ) );
440 return;
441 }
442
443 if ( 'wpbc_general_settings_days_tooltips_tab' === $scroll_to_section ) {
444 wpbc_redirect( function_exists( 'wpbc_settings_calendar__get_section_url' ) ? wpbc_settings_calendar__get_section_url( 'tooltips' ) : admin_url( 'admin.php?page=wpbc-settings&tab=calendar_settings&wpbc_calendar_section=tooltips' ) );
445 return;
446 }
447
448 if ( 'wpbc_general_settings_availability_tab' === $scroll_to_section ) {
449 wpbc_redirect( function_exists( 'wpbc_get_general_availability_url' ) ? wpbc_get_general_availability_url() : admin_url( 'admin.php?page=wpbc-availability&tab=general_availability' ) );
450 return;
451 }
452 }
453
454 $is_can = apply_bk_filter( 'recheck_version', true );
455 if ( ! $is_can ) {
456 ?>
457 <script type="text/javascript"> jQuery(document).ready(function () {
458 jQuery('.wpdvlp-sub-tabs').remove();
459 });
460 </script>
461 <?php
462 return;
463 }
464
465
466 // Init Settings API & Get Data from DB.
467 $this->settings_api(); // Define all fields and get values from DB.
468
469 // Submit .
470
471 $submit_form_name = 'wpbc_general_settings_form'; // Define form name.
472
473 // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
474 if ( isset( $_POST[ 'is_form_sbmitted_' . $submit_form_name ] ) ) {
475
476 // Nonce checking {Return false if invalid, 1 if generated between, 0-12 hours ago, 2 if generated between 12-24 hours ago. }.
477 $nonce_gen_time = check_admin_referer( 'wpbc_settings_page_' . $submit_form_name ); // Its stop show anything on submiting, if its not refear to the original page.
478
479 // Save Changes .
480 $this->update();
481 }
482 // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
483 if ( ! empty( $_GET['scroll_to_section'] ) ) {
484 ?>
485 <script type="text/javascript">
486 jQuery(document).ready(function () {
487 jQuery('#<?php echo esc_js( sanitize_text_field( wp_unslash( $_GET['scroll_to_section'] ) ) ); ?> a').trigger('click');
488 });
489 </script>
490 <?php
491 }
492
493 // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
494 if ( ( isset( $_GET['wpbc_setup_wizard'] ) ) && ( 'reset' === $_GET['wpbc_setup_wizard'] ) ) {
495
496 wpbc_setup_wizard_page__force_in_get();
497
498 ?>
499 <div class="wpdvlp-sub-tabs wpbc_redirection_message" style="margin: 20px 0;padding: 1em;font-size: 14px;">
500 <a href="<?php echo esc_url( wpbc_get_setup_wizard_page_url() ); ?>">Redirect</a> after <span class="wpbc_countdown">1</span> second...</div>
501 <?php
502
503 wpbc_redirect( wpbc_get_setup_wizard_page_url() );
504 }
505
506 // JavaScript: Tooltips, Popover, Datepick (js & css) .
507 echo '<span class="wpdevelop">';
508 wpbc_js_for_bookings_page();
509 echo '</span>';
510
511 // TODO: 2025-05-05 update in real top path. wpbc_ui_settings__top_path();
512
513 // Content .
514 ?>
515 <div class="clear"></div>
516 <div class="wpbc_settings_flex_container">
517
518 <div class="wpbc_settings_flex_container_left" style="display:none;">
519
520 <div class="wpbc_settings_navigation_column">
521
522 <div id="wpbc_general_settings_dashboard_tab" class="wpbc_settings_navigation_item wpbc_settings_navigation_item_active">
523 <?php
524 $title = esc_attr__( 'Dashboard', 'booking' );
525 ?>
526 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_dashboard_tab a' ,'#wpbc_general_settings_dashboard_metabox', '<?php echo esc_js( $title ); ?>' );"
527 href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
528 </div>
529 <div id="wpbc_general_settings_booking_confirmation_tab" class="wpbc_settings_navigation_item">
530 <?php
531 $title = esc_attr__( 'Booking Confirmation', 'booking' );
532 ?>
533 <a 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', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
534 </div>
535
536 <div id="wpbc_general_settings_booking_timeline_tab" class="wpbc_settings_navigation_item wpbc_navigation_top_border">
537 <?php
538 $title = esc_attr__( 'Timeline (front-end)', 'booking' );
539 ?>
540 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_timeline_tab a' ,'#wpbc_general_settings_booking_timeline_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
541 </div>
542 <?php if ( class_exists('wpdev_bk_personal') ) { ?>
543 <div id="wpbc_general_settings_bookings_options_tab" class="wpbc_settings_navigation_item wpbc_navigation_top_border">
544 <?php
545 $title = esc_attr__( 'Manage Bookings', 'booking' );
546 ?>
547 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_bookings_options_tab a' ,'#wpbc_general_settings_bookings_options_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
548 </div>
549 <?php } ?>
550
551 <?php if ( class_exists('wpdev_bk_biz_s') ) { ?>
552 <div id="wpbc_general_settings_auto_cancelation_approval_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
553 <?php
554 $title = esc_attr__( 'Auto Cancellation / Auto Approval', 'booking' );
555 ?>
556 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_auto_cancelation_approval_tab a' ,'#wpbc_general_settings_auto_cancelation_approval_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
557 </div>
558 <?php } ?>
559
560
561 <?php if ( class_exists('wpdev_bk_multiuser') ) { ?>
562 <div id="wpbc_general_settings_multiuser_tab" class="wpbc_settings_navigation_item">
563 <?php
564 $title = esc_attr__( 'Multiuser options', 'booking' );
565 ?>
566 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_multiuser_tab a' ,'#wpbc_general_settings_multiuser_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
567 </div>
568 <?php } ?>
569
570 <div id="wpbc_general_settings_booking_listing_tab" class="wpbc_settings_navigation_item wpbc_navigation_top_border">
571 <?php
572 $title = esc_attr__( 'Admin Panel', 'booking' );
573 ?>
574 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_listing_tab a' ,'#wpbc_general_settings_booking_listing_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
575 </div>
576 <div id="wpbc_general_settings_booking_calendar_overview_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
577 <?php
578 $title = esc_attr__( 'Timeline View', 'booking' );
579 ?>
580 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_booking_calendar_overview_tab a' ,'#wpbc_general_settings_booking_calendar_overview_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
581 </div>
582 <div id="wpbc_general_settings_datestimes_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
583 <?php
584 $title = esc_attr__( 'Date / Time Formats', 'booking' );
585 ?>
586 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_datestimes_tab a' ,'#wpbc_general_settings_datestimes_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
587 </div>
588 <div id="wpbc_general_settings_permissions_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
589 <?php
590 $title = esc_attr__( 'Plugin Menu / Permissions', 'booking' );
591 ?>
592 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_permissions_tab a' ,'#wpbc_general_settings_permissions_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
593 </div>
594 <div id="wpbc_general_settings_translations_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
595 <?php
596 $title = esc_attr__( 'Translations', 'booking' );
597 ?>
598 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_translations_tab a' ,'#wpbc_general_settings_translations_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
599 </div>
600 <div id="wpbc_general_settings_advanced_tab" class="wpbc_settings_navigation_item">
601 <?php
602 $title = esc_attr__( 'Advanced', 'booking' );
603 ?>
604 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_advanced_tab a' ,'#wpbc_general_settings_advanced_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
605 </div>
606 <div id="wpbc_general_settings_uninstall_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
607 <?php
608 $title = esc_attr__( 'Uninstall / deactivation', 'booking' );
609 ?>
610 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_uninstall_tab a' ,'#wpbc_general_settings_uninstall_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
611 </div>
612 <div id="wpbc_general_settings_information_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
613 <?php
614 $title = esc_attr__( 'Info / News', 'booking' );
615 ?>
616 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_information_tab a' ,'#wpbc_general_settings_information_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
617 </div>
618 <?php if ( ( class_exists('wpdev_bk_personal') ) && ( ! wpbc_is_this_demo() ) ) { ?>
619 <div id="wpbc_general_settings_help_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
620 <?php
621 $title = esc_attr__( 'Tools', 'booking' );
622 ?>
623 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_help_tab a' ,'#wpbc_general_settings_help_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
624 </div>
625 <?php } ?>
626
627 <div id="wpbc_general_settings_all_tab" class="wpbc_settings_navigation_item wpbc_navigation_top_border">
628 <?php
629 $title = esc_attr__( 'Show All Settings', 'booking' );
630 ?>
631 <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_all_tab a' ,'.postbox', '<?php echo esc_js( $title ); ?>' );"
632 href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
633 </div>
634
635 </div>
636
637 </div>
638 <div class="wpbc_settings_flex_container_right">
639
640 <span class="metabox-holder">
641 <form name="<?php echo esc_attr( $submit_form_name ); ?>" id="<?php echo esc_attr( $submit_form_name ); ?>" action="" method="post">
642 <?php
643 // N o n c e field, and key for checking S u b m i t.
644 wp_nonce_field( 'wpbc_settings_page_' . $submit_form_name );
645 ?>
646 <input type="hidden" name="is_form_sbmitted_<?php echo esc_attr( $submit_form_name ); ?>" id="is_form_sbmitted_<?php echo esc_attr( $submit_form_name ); ?>" value="1"/>
647 <input type="hidden" name="form_visible_section" id="form_visible_section" value=""/>
648
649 <?php
650 if ( wpbc_is_show_general_setting_options() ) {
651 // FixIn: 8.9.4.11.
652 ?>
653
654 <div class="wpbc_settings_row wpbc_settings_row_full_width" >
655
656 <div id="wpbc_general_settings_dashboard_metabox" class="postbox"
657 style="background: transparent;border: 0;box-shadow: none;"><?php //wpbc_open_meta_box_section( 'wpbc_general_settings_dashboard', __('Dashboard'), array( 'is_section_visible_after_load' => true, 'is_show_minimize' => false ) ); ?>
658 <?php
659
660 wpbc_ui_settings__panel__statistic();
661
662 wpbc_ui_settings__panel__all_settings_panels();
663
664 wpbc_ui_settings__panel__plugin_version();
665
666 ?></div><?php //wpbc_close_meta_box_section(); ?>
667
668 <?php
669 wpbc_open_meta_box_section( 'wpbc_general_settings_booking_confirmation',
670 __( 'Booking Confirmation', 'booking' ),
671 array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) );
672 $this->settings_api()->show( 'booking_confirmation' );
673 wpbc_close_meta_box_section();
674 ?>
675 <div class="wpbc_settings_row wpbc_settings_row_left">
676 <?php
677 wpbc_open_meta_box_section( 'wpbc_general_settings_booking_confirmation_left',
678 __( 'Section', 'booking' ) . ': ' . __( 'Personal Information', 'booking' ),
679 array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) );
680 $this->settings_api()->show( 'booking_confirmation_left' );
681 wpbc_close_meta_box_section();
682
683 wpbc_open_meta_box_section( 'wpbc_general_settings_booking_confirmation_right',
684 __( 'Section', 'booking' ) . ': ' . __( 'Booking details', 'booking' ),
685 array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) );
686 $this->settings_api()->show( 'booking_confirmation_right' );
687 wpbc_close_meta_box_section();
688 ?>
689 </div>
690 <div class="wpbc_settings_row wpbc_settings_row_right">
691 <?php
692 wpbc_open_meta_box_section( 'wpbc_general_settings_booking_confirmation_help',
693 __( 'Shortcodes', 'booking' ),
694 array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) );
695 $this->settings_api()->show( 'booking_confirmation_help' );
696 wpbc_close_meta_box_section();
697 ?>
698 </div>
699 <div class="clear"></div>
700
701 <?php if ( class_exists('wpdev_bk_personal') ) { ?>
702 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_bookings_options', __('Bookings Options', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
703
704 <?php $this->settings_api()->show( 'bookings_options' ); ?>
705
706 <?php wpbc_close_meta_box_section(); ?>
707 <?php } ?>
708
709
710 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_booking_listing', __('Booking Admin Panel', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
711
712 <?php $this->settings_api()->show( 'booking_listing' ); ?>
713
714 <?php wpbc_close_meta_box_section(); ?>
715
716
717 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_booking_calendar_overview', __('Calendar Overview (admin panel)', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
718
719 <?php // FixIn: 8.5.2.20.
720 $this->settings_api()->show( 'booking_calendar_overview' );
721 ?>
722
723 <?php wpbc_close_meta_box_section(); ?>
724
725
726 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_booking_timeline', __('Timeline (front-end)', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
727
728 <?php
729 $this->settings_api()->show( 'booking_timeline' );
730 ?>
731
732 <?php wpbc_close_meta_box_section(); ?>
733
734
735 <?php if ( class_exists('wpdev_bk_biz_s') ) { ?>
736
737
738 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_auto_cancelation_approval', __('Auto cancellation / auto approval of bookings', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
739
740 <?php $this->settings_api()->show( 'auto_cancelation_approval' ); ?>
741
742 <?php wpbc_close_meta_box_section(); ?>
743
744 <?php } ?>
745
746 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_advanced', __('Advanced', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
747
748 <?php $this->settings_api()->show( 'advanced' ); ?>
749
750 <?php wpbc_close_meta_box_section(); ?>
751
752
753 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_information', __('Information', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
754
755 <?php $this->settings_api()->show( 'information' ); ?>
756
757 <?php wpbc_close_meta_box_section(); ?>
758
759
760
761 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_datestimes', __('Date : Time', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
762
763 <?php $this->settings_api()->show( 'date_time' ); ?>
764
765 <?php wpbc_close_meta_box_section(); ?>
766
767
768
769 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_permissions', __('Plugin Menu', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
770
771 <?php $this->settings_api()->show( 'permissions' ); ?>
772
773 <?php wpbc_close_meta_box_section(); ?>
774
775
776 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_uninstall', __('Uninstall / deactivation', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
777
778 <?php $this->settings_api()->show( 'uninstall' ); ?>
779
780 <?php wpbc_close_meta_box_section(); ?>
781
782 <?php if ( ( class_exists( 'wpdev_bk_personal' ) ) && ( ! wpbc_is_this_demo() ) ) { ?>
783 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_help', __( 'Tools', 'booking' ), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
784
785 <?php $this->settings_api()->show( 'help' ); ?>
786
787 <?php wpbc_close_meta_box_section(); ?>
788 <?php } ?>
789
790 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_translations', __( 'Translations', 'booking' ), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
791
792 <?php $this->settings_api()->show( 'translations' ); ?>
793
794 <?php wpbc_translation_buttons_settings_section(); ?>
795
796 <?php wpbc_close_meta_box_section(); ?>
797
798 <?php if ( class_exists( 'wpdev_bk_multiuser' ) ) { // FixIn: 9.2.3.8. ?>
799
800 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_multiuser', __( 'Multiuser options', 'booking' ), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
801
802 <?php $this->settings_api()->show( 'multiuser' ); ?>
803
804 <?php wpbc_close_meta_box_section(); ?>
805
806 <?php } ?>
807
808 </div>
809 <div class="clear"></div>
810 <div class="container_for_save_buttons">
811 <input type="submit" value="<?php esc_attr_e( 'Save Changes', 'booking' ); ?>" class="button button-primary wpbc_submit_button"/>
812 <span class="sub_right">
813 <a style="margin:0;" class="button button"
814 onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_all_tab a' ,'.postbox', 'Show All Settings' );"
815 href="javascript:void(0);">
816 <?php
817 esc_html_e( 'Show All Settings', 'booking' )
818 ?>
819 </a>
820 <?php
821 if ( 'translations_updated_from_wpbc_and_wp' !== get_bk_option( 'booking_translation_update_status' ) ) {
822
823 $current_locale = wpbc_get_maybe_reloaded_booking_locale();
824
825 if ( ! in_array( $current_locale, array( 'en_US', 'en_CA', 'en_GB', 'en_AU' ), true ) ) {
826
827 echo '<a class="button button" href="'
828 . esc_url( wpbc_get_settings_url() . '&system_info=show&_wpnonce=' . wp_create_nonce( 'wpbc_settings_url_nonce' ) . '&update_translations=1#wpbc_general_settings_system_info_metabox' )
829 . '">'
830 . esc_html__( 'Update Translations', 'booking' )
831 . '</a>';
832 }
833 }
834
835 if ( ! wpbc_is_this_demo() ) {
836
837 echo '<a style="margin:0 2em;" class="button button" href="'
838 . esc_url( wpbc_get_settings_url() . '&system_info=show&_wpnonce=' . wp_create_nonce( 'wpbc_settings_url_nonce' ) . '&restore_dismissed=On#wpbc_general_settings_restore_dismissed_metabox' )
839 . '">'
840 . esc_html__( 'Restore all dismissed windows', 'booking' )
841 . '</a>';
842 }
843 ?>
844 </span>
845 </div>
846
847 <?php } ?>
848 </form>
849 </span>
850
851 </div>
852 </div>
853
854
855 <?php
856
857 do_action( 'wpbc_hook_settings_page_footer', 'general_settings' );
858 }
859
860
861 public function update() {
862
863 $validated_fields = $this->settings_api()->validate_post(); // Get Validated Settings fields in $_POST request.
864
865 $validated_fields = apply_filters( 'wpbc_settings_validate_fields_before_saving', $validated_fields ); // Hook for validated fields.
866
867 foreach ( $this->settings_api()->get_form_fields() as $field_name => $field ) {
868 if ( ! empty( $field['group'] ) && in_array( $field['group'], array( 'calendar', 'days_tooltips', 'availability' ), true ) ) {
869 unset( $validated_fields[ $field_name ] );
870 }
871 }
872
873 /**
874 * Skip saving specific option, for example in Demo mode.
875 * // unset( $validated_fields['booking_start_day_weeek'] );
876 */
877
878 // FixIn: 9.8.6.1.
879 // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
880 if ( ! empty( $_POST['form_visible_section'] ) ) {
881 ?>
882 <script type="text/javascript">
883 jQuery(document).ready(function () {
884 jQuery('<?php
885 // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
886 echo esc_js( $_POST['form_visible_section'] );
887 ?> a').trigger('click');
888 });
889 </script>
890 <?php
891 }
892
893 $this->settings_api()->save_to_db( $validated_fields ); // Save fields to DB.
894
895 wpbc_show_changes_saved_message();
896
897 /**
898 * // O L D W A Y: Saving Fields Data
899 * // update_bk_option( 'booking_is_delete_if_deactive'
900 * // , WPBC_Settings_API::validate_checkbox_post('booking_is_delete_if_deactive') );
901 * // ( (isset( $_POST['booking_is_delete_if_deactive'] ))?'On':'Off') );
902 */
903 }
904 }
905
906
907 /**
908 *
909
910 if ( ! wpbc_is_mu_user_can_be_here( 'only_super_admin' ) ) { // If this User not "super admin", then do not load this page at all
911
912 if ( ( ! isset( $ _GET['tab'] ) ) || ( $_GET['tab'] == 'general' ) ) { // If tab was not selected or selected default, then redirect it to the "form" tab.
913 $_GET['tab'] = 'form';
914 }
915 } else {
916 add_action('wpbc_menu_created', array( new WPBC_Page_SettingsGeneral() , '__construct') ); // Executed after creation of Menu
917 }
918 */
919
920 add_action('wpbc_menu_created', array( new WPBC_Page_SettingsGeneral() , '__construct') ); // Executed after creation of Menu
921
922