| 1 |
<?php |
| 2 |
/** |
| 3 |
* Include all nessacery files for the Booking From Builder (BFB) |
| 4 |
* |
| 5 |
* @package Booking Calendar. |
| 6 |
* @author wpdevelop, oplugins |
| 7 |
* @web-site https://wpbookingcalendar.com/ |
| 8 |
* @email info@wpbookingcalendar.com |
| 9 |
* |
| 10 |
* @since 11.0.0 |
| 11 |
* @modified 2025-08-29 |
| 12 |
* @version 1.0 |
| 13 |
*/ |
| 14 |
|
| 15 |
// --------------------------------------------------------------------------------------------------------------------- |
| 16 |
// == File bfb-include.php == Time point: 2025-08-29 12:25 |
| 17 |
// --------------------------------------------------------------------------------------------------------------------- |
| 18 |
if ( ! defined( 'ABSPATH' ) ) { |
| 19 |
exit; // Exit if accessed directly. |
| 20 |
} |
| 21 |
|
| 22 |
// Slug of the Builder page passed by footer hook / bootstrap. |
| 23 |
if ( ! defined( 'WPBC_BFB_BUILDER_PAGE_SLUG' ) ) { |
| 24 |
define( 'WPBC_BFB_BUILDER_PAGE_SLUG', 'wpbc-ajx_booking_builder_booking_form' ); |
| 25 |
} |
| 26 |
|
| 27 |
require_once WPBC_PLUGIN_DIR . '/includes/_front_end/form-style-presets.php'; // Shared global form style presets. |
| 28 |
|
| 29 |
// ===================================================================================================================== |
| 30 |
// == Ajax == |
| 31 |
// ===================================================================================================================== |
| 32 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/ajax/bfb-ajax.php'; // AJAX controller for saving / loading / listing ... |
| 33 |
|
| 34 |
// ===================================================================================================================== |
| 35 |
// == Save / Load == |
| 36 |
// ===================================================================================================================== |
| 37 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/save-load/bfb-form-storage.php'; // Low-level storage for BFB form structures. Handles DB. |
| 38 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/save-load/bfb-form-manager.php'; // Booking Form Builder storage manager. |
| 39 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/legacy-import/form_templates.php'; // Import-only legacy form templates. |
| 40 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/legacy-import/form_simple__default.php'; // Import-only Simple form defaults. |
| 41 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/legacy-import/form_simple__get_data.php'; // Import-only Simple form shortcode conversion helpers. |
| 42 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/save-load/bfb-activate.php'; // Activate / Deactivate. |
| 43 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/legacy-import/bfb-import-simple-form.php'; // Import - Simple form - migration loader. |
| 44 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/legacy-import/bfb-import-legacy-forms.php'; // Import - all legacy forms - migration loader. |
| 45 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/save-load/bfb-form-loader.php'; // Loader. |
| 46 |
|
| 47 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/assets/template-records/bfb-activate-templates.php'; // Update Templaets on Activation. |
| 48 |
// ===================================================================================================================== |
| 49 |
// == Admin Page UI == |
| 50 |
// ===================================================================================================================== |
| 51 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/ui-parts/bfb-ui__nav_horis.php'; // "Horisontal top menu". |
| 52 |
|
| 53 |
// ===================================================================================================================== |
| 54 |
// == Admin Page Templates (Tpl) == |
| 55 |
// ===================================================================================================================== |
| 56 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/admin-page-tpl/class-wpbc-bfb-template-picker-section.php'; // Shared Form Teamplets Section. |
| 57 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/admin-page-tpl/tpl-modal_page-delete.php'; // "Delete Page" Modal Window - WP Template for Admin page. |
| 58 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/admin-page-tpl/tpl-modal_item-delete.php'; // Template for confimration of deleting elements. |
| 59 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/admin-page-tpl/tpl-modal__form_add_new.php'; // Template for creation new booking form. |
| 60 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/admin-page-tpl/tpl-modal__form_open.php'; // Template for loading booking forms. |
| 61 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/admin-page-tpl/tpl-modal__form_save_as.php'; // Template for Save As form. |
| 62 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/admin-page-tpl/tpl-modal__form_apply_template.php'; // Template for Apply Template to form. |
| 63 |
|
| 64 |
// ===================================================================================================================== |
| 65 |
// == Publish (Ajax / Tpl) == |
| 66 |
// ===================================================================================================================== |
| 67 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/publish/class-wpbc-bfb-publish-ajax.php'; // Ajax Endpoint. |
| 68 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/publish/tpl-modal__publish.php'; // "Publish" tpl. |
| 69 |
|
| 70 |
// ===================================================================================================================== |
| 71 |
// == Settings Options == |
| 72 |
// ===================================================================================================================== |
| 73 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/form-settings/options-render.php'; // Save and Load different form settings - right sidebar "Settings". |
| 74 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/form-settings/options-defs.php'; // Listing of all Settings options. |
| 75 |
// ===================================================================================================================== |
| 76 |
// == Current Form Details == |
| 77 |
// ===================================================================================================================== |
| 78 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/form-details/current-form-details.php'; // Current Form Details. |
| 79 |
|
| 80 |
// ===================================================================================================================== |
| 81 |
// == Advanced Mode == |
| 82 |
// ===================================================================================================================== |
| 83 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/advanced-mode/bfb-advanced-mode.php'; // Advanced form mode. |
| 84 |
|
| 85 |
|
| 86 |
// ===================================================================================================================== |
| 87 |
// == Core == |
| 88 |
// ===================================================================================================================== |
| 89 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/bfb-schemas.php'; |
| 90 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/bfb-bootstrap.php'; |
| 91 |
|
| 92 |
// ===================================================================================================================== |
| 93 |
// == Field Packs == |
| 94 |
// ===================================================================================================================== |
| 95 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/section/section-wptpl.php'; // -- Section -- |
| 96 |
|
| 97 |
// ===================================================================================================================== |
| 98 |
// == Basic Packs == |
| 99 |
// ===================================================================================================================== |
| 100 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/calendar/calendar.php'; // -- Calendar -- // Calendar - WP Template. |
| 101 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/email/field-email-wptpl.php'; // -- Email -- // Email Field - WP Template. |
| 102 |
// -- Prefilled Packs --. |
| 103 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/text-firstname/field-text-firstname-preset.php'; // First Name Field - based on "Text Field Pack". |
| 104 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/text-secondname/field-text-secondname-preset.php'; // Second Name Field - based on "Text Field Pack". |
| 105 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/static-text/field-static-text.php'; // Static Text. |
| 106 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/captcha/field-captcha-wptpl.php'; // -- CAPTCHA --. |
| 107 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/submit/submit.php'; // -- Submit -- |
| 108 |
|
| 109 |
// ===================================================================================================================== |
| 110 |
// == Standard Packs == |
| 111 |
// ===================================================================================================================== |
| 112 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/text/field-text.php'; // -- Text -- // Reference Pack: JSON. |
| 113 |
// require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/text/field-text-wptpl.php'; // -- Text -- // Reference Pack: WP Template. |
| 114 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/textarea/textarea.php'; // -- Textara --. |
| 115 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/select/field-select-wptpl.php'; // -- Selectbox -- // Reference Pack: WP Template. |
| 116 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/radio/field-radio-wptpl.php'; // -- Radio --. |
| 117 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/checkbox/field-checkbox-wptpl.php'; // -- Checkbox -- |
| 118 |
|
| 119 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/accept-terms/field-accept-terms-wptpl.php'; // -- Terms -- |
| 120 |
|
| 121 |
// ===================================================================================================================== |
| 122 |
// == Times Packs == |
| 123 |
// ===================================================================================================================== |
| 124 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/time-picker-appearance.php'; // -- Shared Time Picker Appearance --. |
| 125 |
// require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/time-range/time-range.php'; // -- Time Range -- |
| 126 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/time-range/field-rangetime-wptpl.php'; // -- Time Range 2 -- |
| 127 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/time-start/field-starttime-wptpl.php'; |
| 128 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/time-end/field-endtime-wptpl.php'; |
| 129 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/time-duration/field-durationtime-wptpl.php'; |
| 130 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/time-duration-service/field-durationtime-service-preset.php'; |
| 131 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/weekday-rangetime/field-weekday-rangetime-wptpl.php'; |
| 132 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/weekday-starttime/field-weekday-starttime-wptpl.php'; |
| 133 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/season-rangetime/field-season-rangetime-wptpl.php'; |
| 134 |
// require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/time-grid/time-grid.php'; // -- TODO: Time Grid --. |
| 135 |
|
| 136 |
|
| 137 |
// ===================================================================================================================== |
| 138 |
// == Hints Packs == |
| 139 |
// ===================================================================================================================== |
| 140 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-cost_hint/field-cost-hint-wptpl.php'; |
| 141 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-selected_short_timedates_hint/field-selected-short-timedates-hint-wptpl.php'; |
| 142 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-capacity_hint/field-capacity-hint-wptpl.php'; |
| 143 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-bookingresource_info/field-bookingresource-info-wptpl.php'; |
| 144 |
|
| 145 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-check_in_date_hint/field-check-in-date-hint-wptpl.php'; |
| 146 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-check_out_date_hint/field-check-out-date-hint-wptpl.php'; |
| 147 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-check_out_plus1day_hint/field-check-out-plus1day-hint-wptpl.php'; |
| 148 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-days_number_hint/field-days-number-hint-wptpl.php'; |
| 149 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-nights_number_hint/field-nights-number-hint-wptpl.php'; |
| 150 |
|
| 151 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-start_time_hint/field-start-time-hint-wptpl.php'; |
| 152 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-end_time_hint/field-end-time-hint-wptpl.php'; |
| 153 |
|
| 154 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-selected_short_dates_hint/field-selected-short-dates-hint-wptpl.php'; |
| 155 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-selected_dates_hint/field-selected-dates-hint-wptpl.php'; |
| 156 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-selected_timedates_hint/field-selected-timedates-hint-wptpl.php'; |
| 157 |
|
| 158 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-cancel_date_hint/field-cancel-date-hint-wptpl.php'; |
| 159 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-pre_checkin_date_hint/field-pre-checkin-date-hint-wptpl.php'; |
| 160 |
|
| 161 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-original_cost_hint/field-original-cost-hint-wptpl.php'; |
| 162 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-additional_cost_hint/field-additional-cost-hint-wptpl.php'; |
| 163 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-deposit_hint/field-deposit-hint-wptpl.php'; |
| 164 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-balance_hint/field-balance-hint-wptpl.php'; |
| 165 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-coupon_discount_hint/field-coupon-discount-hint-wptpl.php'; |
| 166 |
|
| 167 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-resource_title_hint/field-resource-title-hint-wptpl.php'; |
| 168 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/hint-service_title_hint/field-service-title-hint-wptpl.php'; |
| 169 |
|
| 170 |
|
| 171 |
// ===================================================================================================================== |
| 172 |
// == Structure Packs == |
| 173 |
// ===================================================================================================================== |
| 174 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/wizard-nav/wizard-nav.php'; // -- Wizard Nav. -- |
| 175 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/appointment-start-over/appointment-start-over.php'; // -- Appointment Start Over. -- |
| 176 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/divider/divider.php'; // -- Divider -- |
| 177 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/field-packs/steps-timeline/field-steps-timeline.php'; // -- Steps Timeline in Wizards -- |
| 178 |
|
| 179 |
// ===================================================================================================================== |
| 180 |
// == Page == |
| 181 |
// ===================================================================================================================== |
| 182 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/bfb-ui-elements.php'; |
| 183 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/builder-form-page.php'; |
| 184 |
|
| 185 |
// Boot Hybrid++ for this page: collect packs, localize schemas, and hook template printing. |
| 186 |
WPBC_BFB_Bootstrap::init(); |
| 187 |
|
| 188 |
// ===================================================================================================================== |
| 189 |
// == Preview Service == |
| 190 |
// ===================================================================================================================== |
| 191 |
require_once WPBC_PLUGIN_DIR . '/includes/page-form-builder/preview/bfb-preview.php'; |
| 192 |
WPBC_BFB_Preview_Service::get_instance(); // Initialize preview PHP CLASS. |
| 193 |
|