PluginProbe
Booking Calendar / 11.9
Booking Calendar v11.9
11.9 11.8.4 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 All 205 releases
← All changes | core/admin/page-settings.php +456 -215 10.10.2 → 11.9 View file →
@@ -1,4 +1,4 @@
1 1 <?php /**
2 2 * @version 1.0
3 3 * @package Booking Calendar
4 4 * @category Content of Settings page
@@ -25,13 +25,14 @@
25 25 * Link to Settings API obj
26 26 *
27 27 * @var bool
28 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
29 + private $settings_api = false;
30 +
31 + public function __construct() {
32 + $this->normalize_legacy_settings_request();
33 +
34 + 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 35 // If tab was not selected or selected default, then redirect it to the "form" tab.
35 36 // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
36 37 if ( ( isset( $_REQUEST['page'] ) && ( 'wpbc-settings' === $_REQUEST['page'] ) ) && ( ( ! isset( $_REQUEST['tab'] ) ) || ( 'general' === $_REQUEST['tab'] ) ) ) {
37 38 $_REQUEST['tab'] = 'form';
@@ -37,10 +38,43 @@
37 38 $_REQUEST['tab'] = 'form';
38 39 }
39 40 } else {
40 41 parent::__construct();
41 - }
42 - }
42 + }
43 + }
44 +
45 + /**
46 + * Route settings links for sections that were moved into the Advanced group.
47 + *
48 + * Existing bookmarks and integrations can continue using the former Admin
49 + * Panel group and the previous Manage Bookings location of the front-end
50 + * Timeline settings. Subtab identifiers remain unchanged.
51 + *
52 + * @return void
53 + */
54 + private function normalize_legacy_settings_request() {
55 + $request_page = isset( $_REQUEST['page'] ) && is_scalar( $_REQUEST['page'] )
56 + ? sanitize_key( (string) wp_unslash( $_REQUEST['page'] ) )
57 + : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
58 + $request_tab = isset( $_REQUEST['tab'] ) && is_scalar( $_REQUEST['tab'] )
59 + ? sanitize_key( (string) wp_unslash( $_REQUEST['tab'] ) )
60 + : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
61 + $request_subtab = isset( $_REQUEST['subtab'] ) && is_scalar( $_REQUEST['subtab'] )
62 + ? sanitize_key( (string) wp_unslash( $_REQUEST['subtab'] ) )
63 + : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
64 +
65 + $is_legacy_admin_panel = 'admin_panel' === $request_tab;
66 + $is_legacy_timeline = 'manage_bookings' === $request_tab && 'booking_timeline' === $request_subtab;
67 +
68 + if ( 'wpbc-settings' !== $request_page || ( ! $is_legacy_admin_panel && ! $is_legacy_timeline ) ) {
69 + return;
70 + }
71 +
72 + $_REQUEST['tab'] = 'advanced'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
73 + if ( isset( $_GET['tab'] ) ) {
74 + $_GET['tab'] = 'advanced'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
75 + }
76 + }
43 77
44 78 public function in_page() {
45 79
46 80 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.
@@ -67,26 +101,339 @@
67 101
68 102
69 103 public function tabs() {
70 104
71 - $tabs = array();
105 + // Init vars.
106 + $separator_i = 0;
107 + $tabs = array();
108 + $subtab_default = array(
109 + 'type' => 'subtab', // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'.
110 + 'title' => '',
111 + 'page_title' => '',
112 + 'hint' => '',
113 + 'link' => '',
114 + 'css_classes' => '',
115 + 'font_icon' => 'wpbc_icn_dashboard',
116 + 'font_icon_right' => 'wpbc-bi-question-circle',
117 + 'default' => false,
118 + );
72 119
120 + // =============================================================================================================
121 + // == D A S H B O A R D ==
122 + // =============================================================================================================
73 123 $tabs['general'] = array(
74 - 'title' => __( 'General', 'booking' ), // Title of TAB.
75 - 'page_title' => __( 'General Settings', 'booking' ), // Title of Page.
76 - 'hint' => __( 'General Settings', 'booking' ), // Hint.
77 - 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
78 - 'position' => '', // 'left' / 'right' / ''.
79 - 'css_classes' => '', // CSS.
80 - 'icon' => '', // Icon - link to the real PNG img.
81 - 'font_icon' => 'wpbc_icn_tune', // CSS definition of forn Icon.
82 - 'default' => true // Is this tab activated by default or not: true / false.
124 + 'is_show_top_path' => true, // true | false. By default value is: false.
125 + 'is_show_top_navigation' => false, // true | false. By default value is: false.
126 + 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
127 + 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
128 + // translators: 1: Booking Calendar.
129 + 'page_description' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
130 + 'title' => __( 'Dashboard', 'booking' ), // Left Vertical Menu - Title.
131 + // translators: 1: Booking Calendar.
132 + 'hint' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
133 + 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
134 + 'default' => true, // Is this tab activated by default or not: true / false.
135 + 'font_icon' => 'wpbc-bi-speedometer2',
136 + // 'font_icon_right' => 'wpbc-bi-question-circle',
137 + 'css_classes' => 'do_expand__' . 'wpbc_general_settings_dashboard_metabox' . '_link',
138 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . 'wpbc_general_settings_dashboard_metabox' . "' );",
139 + 'folder_style' => 'order:10;',
83 140 );
141 + // FixIn: 10.12.4.7. $tabs[ 'settings' . ( ++$separator_i ) ] = array_merge( $subtab_default, array( 'type' => 'separator' ,'folder_style' => 'order:10;' ) );
84 142
143 +
144 + // =============================================================================================================
145 + // == C O N F I R M A T I ON ==
146 + // =============================================================================================================
147 + $tabs['booking_confirmation'] = array(
148 + 'is_show_top_path' => true, // true | false. By default value is: true.
149 + 'is_show_top_navigation' => false, // true | false. By default value is: false.
150 + 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
151 + 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
152 + // translators: 1: Booking Calendar.
153 + 'page_description' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
154 + 'title' => __( 'Booking Confirmation', 'booking' ), // Left Vertical Menu - Title.
155 + 'hint' => __( 'Customize how the booking summary is displayed after a booking is created', 'booking' ),
156 + 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
157 + 'default' => false, // Is this tab activated by default or not: true / false.
158 + 'font_icon' => 'wpbc-bi-card-checklist',
159 + 'font_icon_right' => 'wpbc-bi-question-circle',
160 + 'css_classes' => 'do_expand__' . 'wpbc_general_settings_booking_confirmation_metabox' . '_link',
161 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" .
162 + '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' .
163 + "' );",
164 + 'folder_style' => 'order:20;',
165 + );
166 +
167 + // FixIn: 10.12.4.7. $tabs[ 'settings' . ( ++$separator_i ) ] = array_merge( $subtab_default, array( 'type' => 'separator' ,'folder_style' => 'order:20;' ) );
168 +
169 + // =============================================================================================================
170 + // == Manage Bookings ==
171 + // =============================================================================================================
172 + $tabs['manage_bookings'] = array(
173 + 'is_show_top_path' => true, // true | false. By default value is: true.
174 + 'is_show_top_navigation' => false, // true | false. By default value is: false.
175 + 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
176 + 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
177 + // translators: 1: Booking Calendar.
178 + 'page_description' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
179 + 'title' => __( 'Manage Bookings', 'booking' ), // Left Vertical Menu - Title.
180 + // translators: 1: Booking Calendar.
181 + 'hint' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
182 + 'font_icon' => 'wpbc_icn_app_registration', // Left Vertical Menu - Icon.
183 + 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
184 + 'css_classes' => '', // CSS.
185 + 'icon' => '', // Icon - link to the real PNG img.
186 + 'default' => false, // Is this tab activated by default or not: true / false.
187 + 'folder_style' => 'order:1000',
188 + );
189 +
85 190 $subtabs = array();
86 191
87 - $tabs['general']['subtabs'] = $subtabs;
192 + $section_id = 'wpbc_general_settings_booking_timeline_metabox';
193 + $booking_timeline_subtab = array_merge(
194 + $subtab_default,
195 + array(
196 + 'title' => __( 'Timeline (front-end)', 'booking' ),
197 + 'page_title' => __( 'General Settings', 'booking' ),
198 + 'hint' => __( 'Customize timeline options, including the display of booking details.', 'booking' ),
199 + 'font_icon' => 'wpbc_icn_align_vertical_bottom wpbc_icn_rotate_90',
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 + );
88 206
207 + if ( class_exists('wpdev_bk_personal') ) {
208 + $section_id = 'wpbc_general_settings_bookings_options_metabox';
209 + $subtabs['bookings_options'] = array_merge(
210 + $subtab_default,
211 + array(
212 + 'title' => __( 'Manage Bookings', 'booking' ),
213 + 'page_title' => __( 'General Settings', 'booking' ),
214 + 'hint' => __( 'Allow customers to edit or cancel their own bookings.', 'booking' ),
215 + 'font_icon' => 'wpbc_icn_app_registration mode_edit_outline edit_calendar',
216 + 'font_icon_right' => 'wpbc-bi-question-circle',
217 + 'css_classes' => 'do_expand__' . $section_id . '_link ',
218 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
219 + 'default' => false,
220 + )
221 + );
222 + }
223 +
224 +
225 + if ( class_exists('wpdev_bk_biz_s') ) {
226 + $section_id = 'wpbc_general_settings_auto_cancelation_approval_metabox';
227 + $subtabs['auto_cancelation_approval'] = array_merge(
228 + $subtab_default,
229 + array(
230 + 'title' => __( 'Auto Cancellation / Auto Approval', 'booking' ),
231 + 'page_title' => __( 'General Settings', 'booking' ),
232 + 'hint' => __( 'Enable automatic approval or cancellation of bookings.', 'booking' ),
233 + 'font_icon' => 'wpbc_icn_published_with_changes',
234 + 'font_icon_right' => 'wpbc-bi-question-circle',
235 + 'css_classes' => 'do_expand__' . $section_id . '_link',
236 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
237 + 'default' => false,
238 + )
239 + );
240 + }
241 +
242 + $tabs['manage_bookings']['subtabs'] = $subtabs;
243 +
244 +
245 + // =============================================================================================================
246 + // == Admin Panel ==
247 + // =============================================================================================================
248 + $tabs['admin_panel'] = array(
249 + 'is_show_top_path' => true, // true | false. By default value is: true.
250 + 'is_show_top_navigation' => false, // true | false. By default value is: false.
251 + 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
252 + 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
253 + 'page_description' => __( 'Configure various options and settings in the admin panel.', 'booking' ), // Header - Title Description. If false, than hidden.
254 + 'title' => __( 'Admin Panel', 'booking' ), // Left Vertical Menu - Title.
255 + // translators: 1: Booking Calendar.
256 + 'hint' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
257 + 'font_icon' => 'wpbc_icn_widgets', // Left Vertical Menu - Icon.
258 + 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
259 + 'css_classes' => '', // CSS.
260 + 'icon' => '', // Icon - link to the real PNG img.
261 + 'default' => false, // Is this tab activated by default or not: true / false.
262 + 'folder_style' => 'order:1000',
263 + );
264 +
265 + $subtabs = array();
266 +
267 + $section_id = 'wpbc_general_settings_booking_listing_metabox';
268 + $subtabs['booking_listing'] = array_merge(
269 + $subtab_default,
270 + array(
271 + 'title' => __( 'Booking Admin Panel', 'booking' ),
272 + 'page_title' => __( 'General Settings', 'booking' ),
273 + 'hint' => __( 'Configure various options and settings in the admin panel.', 'booking' ),
274 + 'font_icon' => 'wpbc-bi-list',
275 + 'font_icon_right' => 'wpbc-bi-question-circle',
276 + 'css_classes' => 'do_expand__' . $section_id . '_link',
277 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
278 + 'default' => false,
279 + )
280 + );
281 +
282 + $section_id = 'wpbc_general_settings_booking_calendar_overview_metabox';
283 + $subtabs['booking_calendar_overview'] = array_merge(
284 + $subtab_default,
285 + array(
286 + 'title' => __( 'Timeline View (Back-End)', 'booking' ),
287 + 'page_title' => __( 'General Settings', 'booking' ),
288 + 'hint' => __( 'Customize timeline options in the admin panel, including displaying booking details.', 'booking' ),
289 + 'font_icon' => 'wpbc-bi-bar-chart-steps _icn_timeline 0wpbc_icn_rotate_45 0wpbc_icn_align_vertical_bottom',
290 + 'font_icon_right' => 'wpbc-bi-question-circle',
291 + 'css_classes' => 'do_expand__' . $section_id . '_link',
292 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
293 + 'default' => false,
294 + )
295 + );
296 +
297 + $subtabs['booking_timeline'] = $booking_timeline_subtab;
298 +
299 + $section_id = 'wpbc_general_settings_datestimes_metabox';
300 + $subtabs['datestimes'] = array_merge(
301 + $subtab_default,
302 + array(
303 + 'title' => __( 'Date and Time Formats', 'booking' ),
304 + 'page_title' => __( 'General Settings', 'booking' ),
305 + 'hint' => __( 'Customize the display format for dates and times.', 'booking' ),
306 + 'font_icon' => 'wpbc-bi-braces-asterisk _icn_password',
307 + 'font_icon_right' => 'wpbc-bi-question-circle',
308 + 'css_classes' => 'do_expand__' . $section_id . '_link',
309 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
310 + 'default' => false,
311 + )
312 + );
313 +
314 + $section_id = 'wpbc_general_settings_permissions_metabox';
315 + $subtabs['permissions'] = array_merge(
316 + $subtab_default,
317 + array(
318 + 'title' => __( 'Plugin Menu / Permissions', 'booking' ),
319 + 'page_title' => __( 'General Settings', 'booking' ),
320 + 'hint' => __( 'Set user permissions for accessing plugin menu pages and configure the menu position.', 'booking' ),
321 + 'font_icon' => 'wpbc-bi-key',
322 + 'font_icon_right' => 'wpbc-bi-question-circle',
323 + 'css_classes' => 'do_expand__' . $section_id . '_link',
324 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
325 + 'default' => false,
326 + )
327 + );
328 +
329 + $section_id = 'wpbc_general_settings_translations_metabox';
330 + $subtabs['translations'] = array_merge(
331 + $subtab_default,
332 + array(
333 + 'title' => __( 'Translations', 'booking' ),
334 + 'page_title' => __( 'General Settings', 'booking' ),
335 + 'hint' => __( 'Choose whether to use local translations or WordPress translations.', 'booking' ),
336 + 'font_icon' => 'wpbc_icn_translate 0wpbc-bi-translate',
337 + 'font_icon_right' => 'wpbc-bi-question-circle',
338 + 'css_classes' => 'do_expand__' . $section_id . '_link',
339 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
340 + 'default' => false,
341 + )
342 + );
343 +
344 + $tabs['admin_panel']['subtabs'] = $subtabs;
345 + $admin_panel_subtabs = $subtabs;
346 + unset( $tabs['admin_panel'] );
347 +
348 +
349 + // =============================================================================================================
350 + // == Advanced ==
351 + // =============================================================================================================
352 + $tabs['advanced'] = array(
353 + 'is_show_top_path' => true, // true | false. By default value is: true.
354 + 'is_show_top_navigation' => false, // true | false. By default value is: false.
355 + 'left_navigation__default_view_mode' => '', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
356 + 'page_title' => __( 'General Settings', 'booking' ), // Header - Title. If false, than hidden.
357 + // translators: 1: Booking Calendar.
358 + 'page_description' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
359 + 'title' => __( 'Advanced', 'booking' ), // Left Vertical Menu - Title.
360 + // translators: 1: Booking Calendar.
361 + 'hint' => sprintf( __( 'Configure various options and settings in the %s.', 'booking' ), 'Booking Calendar' ),
362 + 'font_icon' => 'wpbc-bi-gear', // Left Vertical Menu - Icon.
363 + 'link' => '', // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link.
364 + 'css_classes' => '', // CSS.
365 + 'icon' => '', // Icon - link to the real PNG img.
366 + 'default' => false, // Is this tab activated by default or not: true / false.
367 + 'folder_style' => 'order:1000',
368 + );
369 +
370 + $subtabs = array();
371 +
372 + $section_id = 'wpbc_general_settings_advanced_metabox';
373 + $subtabs['advanced_options'] = array_merge(
374 + $subtab_default,
375 + array(
376 + 'title' => __( 'Advanced Options', 'booking' ),
377 + 'page_title' => __( 'General Settings', 'booking' ),
378 + 'hint' => __( 'Configure loading of CSS/JavaScript files, set the number of simultaneous requests, and other advanced options.', 'booking' ),
379 + 'font_icon' => 'wpbc_icn_adjust',
380 + 'font_icon_right' => 'wpbc-bi-question-circle',
381 + 'css_classes' => 'do_expand__' . $section_id . '_link',
382 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
383 + 'default' => false,
384 + )
385 + );
386 +
387 + $section_id = 'wpbc_general_settings_uninstall_metabox';
388 + $subtabs['uninstall'] = array_merge(
389 + $subtab_default,
390 + array(
391 + 'title' => __( 'Uninstall / Deactivation', 'booking' ),
392 + 'page_title' => __( 'General Settings', 'booking' ),
393 + 'hint' => __( 'Enable the option to fully erase booking data when the plugin is deactivated.', 'booking' ),
394 + 'font_icon' => 'wpbc-bi-trash',
395 + 'font_icon_right' => 'wpbc-bi-question-circle',
396 + 'css_classes' => 'do_expand__' . $section_id . '_link',
397 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
398 + 'default' => false,
399 + )
400 + );
401 +
402 + $section_id = 'wpbc_general_settings_information_metabox';
403 + $subtabs['information'] = array_merge(
404 + $subtab_default,
405 + array(
406 + 'title' => __( 'Plugin Info & News', 'booking' ),
407 + 'page_title' => __( 'General Settings', 'booking' ),
408 + 'hint' => __( 'Stay informed with the latest news and details about the plugin.', 'booking' ),
409 + 'font_icon' => 'wpbc_icn_newspaper -bi-newspaper _icn_news 0wpbc-bi-translate',
410 + 'font_icon_right' => 'wpbc-bi-question-circle',
411 + 'css_classes' => 'do_expand__' . $section_id . '_link',
412 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
413 + 'default' => false,
414 + )
415 + );
416 +
417 + $section_id = 'wpbc_general_settings_help_metabox';
418 + $subtabs['tools'] = array_merge(
419 + $subtab_default,
420 + array(
421 + 'title' => __( 'Tools', 'booking' ),
422 + 'page_title' => __( 'General Settings', 'booking' ),
423 + 'hint' => '', //__( 'Stay informed with the latest news and details about the plugin. ', 'booking' ),
424 + 'font_icon' => 'wpbc_icn_construction',
425 + 'font_icon_right' => '',
426 + 'css_classes' => 'do_expand__' . $section_id . '_link',
427 + 'onclick' => "wpbc_admin_ui__do__open_url__expand_section( '" . wpbc_get_settings_url() . "', '" . $section_id . "' );",
428 + 'default' => false,
429 + )
430 + );
431 + $tabs['advanced']['subtabs'] = array_merge( $admin_panel_subtabs, $subtabs );
432 +
433 + // FixIn: 10.12.4.7. $tabs[ 'settings' . ( ++$separator_i ) ] = array_merge( $subtab_default, array( 'type' => 'separator' ,'folder_style' => 'order:900;' ) );
434 + // $tabs[ 'settings' . ( ++$separator_i ) ] = array_merge( $subtab_default, array( 'type' => 'separator' ,'folder_style' => 'order:1000;' ) );
435 +
89 436 return $tabs;
90 437 }
91 438
92 439
@@ -103,8 +450,29 @@
103 450 if ( ! wpbc_is_mu_user_can_be_here( 'only_super_admin' ) ) {
104 451 return false;
105 452 } // User is not Super admin, so exit. Basically its was already checked at the bottom of the PHP file, just in case.
106 453
454 + // Redirect legacy Settings > Calendar links to the dedicated Calendar settings page.
455 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
456 + if ( ! empty( $_GET['scroll_to_section'] ) ) {
457 + $scroll_to_section = sanitize_text_field( wp_unslash( $_GET['scroll_to_section'] ) );
458 +
459 + if ( 'wpbc_general_settings_calendar_tab' === $scroll_to_section ) {
460 + 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' ) );
461 + return;
462 + }
463 +
464 + if ( 'wpbc_general_settings_days_tooltips_tab' === $scroll_to_section ) {
465 + 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' ) );
466 + return;
467 + }
468 +
469 + if ( 'wpbc_general_settings_availability_tab' === $scroll_to_section ) {
470 + wpbc_redirect( function_exists( 'wpbc_get_general_availability_url' ) ? wpbc_get_general_availability_url() : admin_url( 'admin.php?page=wpbc-availability&tab=general_availability' ) );
471 + return;
472 + }
473 + }
474 +
107 475 $is_can = apply_bk_filter( 'recheck_version', true );
108 476 if ( ! $is_can ) {
109 477 ?>
110 478 <script type="text/javascript"> jQuery(document).ready(function () {
@@ -142,27 +510,14 @@
142 510 </script>
143 511 <?php
144 512 }
145 513
146 - // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
147 - if ( ( isset( $_GET['wpbc_setup_wizard'] ) ) && ( 'reset' === $_GET['wpbc_setup_wizard'] ) ) {
148 -
149 - wpbc_setup_wizard_page__force_in_get();
150 -
151 - ?>
152 - <div class="wpdvlp-sub-tabs wpbc_redirection_message" style="margin: 20px 0;padding: 1em;font-size: 14px;">
153 - <a href="<?php echo esc_url( wpbc_get_setup_wizard_page_url() ); ?>">Redirect</a> after <span class="wpbc_countdown">1</span> second...</div>
154 - <?php
155 -
156 - wpbc_redirect( wpbc_get_setup_wizard_page_url() );
157 - }
158 -
159 - // JavaScript: Tooltips, Popover, Datepick (js & css) .
514 + // JavaScript: Tooltips, Popover, Datepick (js & css) .
160 515 echo '<span class="wpdevelop">';
161 516 wpbc_js_for_bookings_page();
162 517 echo '</span>';
163 518
164 - wpbc_ui_settings__top_path();
519 + // TODO: 2025-05-05 update in real top path. wpbc_ui_settings__top_path();
165 520
166 521 // Content .
167 522 ?>
168 523 <div class="clear"></div>
@@ -167,69 +522,27 @@
167 522 ?>
168 523 <div class="clear"></div>
169 524 <div class="wpbc_settings_flex_container">
170 525
171 - <div class="wpbc_settings_flex_container_left">
526 + <div class="wpbc_settings_flex_container_left" style="display:none;">
172 527
173 528 <div class="wpbc_settings_navigation_column">
174 529
175 - <div id="wpbc_general_settings_dashboard_tab" class="wpbc_settings_navigation_item wpbc_settings_navigation_item_active">
176 - <?php
177 - $title = esc_attr__( 'Dashboard', 'booking' );
178 - ?>
179 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_dashboard_tab a' ,'#wpbc_general_settings_dashboard_metabox', '<?php echo esc_js( $title ); ?>' );"
180 - href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
181 - </div>
182 - <div id="wpbc_general_settings_calendar_tab" class="wpbc_settings_navigation_item wpbc_navigation_top_border">
183 - <?php
184 - $title = esc_attr__( 'Calendar', 'booking' );
185 - ?>
186 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_calendar_tab a' ,'#wpbc_general_settings_calendar_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
187 - </div>
188 - <div id="wpbc_general_settings_days_tooltips_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
189 - <?php
190 - $title = esc_attr__( 'Tooltips in days', 'booking' );
191 - ?>
192 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_days_tooltips_tab a' ,'#wpbc_general_settings_days_tooltips_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
193 - </div>
194 - <div id="wpbc_general_settings_availability_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
195 - <?php
196 - $title = esc_attr__( 'Availability', 'booking' );
197 - ?>
198 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_availability_tab a' ,'#wpbc_general_settings_availability_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
199 - </div>
200 - <div id="wpbc_general_settings_capacity_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
201 - <?php
202 - $title = esc_attr__( 'Capacity', 'booking' );
203 - ?>
204 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_capacity_tab a' ,'#wpbc_general_settings_capacity_metabox,#wpbc_general_settings_capacity_upgrade_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
205 - </div>
206 - <div id="wpbc_general_settings_form_tab" class="wpbc_settings_navigation_item">
207 - <?php
208 - $title = esc_attr__( 'Form Options', 'booking' );
209 - ?>
210 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_form_tab a' ,'#wpbc_general_settings_form_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
211 - </div>
212 - <div id="wpbc_general_settings_time_slots_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
213 - <?php
214 - $title = esc_attr__( 'Time Slots', 'booking' );
215 - ?>
216 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_time_slots_tab a' ,'#wpbc_general_settings_time_slots_metabox', '<?php echo esc_js( $title ); ?>' );" href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
217 - </div>
218 - <div id="wpbc_general_settings_booking_confirmation_tab" class="wpbc_settings_navigation_item">
219 - <?php
220 - $title = esc_attr__( 'Booking Confirmation', 'booking' );
221 - ?>
530 + <div id="wpbc_general_settings_dashboard_tab" class="wpbc_settings_navigation_item wpbc_settings_navigation_item_active">
531 + <?php
532 + $title = esc_attr__( 'Dashboard', 'booking' );
533 + ?>
534 + <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_dashboard_tab a' ,'#wpbc_general_settings_dashboard_metabox', '<?php echo esc_js( $title ); ?>' );"
535 + href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
536 + </div>
537 + <div id="wpbc_general_settings_booking_confirmation_tab" class="wpbc_settings_navigation_item">
538 + <?php
539 + $title = esc_attr__( 'Booking Confirmation', 'booking' );
540 + ?>
222 541 <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>
223 542 </div>
224 543
225 - <div id="wpbc_general_settings_booking_timeline_tab" class="wpbc_settings_navigation_item wpbc_navigation_top_border">
226 - <?php
227 - $title = esc_attr__( 'Timeline (front-end)', 'booking' );
228 - ?>
229 - <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>
230 - </div>
231 - <?php if ( class_exists('wpdev_bk_personal') ) { ?>
544 + <?php if ( class_exists('wpdev_bk_personal') ) { ?>
232 545 <div id="wpbc_general_settings_bookings_options_tab" class="wpbc_settings_navigation_item wpbc_navigation_top_border">
233 546 <?php
234 547 $title = esc_attr__( 'Manage Bookings', 'booking' );
235 548 ?>
@@ -246,17 +559,8 @@
246 559 </div>
247 560 <?php } ?>
248 561
249 562
250 - <?php if ( class_exists('wpdev_bk_multiuser') ) { ?>
251 - <div id="wpbc_general_settings_multiuser_tab" class="wpbc_settings_navigation_item">
252 - <?php
253 - $title = esc_attr__( 'Multiuser options', 'booking' );
254 - ?>
255 - <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>
256 - </div>
257 - <?php } ?>
258 -
259 563 <div id="wpbc_general_settings_booking_listing_tab" class="wpbc_settings_navigation_item wpbc_navigation_top_border">
260 564 <?php
261 565 $title = esc_attr__( 'Admin Panel', 'booking' );
262 566 ?>
@@ -265,11 +569,17 @@
265 569 <div id="wpbc_general_settings_booking_calendar_overview_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
266 570 <?php
267 571 $title = esc_attr__( 'Timeline View', 'booking' );
268 572 ?>
269 - <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>
270 - </div>
271 - <div id="wpbc_general_settings_datestimes_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
573 + <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>
574 + </div>
575 + <div id="wpbc_general_settings_booking_timeline_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
576 + <?php
577 + $title = esc_attr__( 'Timeline (front-end)', 'booking' );
578 + ?>
579 + <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>
580 + </div>
581 + <div id="wpbc_general_settings_datestimes_tab" class="wpbc_settings_navigation_item wpbc_navigation_sub_item">
272 582 <?php
273 583 $title = esc_attr__( 'Date / Time Formats', 'booking' );
274 584 ?>
275 585 <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>
@@ -316,9 +626,9 @@
316 626 <div id="wpbc_general_settings_all_tab" class="wpbc_settings_navigation_item wpbc_navigation_top_border">
317 627 <?php
318 628 $title = esc_attr__( 'Show All Settings', 'booking' );
319 629 ?>
320 - <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_all_tab a' ,'.postbox', '<?php echo esc_js( $title ); ?>' );"
630 + <a onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_all_tab a' ,'.postbox', '<?php echo esc_js( $title ); ?>' );"
321 631 href="javascript:void(0);"><span><?php echo esc_html( $title ); ?></span></a>
322 632 </div>
323 633
324 634 </div>
@@ -353,45 +663,8 @@
353 663 wpbc_ui_settings__panel__plugin_version();
354 664
355 665 ?></div><?php //wpbc_close_meta_box_section(); ?>
356 666
357 -
358 - <?php wpbc_open_meta_box_section( 'wpbc_general_settings_calendar', __('Calendar', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
359 -
360 - <?php $this->settings_api()->show( 'calendar' ); ?>
361 -
362 - <?php wpbc_close_meta_box_section(); ?>
363 -
364 -
365 - <?php wpbc_open_meta_box_section( 'wpbc_general_settings_days_tooltips', __('Calendar Dates Tooltips', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
366 -
367 - <?php $this->settings_api()->show( 'days_tooltips' ); ?>
368 -
369 - <?php wpbc_close_meta_box_section(); ?>
370 -
371 -
372 -
373 - <?php wpbc_open_meta_box_section( 'wpbc_general_settings_time_slots', __('Time Slots', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
374 -
375 - <?php $this->settings_api()->show( 'time_slots' ); ?>
376 -
377 - <?php wpbc_close_meta_box_section(); ?>
378 -
379 -
380 - <?php wpbc_open_meta_box_section( 'wpbc_general_settings_availability', __('Availability', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
381 -
382 - <?php $this->settings_api()->show( 'availability' ); ?>
383 -
384 - <?php wpbc_close_meta_box_section(); ?>
385 -
386 -
387 - <?php wpbc_open_meta_box_section( 'wpbc_general_settings_form', __('Form Options', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
388 -
389 - <?php $this->settings_api()->show( 'form' ); ?>
390 -
391 - <?php wpbc_close_meta_box_section(); ?>
392 -
393 -
394 667 <?php
395 668 wpbc_open_meta_box_section( 'wpbc_general_settings_booking_confirmation',
396 669 __( 'Booking Confirmation', 'booking' ),
397 670 array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) );
@@ -468,51 +741,8 @@
468 741 <?php wpbc_close_meta_box_section(); ?>
469 742
470 743 <?php } ?>
471 744
472 -
473 -
474 - <?php wpbc_open_meta_box_section( 'wpbc_general_settings_capacity', __('Capacity', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
475 -
476 - <?php $this->settings_api()->show( 'capacity' ); ?>
477 -
478 - <?php wpbc_close_meta_box_section(); ?>
479 -
480 -
481 - <?php
482 - if ( ! class_exists( 'wpdev_bk_personal' ) ) {
483 -
484 - $wpbc_metabox_id = 'wpbc_general_settings_capacity_upgrade';
485 -
486 - ob_start();
487 - $is_panel_visible = wpbc_is_dismissed( $wpbc_metabox_id . '_metabox', array(
488 - 'title' => '<i class="menu_icon icon-1x wpbc_icn_close"></i> ',
489 - 'hint' => __( 'Dismiss', 'booking' ),
490 - 'class' => 'wpbc_panel_get_started_dismiss',
491 - 'css' => 'background: #fff;border-radius: 7px;'
492 - ));
493 - ?>
494 - <script type="text/javascript"> jQuery('#<?php echo esc_js( $wpbc_metabox_id ); ?>_metabox').hide(); </script>
495 - <?php
496 - $dismiss_button_content = ob_get_clean();
497 -
498 - if ( $is_panel_visible ) {
499 -
500 - wpbc_open_meta_box_section( $wpbc_metabox_id,
501 - __('Booking Quantity Control - Set limits for the number of bookings per day or time slot.', 'booking'),
502 - array( 'is_section_visible_after_load' => false,
503 - 'is_show_minimize' => false,
504 - 'dismiss_button' => $dismiss_button_content
505 - ) );
506 -
507 - $this->settings_api()->show( 'capacity_upgrade' );
508 -
509 - wpbc_close_meta_box_section();
510 - }
511 - }
512 - ?>
513 -
514 -
515 745 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_advanced', __('Advanced', 'booking'), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
516 746
517 747 <?php $this->settings_api()->show( 'advanced' ); ?>
518 748
@@ -550,11 +780,15 @@
550 780
551 781 <?php if ( ( class_exists( 'wpdev_bk_personal' ) ) && ( ! wpbc_is_this_demo() ) ) { ?>
552 782 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_help', __( 'Tools', 'booking' ), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
553 783
554 - <?php $this->settings_api()->show( 'help' ); ?>
555 -
556 - <?php wpbc_close_meta_box_section(); ?>
784 + <?php $this->settings_api()->show( 'help' ); ?>
785 +
786 + <?php if ( function_exists( 'wpbc_customer_access_render_rate_limit_reset_tool' ) ) { ?>
787 + <?php wpbc_customer_access_render_rate_limit_reset_tool(); ?>
788 + <?php } ?>
789 +
790 + <?php wpbc_close_meta_box_section(); ?>
557 791 <?php } ?>
558 792
559 793 <?php wpbc_open_meta_box_section( 'wpbc_general_settings_translations', __( 'Translations', 'booking' ), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
560 794
@@ -563,45 +797,46 @@
563 797 <?php wpbc_translation_buttons_settings_section(); ?>
564 798
565 799 <?php wpbc_close_meta_box_section(); ?>
566 800
567 - <?php if ( class_exists( 'wpdev_bk_multiuser' ) ) { // FixIn: 9.2.3.8. ?>
568 -
569 - <?php wpbc_open_meta_box_section( 'wpbc_general_settings_multiuser', __( 'Multiuser options', 'booking' ), array( 'is_section_visible_after_load' => false, 'is_show_minimize' => false ) ); ?>
570 -
571 - <?php $this->settings_api()->show( 'multiuser' ); ?>
572 -
573 - <?php wpbc_close_meta_box_section(); ?>
574 -
575 - <?php } ?>
576 -
577 801 </div>
578 802 <div class="clear"></div>
579 - <input type="submit" value="<?php esc_attr_e( 'Save Changes', 'booking' ); ?>" class="button button-primary wpbc_submit_button"/>
580 - <?php
581 - if ( 'translations_updated_from_wpbc_and_wp' !== get_bk_option( 'booking_translation_update_status' ) ) {
803 + <div class="container_for_save_buttons">
804 + <input type="submit" value="<?php esc_attr_e( 'Save Changes', 'booking' ); ?>" class="button button-primary wpbc_submit_button"/>
805 + <span class="sub_right">
806 + <a style="margin:0;" class="button button"
807 + onclick="javascript:wpbc_ui_settings__panel__click( '#wpbc_general_settings_all_tab a' ,'.postbox', 'Show All Settings' );"
808 + href="javascript:void(0);">
809 + <?php
810 + esc_html_e( 'Show All Settings', 'booking' )
811 + ?>
812 + </a>
813 + <?php
814 + if ( 'translations_updated_from_wpbc_and_wp' !== get_bk_option( 'booking_translation_update_status' ) ) {
582 815
583 - $current_locale = wpbc_get_maybe_reloaded_booking_locale();
816 + $current_locale = wpbc_get_maybe_reloaded_booking_locale();
584 817
585 - if ( ! in_array( $current_locale, array( 'en_US', 'en_CA', 'en_GB', 'en_AU' ) ) ) {
818 + if ( ! in_array( $current_locale, array( 'en_US', 'en_CA', 'en_GB', 'en_AU' ), true ) ) {
586 819
587 - echo '<a class="button button" href="'
588 - . 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' )
589 - . '">'
590 - . esc_html__( 'Update Translations', 'booking' )
591 - . '</a>';
592 - }
593 - }
820 + echo '<a class="button button" href="'
821 + . 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' )
822 + . '">'
823 + . esc_html__( 'Update Translations', 'booking' )
824 + . '</a>';
825 + }
826 + }
594 827
595 - if ( ! wpbc_is_this_demo() ) {
828 + if ( ! wpbc_is_this_demo() ) {
596 829
597 - echo '<a style="margin:0 2em;" class="button button" href="'
598 - . 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' )
599 - . '">'
600 - . esc_html__( 'Restore all dismissed windows', 'booking' )
601 - . '</a>';
602 - }
603 - ?>
830 + echo '<a style="margin:0 2em;" class="button button" href="'
831 + . 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' )
832 + . '">'
833 + . esc_html__( 'Restore all dismissed windows', 'booking' )
834 + . '</a>';
835 + }
836 + ?>
837 + </span>
838 + </div>
604 839
605 840 <?php } ?>
606 841 </form>
607 842 </span>
@@ -621,8 +856,14 @@
621 856 $validated_fields = $this->settings_api()->validate_post(); // Get Validated Settings fields in $_POST request.
622 857
623 858 $validated_fields = apply_filters( 'wpbc_settings_validate_fields_before_saving', $validated_fields ); // Hook for validated fields.
624 859
860 + foreach ( $this->settings_api()->get_form_fields() as $field_name => $field ) {
861 + if ( ! empty( $field['group'] ) && in_array( $field['group'], array( 'calendar', 'days_tooltips', 'availability' ), true ) ) {
862 + unset( $validated_fields[ $field_name ] );
863 + }
864 + }
865 +
625 866 /**
626 867 * Skip saving specific option, for example in Demo mode.
627 868 * // unset( $validated_fields['booking_start_day_weeek'] );
628 869 */
@@ -669,5 +910,5 @@
669 910 }
670 911 */
671 912
672 913 add_action('wpbc_menu_created', array( new WPBC_Page_SettingsGeneral() , '__construct') ); // Executed after creation of Menu
673 -
914 +