| @@ -23,9 +23,129 @@ | ||
| 23 | 23 | // ===================================================================================================================== |
| 24 | 24 | |
| 25 | 25 | require_once WPBC_PLUGIN_DIR . '/core/wpbc-debug.php'; // Debug = Package: WPBC =. |
| 26 | 26 | require_once WPBC_PLUGIN_DIR . '/core/wpbc-core.php'; // Core. |
| 27 | +require_once WPBC_PLUGIN_DIR . '/includes/_functions/feature-flags.php'; // Release gates for functionality under development. | |
| 28 | +require_once WPBC_PLUGIN_DIR . '/includes/_functions/starter-assets.php'; // Local or remote starter-image URLs. | |
| 27 | 29 | |
| 30 | +/** | |
| 31 | + * Register a fail-closed diagnostic when no complete booking-mode engine exists. | |
| 32 | + * | |
| 33 | + * The production package contains one booking-mode engine. An incomplete V3 | |
| 34 | + * package must stop before registering partial navigation, services, or assets. | |
| 35 | + * Translation remains inside the later notice callback so this early bootstrap | |
| 36 | + * does not load the text domain prematurely. | |
| 37 | + * | |
| 38 | + * @param array<int,string> $errors Preflight or package-integrity errors. | |
| 39 | + * | |
| 40 | + * @return void | |
| 41 | + */ | |
| 42 | +function wpbc_booking_modes_register_missing_engine_diagnostic( $errors ) { | |
| 43 | + $GLOBALS['wpbc_booking_modes_missing_engine_errors'] = is_array( $errors ) ? $errors : array(); | |
| 44 | + add_action( 'admin_notices', 'wpbc_booking_modes_render_missing_engine_diagnostic' ); | |
| 45 | +} | |
| 46 | + | |
| 47 | +/** | |
| 48 | + * Render the administrator-only missing-engine package diagnostic. | |
| 49 | + * | |
| 50 | + * @return void | |
| 51 | + */ | |
| 52 | +function wpbc_booking_modes_render_missing_engine_diagnostic() { | |
| 53 | + if ( ! current_user_can( 'activate_plugins' ) ) { | |
| 54 | + return; | |
| 55 | + } | |
| 56 | + | |
| 57 | + $errors = isset( $GLOBALS['wpbc_booking_modes_missing_engine_errors'] ) && is_array( $GLOBALS['wpbc_booking_modes_missing_engine_errors'] ) | |
| 58 | + ? $GLOBALS['wpbc_booking_modes_missing_engine_errors'] | |
| 59 | + : array(); | |
| 60 | + ?> | |
| 61 | + <div class="notice notice-error"> | |
| 62 | + <p><strong><?php esc_html_e( 'Booking Calendar could not start a complete booking-mode engine. Restore a complete plugin package before using Booking Calendar administration pages.', 'booking' ); ?></strong></p> | |
| 63 | + <?php if ( ! empty( $errors ) ) : ?> | |
| 64 | + <ul> | |
| 65 | + <?php foreach ( array_slice( $errors, 0, 10 ) as $error_message ) : ?> | |
| 66 | + <li><?php echo esc_html( $error_message ); ?></li> | |
| 67 | + <?php endforeach; ?> | |
| 68 | + </ul> | |
| 69 | + <?php endif; ?> | |
| 70 | + </div> | |
| 71 | + <?php | |
| 72 | +} | |
| 73 | + | |
| 74 | +/** | |
| 75 | + * Register a migration notice for the removed development engine selector. | |
| 76 | + * | |
| 77 | + * The constant is intentionally ignored after cutover. Keeping a late notice | |
| 78 | + * gives administrators an actionable upgrade path without loading translations | |
| 79 | + * during the early plugin bootstrap. | |
| 80 | + * | |
| 81 | + * @return void | |
| 82 | + */ | |
| 83 | +function wpbc_booking_modes_register_obsolete_selector_diagnostic() { | |
| 84 | + add_action( 'admin_notices', 'wpbc_booking_modes_render_obsolete_selector_diagnostic' ); | |
| 85 | +} | |
| 86 | + | |
| 87 | +/** | |
| 88 | + * Render the administrator-only obsolete-selector migration notice. | |
| 89 | + * | |
| 90 | + * @return void | |
| 91 | + */ | |
| 92 | +function wpbc_booking_modes_render_obsolete_selector_diagnostic() { | |
| 93 | + if ( ! current_user_can( 'activate_plugins' ) ) { | |
| 94 | + return; | |
| 95 | + } | |
| 96 | + ?> | |
| 97 | + <div class="notice notice-warning is-dismissible"> | |
| 98 | + <p><?php esc_html_e( 'Booking Calendar V3 is now the production booking-mode engine. Remove the obsolete WPBC_BOOKING_MODE constant from your configuration.', 'booking' ); ?></p> | |
| 99 | + </div> | |
| 100 | + <?php | |
| 101 | +} | |
| 102 | + | |
| 103 | +if ( defined( 'WPBC_BOOKING_MODE' ) ) { | |
| 104 | + wpbc_booking_modes_register_obsolete_selector_diagnostic(); | |
| 105 | +} | |
| 106 | + | |
| 107 | +$wpbc_booking_modes_v3_preflight_file = WPBC_PLUGIN_DIR . '/includes/booking_modes_v3/preflight.php'; | |
| 108 | +$wpbc_booking_modes_v3_result = array( | |
| 109 | + 'ready' => false, | |
| 110 | + 'errors' => array(), | |
| 111 | +); | |
| 112 | + | |
| 113 | +if ( is_readable( $wpbc_booking_modes_v3_preflight_file ) ) { | |
| 114 | + require_once $wpbc_booking_modes_v3_preflight_file; | |
| 115 | + $wpbc_booking_modes_v3_result = wpbc_booking_modes_v3_preflight(); | |
| 116 | +} else { | |
| 117 | + $wpbc_booking_modes_v3_result['errors'][] = 'Missing or unreadable V3 component: preflight.php'; | |
| 118 | +} | |
| 119 | + | |
| 120 | +if ( ! empty( $wpbc_booking_modes_v3_result['ready'] ) ) { | |
| 121 | + if ( ! defined( 'WPBC_BOOKING_MODES_ACTIVE_ENGINE' ) ) { | |
| 122 | + define( 'WPBC_BOOKING_MODES_ACTIVE_ENGINE', 'v3' ); | |
| 123 | + } | |
| 124 | + require_once WPBC_PLUGIN_DIR . '/includes/booking_modes_v3/booking_modes.php'; | |
| 125 | +} else { | |
| 126 | + if ( ! defined( 'WPBC_BOOKING_MODES_ACTIVE_ENGINE' ) ) { | |
| 127 | + define( 'WPBC_BOOKING_MODES_ACTIVE_ENGINE', 'none' ); | |
| 128 | + } | |
| 129 | + | |
| 130 | + $wpbc_booking_modes_missing_engine_errors = isset( $wpbc_booking_modes_v3_result['errors'] ) && is_array( $wpbc_booking_modes_v3_result['errors'] ) | |
| 131 | + ? $wpbc_booking_modes_v3_result['errors'] | |
| 132 | + : array(); | |
| 133 | + wpbc_booking_modes_register_missing_engine_diagnostic( $wpbc_booking_modes_missing_engine_errors ); | |
| 134 | + | |
| 135 | + unset( | |
| 136 | + $wpbc_booking_modes_v3_preflight_file, | |
| 137 | + $wpbc_booking_modes_v3_result, | |
| 138 | + $wpbc_booking_modes_missing_engine_errors | |
| 139 | + ); | |
| 140 | + return; | |
| 141 | +} | |
| 142 | + | |
| 143 | +unset( | |
| 144 | + $wpbc_booking_modes_v3_preflight_file, | |
| 145 | + $wpbc_booking_modes_v3_result | |
| 146 | +); | |
| 147 | + | |
| 28 | 148 | require_once WPBC_PLUGIN_DIR . '/core/any/class-css-js.php'; // Abstract. Loading CSS & JS files = Package: Any =. |
| 29 | 149 | require_once WPBC_PLUGIN_DIR . '/core/any/class-admin-settings-api.php'; // Abstract. Settings API. |
| 30 | 150 | |
| 31 | 151 | require_once WPBC_PLUGIN_DIR . '/includes/ui_settings/class-settings-page-parts.php'; // Settings Template - "Settins Parts", which used in the class-page-structure.php . |
| @@ -77,8 +197,9 @@ | ||
| 77 | 197 | // ===================================================================================================================== |
| 78 | 198 | // Functions |
| 79 | 199 | // ===================================================================================================================== |
| 80 | 200 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/class-wpbc-action-scheduler-compatibility.php'; // Class to Increase Memory and Time. |
| 201 | +require_once WPBC_PLUGIN_DIR . '/includes/_functions/woocommerce-compatibility.php'; // Allow public Booking Calendar AJAX requests through WooCommerce admin-access protection. | |
| 81 | 202 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/nonce_func.php'; // Nonce functions - front-end excluding. |
| 82 | 203 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/str_regex.php'; // String and Regex functions for shortcodes. |
| 83 | 204 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/is_table_exist.php'; // Is DB Tables Exists. |
| 84 | 205 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/is_dismissed.php'; // Is Dismissed. |
| @@ -86,10 +207,12 @@ | ||
| 86 | 207 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/booking_data__get.php'; // Booking details | replace / fields functions. |
| 87 | 208 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/simple_html_tags.php'; // Simple HTML Tags - Custom Shortcodes. |
| 88 | 209 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/admin_menu_url.php'; // Admin Menu Pages & URLs. |
| 89 | 210 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/admin_top_bar.php'; // Admin Top Bar. |
| 211 | +require_once WPBC_PLUGIN_DIR . '/includes/_functions/admin-cost-correction.php'; // Shared Add Booking and Add Appointment exact-total control. | |
| 90 | 212 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/news_version.php'; // News, Version. |
| 91 | 213 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/versions.php'; // Versions. |
| 214 | +require_once WPBC_PLUGIN_DIR . '/includes/_functions/booking-resources-catalog-compatibility.php'; // Temporary 11.6 Resources catalog compatibility. | |
| 92 | 215 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/sanitizing.php'; // Sanitizing. |
| 93 | 216 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/request.php'; // Class for sanitizing $_REQUEST parameters and saving or getting it from DB // FixIn: 9.3.1.2. |
| 94 | 217 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/city_list.php'; // City list. |
| 95 | 218 | require_once WPBC_PLUGIN_DIR . '/includes/save-user-meta/save-user-meta.php'; // Saving custom user data. |
| @@ -97,12 +220,12 @@ | ||
| 97 | 220 | require_once WPBC_PLUGIN_DIR . '/includes/_functions/calendar_scripts.php'; // Calendar Scripts. |
| 98 | 221 | |
| 99 | 222 | require_once WPBC_PLUGIN_DIR . '/core/wpbc_functions.php'; // Functions. |
| 100 | 223 | require_once WPBC_PLUGIN_DIR . '/core/wpbc_functions_dates.php'; // Function Dates New in 9.8. |
| 224 | +require_once WPBC_PLUGIN_DIR . '/includes/_front_end/class-fe-booking-context.php'; // Signed native Booking Form context for AJAX availability and booking requests. | |
| 101 | 225 | require_once WPBC_PLUGIN_DIR . '/core/form_parser.php'; // Parser for booking form New in 9.8. |
| 102 | 226 | require_once WPBC_PLUGIN_DIR . '/core/wpbc-dates.php'; // Dates. |
| 103 | 227 | require_once WPBC_PLUGIN_DIR . '/includes/_front_end/date-hints.php'; // Front-end date hints for Free. // FixIn: 10.15.6.2. |
| 104 | -require_once WPBC_PLUGIN_DIR . '/includes/_front_end/class-fe-settings.php'; // Front-end/BFB settings helper. | |
| 105 | 228 | require_once WPBC_PLUGIN_DIR . '/core/wpbc_welcome.php'; // Welcome Panel Functions. |
| 106 | 229 | require_once WPBC_PLUGIN_DIR . '/includes/_working_time/working_time.php'; // Working Time settings and availability helpers. |
| 107 | 230 | |
| 108 | 231 | // New Engine // FixIn: 9.8.0.4. |
| @@ -143,9 +266,14 @@ | ||
| 143 | 266 | require_once WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations5.php'; |
| 144 | 267 | } |
| 145 | 268 | } |
| 146 | 269 | |
| 270 | +require_once WPBC_PLUGIN_DIR . '/core/wpbc-frontend-messages.php'; // Visitor-facing form messages and multilingual overrides. | |
| 271 | + | |
| 272 | +require_once WPBC_PLUGIN_DIR . '/includes/publish/class-wpbc-booking-form-publisher.php'; // Neutral Booking Form page publishing service. | |
| 147 | 273 | require_once WPBC_PLUGIN_DIR . '/includes/publish/wpbc-create-pages.php'; // Create pages for different purposes // FixIn: 9.6.2.10. |
| 274 | +require_once WPBC_PLUGIN_DIR . '/includes/publish/class-wpbc-booking-form-publish-ajax.php'; // Authorized AJAX publishing endpoint. | |
| 275 | +require_once WPBC_PLUGIN_DIR . '/includes/publish/class-wpbc-booking-form-publish-modal.php'; // Shared native publishing modal. | |
| 148 | 276 | require_once WPBC_PLUGIN_DIR . '/includes/publish/wpbc-publish-shortcode.php'; // Publish Booking Calendar shortcodes into the Pages // FixIn: 9.8.15.5. |
| 149 | 277 | require_once WPBC_PLUGIN_DIR . '/core/wpbc-emails.php'; // Emails. |
| 150 | 278 | // JS & CSS. |
| 151 | 279 | require_once WPBC_PLUGIN_DIR . '/core/wpbc-css.php'; // Load CSS. |
| @@ -171,8 +299,9 @@ | ||
| 171 | 299 | require_once WPBC_PLUGIN_DIR . '/includes/_news/wpbc_news.php'; |
| 172 | 300 | |
| 173 | 301 | // UI Elements. |
| 174 | 302 | require_once WPBC_PLUGIN_DIR . '/includes/_toolbar_ui/flex_ui_elements.php'; |
| 303 | +require_once WPBC_PLUGIN_DIR . '/includes/_toolbar_ui/chosen_filter/chosen_filter.php'; | |
| 175 | 304 | require_once WPBC_PLUGIN_DIR . '/includes/_toolbar_ui/ui__settings_panel.php'; |
| 176 | 305 | require_once WPBC_PLUGIN_DIR . '/includes/_toolbar_ui/toolbar_ui.php'; |
| 177 | 306 | require_once WPBC_PLUGIN_DIR . '/includes/_toolbar_ui/ui__form_steps_timeline.php'; // FixIn: 10.9.6.6. |
| 178 | 307 | |
| @@ -200,15 +329,49 @@ | ||
| 200 | 329 | require_once WPBC_PLUGIN_DIR . '/includes/page-availability-timeslots/availability_timeslots__activate.php'; |
| 201 | 330 | require_once WPBC_PLUGIN_DIR . '/includes/page-availability-timeslots/ajax/availability_timeslots__save.php'; |
| 202 | 331 | require_once WPBC_PLUGIN_DIR . '/includes/page-availability-timeslots/availability_timeslots__page.php'; |
| 203 | 332 | |
| 333 | +if ( wpbc_is_11_6_features_enabled() ) { | |
| 334 | + // Edition-neutral Booking Resource identity and presentation storage. | |
| 335 | + require_once WPBC_PLUGIN_DIR . '/includes/booking-resources/class-wpbc-booking-resource-content-repository.php'; | |
| 336 | +} | |
| 204 | 337 | |
| 205 | -if ( WPBC_NEW_FORM_BUILDER ) { | |
| 206 | - require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/bfb-include.php'; // Booking Form Builder - @since: 11.0.0. | |
| 207 | - require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/form-render/class-wpbc-bfb-form-shortcode-engine.php'; // New Shortcode Parsers and Form Render. 11.0.1. | |
| 208 | - require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/form-render/bfb-form-render.php'; | |
| 338 | +// Domain-neutral template-driven catalog mechanics shared by all registered catalogs. | |
| 339 | +require_once WPBC_PLUGIN_DIR . '/includes/_shared-ui-catalog/wpbc-ui-catalog.php'; | |
| 340 | + | |
| 341 | +if ( wpbc_is_11_6_features_enabled() ) { | |
| 342 | + // Independent template-driven Booking Resources catalog. | |
| 343 | + require_once WPBC_PLUGIN_DIR . '/includes/page-catalog-booking-resources/booking-resources-catalog.php'; | |
| 209 | 344 | } |
| 210 | 345 | |
| 346 | +// WP Booking Calendar > Services and Appointment details. | |
| 347 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/appointment_services__activate.php'; | |
| 348 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/appointment_services__functions.php'; | |
| 349 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/repository/appointment_services__repository.php'; | |
| 350 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/catalog/class-wpbc-appointment-services-catalog-request.php'; | |
| 351 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/catalog/class-wpbc-appointment-service-catalog-dto.php'; | |
| 352 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/catalog/class-wpbc-appointment-services-catalog-provider.php'; | |
| 353 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/catalog/appointment-services-catalog-config.php'; | |
| 354 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/catalog/appointment-services-catalog.php'; | |
| 355 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/class-wpbc-catalog-inline-fields.php'; | |
| 356 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/mutations/class-wpbc-appointment-services-catalog-editor.php'; | |
| 357 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/mutations/class-wpbc-appointment-services-catalog-deleter.php'; | |
| 358 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/appointment_services__booking.php'; | |
| 359 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/appointment_services__ui.php'; | |
| 360 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/ajax/appointment_services__list.php'; | |
| 361 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/ajax/appointment_services__load.php'; | |
| 362 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/ajax/appointment_services__save.php'; | |
| 363 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/ajax/appointment_services__duplicate.php'; | |
| 364 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/ajax/appointment_services__archive.php'; | |
| 365 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/ajax/appointment_services__catalog_edit.php'; | |
| 366 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/ajax/appointment_services__delete.php'; | |
| 367 | +require_once WPBC_PLUGIN_DIR . '/includes/page-appointment-services/appointment_services__page.php'; | |
| 368 | + | |
| 369 | +require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/bfb-include.php'; // Booking Form Builder - @since: 11.0.0. | |
| 370 | +require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/form-render/class-wpbc-bfb-form-shortcode-engine.php'; // New Shortcode Parsers and Form Render. 11.0.1. | |
| 371 | +require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/form-render/bfb-form-render.php'; | |
| 372 | + | |
| 373 | + | |
| 211 | 374 | // Elementor Addons: https://developers.elementor.com/docs/getting-started/first-addon/. |
| 212 | 375 | require_once WPBC_PLUGIN_DIR . '/includes/elementor-booking-form/wpbc-elementor.php'; |
| 213 | 376 | |
| 214 | 377 | // --------------------------------------------------------------------------------------------------------------------- |
| @@ -219,8 +382,9 @@ | ||
| 219 | 382 | |
| 220 | 383 | require_once WPBC_PLUGIN_DIR . '/core/admin/wpbc-settings-functions.php'; // Support functions for Booking > Settings General page. |
| 221 | 384 | require_once WPBC_PLUGIN_DIR . '/core/admin/page-settings.php'; // Settings page. |
| 222 | 385 | require_once WPBC_PLUGIN_DIR . '/core/admin/api-settings.php'; // Settings API. |
| 386 | +require_once WPBC_PLUGIN_DIR . '/includes/page-resource-capacity/page-resource-capacity.php'; // Resource Capacity Settings. | |
| 223 | 387 | |
| 224 | 388 | |
| 225 | 389 | require_once WPBC_PLUGIN_DIR . '/core/admin/wpbc-gutenberg.php'; // Settings page. |
| 226 | 390 | |
| @@ -225,20 +389,12 @@ | ||
| 225 | 389 | require_once WPBC_PLUGIN_DIR . '/core/admin/wpbc-gutenberg.php'; // Settings page. |
| 226 | 390 | |
| 227 | 391 | // --------------------------------------------------------------------------------------------------------------------- |
| 228 | 392 | |
| 229 | -// Functions from Free form that can be use in paid versions in Wizard Setup. | |
| 230 | - | |
| 231 | -require_once WPBC_PLUGIN_DIR . '/includes/page-form-simple/form_templates.php'; // Booking Form Templates // FixIn: 10.6.2.1. | |
| 232 | - | |
| 233 | -require_once WPBC_PLUGIN_DIR . '/includes/page-form-simple/form_simple__default.php'; | |
| 234 | -require_once WPBC_PLUGIN_DIR . '/includes/page-form-simple/form_simple__get_data.php'; | |
| 235 | - | |
| 236 | 393 | if ( file_exists( WPBC_PLUGIN_DIR . '/inc/_ps/personal.php' ) ) { |
| 237 | 394 | require_once WPBC_PLUGIN_DIR . '/inc/_ps/personal.php'; |
| 238 | 395 | } else { |
| 239 | 396 | require_once WPBC_PLUGIN_DIR . '/includes/page-resource-free/page-resource-free.php'; // Resource page for Free version. |
| 240 | - require_once WPBC_PLUGIN_DIR . '/includes/page-form-simple/page-form-simple.php'; // Booking Form Simple. | |
| 241 | 397 | |
| 242 | 398 | require_once WPBC_PLUGIN_DIR . '/core/admin/page-email-new-admin.php'; // Email - New admin. |
| 243 | 399 | require_once WPBC_PLUGIN_DIR . '/core/admin/page-email-new-visitor.php'; // Email - New visitor. |
| 244 | 400 | require_once WPBC_PLUGIN_DIR . '/core/admin/page-email-deny.php'; // Email - Deny - set pending. |
| @@ -251,10 +407,16 @@ | ||
| 251 | 407 | require_once WPBC_PLUGIN_DIR . '/core/admin/page-ics-export.php'; // Export ICS Feeds Settings page. |
| 252 | 408 | require_once WPBC_PLUGIN_DIR . '/core/admin/page-import-gcal.php'; // Import from Google Calendar Settings page . |
| 253 | 409 | } |
| 254 | 410 | |
| 255 | -require_once WPBC_PLUGIN_DIR . '/includes/page-settings-form-options/page-settings-form-options.php'; // Booking Form Opyions Settings. | |
| 256 | -require_once WPBC_PLUGIN_DIR . '/includes/page-settings-color-themes/page-settings-color-themes.php'; // Appearance / Color Themes / Skins Settings. | |
| 411 | +require_once WPBC_PLUGIN_DIR . '/includes/page-settings-themes/settings_themes__page.php'; // Appearance / Theme Settings. | |
| 412 | +require_once WPBC_PLUGIN_DIR . '/includes/page-settings-themes/ajax/settings_themes__save.php'; | |
| 413 | +require_once WPBC_PLUGIN_DIR . '/includes/page-settings-themes/ajax/settings_themes__preview.php'; | |
| 414 | +require_once WPBC_PLUGIN_DIR . '/includes/page-settings-calendar/settings_calendar__page.php'; // Calendar Settings. | |
| 415 | +require_once WPBC_PLUGIN_DIR . '/includes/page-settings-calendar/ajax/settings_calendar__save.php'; | |
| 416 | +require_once WPBC_PLUGIN_DIR . '/includes/page-settings-calendar/ajax/settings_calendar__preview.php'; | |
| 417 | +require_once WPBC_PLUGIN_DIR . '/includes/page-settings-messages/settings_messages__page.php'; // Visitor-facing Form Messages settings. | |
| 418 | +require_once WPBC_PLUGIN_DIR . '/includes/page-settings-messages/ajax/settings_messages__save.php'; | |
| 257 | 419 | |
| 258 | 420 | // Booking > Setup page // FixIn: 10.2.0.1. |
| 259 | 421 | // FixIn: 9.8.0.2. |
| 260 | 422 | require_once WPBC_PLUGIN_DIR . '/includes/page-setup/setup__page.php'; |
| @@ -274,12 +436,21 @@ | ||
| 274 | 436 | require_once WPBC_PLUGIN_DIR . '/includes/_front_end/class-fe-inline-css-js.php'; |
| 275 | 437 | require_once WPBC_PLUGIN_DIR . '/includes/_front_end/class-fe-render.php'; |
| 276 | 438 | require_once WPBC_PLUGIN_DIR . '/includes/_front_end/class-fe-shortcodes.php'; |
| 277 | 439 | require_once WPBC_PLUGIN_DIR . '/includes/_front_end/class-fe-form-source-resolver.php'; |
| 440 | +require_once WPBC_PLUGIN_DIR . '/includes/_front_end/form-style-presets.php'; | |
| 278 | 441 | require_once WPBC_PLUGIN_DIR . '/includes/_front_end/hooks/class-fe-bfb-settings-hooks.php'; // Apply BFB settings to rendered booking form HTML. |
| 279 | 442 | require_once WPBC_PLUGIN_DIR . '/includes/_front_end/class-fe-render-form-body.php'; |
| 280 | 443 | require_once WPBC_PLUGIN_DIR . '/includes/_custom_forms/class-custom-forms-helper.php'; // Custom forms Helpers. |
| 281 | 444 | |
| 445 | +// Service-first, AJAX Appointment booking shortcode built on the existing resource-bound renderer. | |
| 446 | +require_once WPBC_PLUGIN_DIR . '/includes/booking-appointment/booking-appointment.php'; | |
| 447 | +// Dedicated administrator workflow built on the same Appointment controller. | |
| 448 | +require_once WPBC_PLUGIN_DIR . '/includes/page-add-appointment/add_appointment__page.php'; | |
| 449 | + | |
| 450 | +// Resource-first public workflow with a shared frontend catalog boundary. | |
| 451 | +require_once WPBC_PLUGIN_DIR . '/includes/booking-resource-selector/booking-resource-selector.php'; | |
| 452 | + | |
| 282 | 453 | require_once WPBC_PLUGIN_DIR . '/core/lib/wpdev-booking-class.php'; // C L A S S B o o k i n g. |
| 283 | 454 | require_once WPBC_PLUGIN_DIR . '/core/lib/wpbc-booking-new.php'; // N e w. |
| 284 | 455 | require_once WPBC_PLUGIN_DIR . '/core/lib/wpbc-cron.php'; // CRON @since: 5.2.0. |
| 285 | 456 | |
| @@ -305,7 +476,16 @@ | ||
| 305 | 476 | require_once WPBC_PLUGIN_DIR . '/core/any/activation.php'; |
| 306 | 477 | require_once WPBC_PLUGIN_DIR . '/core/wpbc-activation.php'; |
| 307 | 478 | |
| 308 | 479 | require_once WPBC_PLUGIN_DIR . '/core/wpbc-dev-api.php'; // API for Booking Calendar integrations. |
| 480 | + | |
| 481 | +// Development-only tests are disabled when the removable _tests bootstrap is unavailable. | |
| 482 | +$wpbc_tests_bootstrap_file = WPBC_PLUGIN_DIR . '/_tests/wpbc-tests.php'; | |
| 483 | +if ( is_admin() && is_readable( $wpbc_tests_bootstrap_file ) ) { | |
| 484 | + require_once $wpbc_tests_bootstrap_file; | |
| 485 | +} | |
| 486 | +unset( $wpbc_tests_bootstrap_file ); | |
| 487 | + | |
| 488 | +wpbc_prevent_incompatible_pro_version_loading(); | |
| 309 | 489 | |
| 310 | 490 | make_bk_action( 'wpbc_loaded_php_files' ); |
| 311 | 491 | do_action( 'wpbc_loaded_php_files' ); |