| 1 |
<?php |
| 2 |
/** |
| 3 |
* @version 1.0 |
| 4 |
* @package Booking Calendar |
| 5 |
* @subpackage Files Loading |
| 6 |
* @category Bookings |
| 7 |
* |
| 8 |
* @author wpdevelop |
| 9 |
* @link https://wpbookingcalendar.com/ |
| 10 |
* @email info@wpbookingcalendar.com |
| 11 |
* |
| 12 |
* @modified 29.09.2015 |
| 13 |
*/ |
| 14 |
|
| 15 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 16 |
|
| 17 |
// ===================================================================================================================== |
| 18 |
// == L O A D F I L E S == |
| 19 |
// ===================================================================================================================== |
| 20 |
|
| 21 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-debug.php' ); // Debug = Package: WPBC = |
| 22 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-core.php' ); // Core |
| 23 |
|
| 24 |
require_once( WPBC_PLUGIN_DIR . '/core/any/class-css-js.php' ); // Abstract. Loading CSS & JS files = Package: Any = |
| 25 |
require_once( WPBC_PLUGIN_DIR . '/core/any/class-admin-settings-api.php' ); // Abstract. Settings API. |
| 26 |
|
| 27 |
if ( WPBC_SETTINGS_ALL ) { |
| 28 |
require_once( WPBC_PLUGIN_DIR . '/includes/class_page_structure/class_page_structure.php' ); // Abstract. Page Structure in Admin Panel // 2024-12-23 |
| 29 |
} else { |
| 30 |
require_once( WPBC_PLUGIN_DIR . '/core/any/class-admin-page-structure.php' ); // Abstract. Page Structure in Admin Panel |
| 31 |
} |
| 32 |
|
| 33 |
require_once( WPBC_PLUGIN_DIR . '/core/any/class-admin-menu.php' ); // CLASS. Menus of plugin |
| 34 |
require_once( WPBC_PLUGIN_DIR . '/core/any/admin-bs-ui.php' ); // Functions. Toolbar BS UI Elements |
| 35 |
if( is_admin() ) { |
| 36 |
require_once WPBC_PLUGIN_DIR . '/core/class/wpbc-class-notices.php'; // Class - Showing different messages and alerts. Including some predefined static messages. |
| 37 |
require_once WPBC_PLUGIN_DIR . '/core/class/wpbc-class-welcome.php'; // Class - Welcome Page - info about new version. |
| 38 |
} |
| 39 |
|
| 40 |
// ===================================================================================================================== |
| 41 |
// Functions |
| 42 |
// ===================================================================================================================== |
| 43 |
require_once WPBC_PLUGIN_DIR . '/includes/_functions/class-wpbc-action-scheduler-compatibility.php'; // Class to Increase Memory and Time. |
| 44 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/nonce_func.php' ); // Nonce functions - front-end excluding |
| 45 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/str_regex.php' ); // String and Regex functions for shortcodes |
| 46 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/is_table_exist.php' ); // Is DB Tables Exists |
| 47 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/is_dismissed.php' ); // Is Dismissed |
| 48 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/booking_data__parse.php' ); // Booking form data parsing and replacement |
| 49 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/booking_data__get.php' ); // Booking details | replace / fields functions |
| 50 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/simple_html_tags.php' ); // Simple HTML Tags - Custom Shortcodes |
| 51 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/admin_menu_url.php' ); // Admin Menu Pages & URLs |
| 52 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/admin_top_bar.php' ); // Admin Top Bar |
| 53 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/news_version.php' ); // News, Version |
| 54 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/versions.php' ); // Versions |
| 55 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/sanitizing.php' ); // Sanitizing |
| 56 |
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. |
| 57 |
require_once( WPBC_PLUGIN_DIR . '/includes/_functions/city_list.php' ); // City list |
| 58 |
|
| 59 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc_functions.php' ); // Functions |
| 60 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc_functions_dates.php' ); // Function Dates New in 9.8 |
| 61 |
require_once( WPBC_PLUGIN_DIR . '/core/form_parser.php' ); // Parser for booking form New in 9.8 |
| 62 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-dates.php' ); // Dates |
| 63 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc_welcome.php' ); // Welcome Panel Functions |
| 64 |
|
| 65 |
// New Engine // FixIn: 9.8.0.4. |
| 66 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/wpbc_cache.php' ); // Caching different requests to DB // FixIn: 9.8.0.4. |
| 67 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/booking_date_class.php' ); // Functions for booking dates |
| 68 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/dates_times_support.php' ); // Functions for booking DATES & TIME |
| 69 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/resource_support.php' ); // Functions for resources support |
| 70 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/capacity.php' ); // Get Dates from DB - Capacity, Availability and more ... |
| 71 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/get_times_fields.php' ); // Get Times Fields options from Booking Form |
| 72 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/aggregate.php' ); // Aggregate functions for 'aggregate' parameter in shortcode |
| 73 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/where_to_save.php' ); // Check where to save booking |
| 74 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/create_booking.php' ); // Functions to create new bookings |
| 75 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/confirmation.php' ); // Confirmation section - get data |
| 76 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/confirmation_page.php' ); // Confirmation Page |
| 77 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/calendar_load.php' ); // Scripts to load calendar |
| 78 |
require_once( WPBC_PLUGIN_DIR . '/includes/_capacity/captcha_simple_text.php' ); // Simple text captcha checking |
| 79 |
|
| 80 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-translation.php' ); // Translation, must be loaded after '/core/wpbc-core.php', because there defined add_bk_filter(), etc... |
| 81 |
// FixIn: 8.9.4.12. |
| 82 |
if ( file_exists( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations.php' ) ){ |
| 83 |
|
| 84 |
require_once( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations.php' ); // All Translation Terms |
| 85 |
|
| 86 |
// FixIn: 8.7.3.6. |
| 87 |
if ( file_exists( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations1.php' ) ){ |
| 88 |
require_once( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations1.php' ); |
| 89 |
} |
| 90 |
if ( file_exists( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations2.php' ) ){ |
| 91 |
require_once( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations2.php' ); |
| 92 |
} |
| 93 |
if ( file_exists( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations3.php' ) ){ |
| 94 |
require_once( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations3.php' ); |
| 95 |
} |
| 96 |
if ( file_exists( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations4.php' ) ){ |
| 97 |
require_once( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations4.php' ); |
| 98 |
} |
| 99 |
if ( file_exists( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations5.php' ) ){ |
| 100 |
require_once( WPBC_PLUGIN_DIR . '/core/lang/wpbc_all_translations5.php' ); |
| 101 |
} |
| 102 |
} |
| 103 |
|
| 104 |
require_once( WPBC_PLUGIN_DIR . '/includes/publish/wpbc-create-pages.php' ); // Create pages for different purposes // FixIn: 9.6.2.10. |
| 105 |
require_once( WPBC_PLUGIN_DIR . '/includes/publish/wpbc-publish-shortcode.php' ); // Publish Booking Calendar shortcodes into the Pages // FixIn: 9.8.15.5. |
| 106 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-emails.php' ); // Emails |
| 107 |
// JS & CSS |
| 108 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-css.php' ); // Load CSS |
| 109 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-js.php' ); // Load JavaScript |
| 110 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-js-vars.php' ); // Define JavaScript Vars |
| 111 |
// Admin UI |
| 112 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/wpbc-toolbars.php' ); // Toolbar - BS UI Elements |
| 113 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/wpbc-sql.php' ); // Data Engine for Booking Listing / Calendar Overview pages |
| 114 |
//FixIn: 9.6.3.5 // FixIn: 8.6.1.13. |
| 115 |
require_once( WPBC_PLUGIN_DIR . '/core/timeline/flex-timeline.php' ); // New. Flex. Timeline |
| 116 |
|
| 117 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/wpbc-dashboard.php' ); // Dashboard Widget |
| 118 |
|
| 119 |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 120 |
// Admin Pages |
| 121 |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 122 |
|
| 123 |
//FixIn: 9.2.1 // FixIn: 9.6.3.5. |
| 124 |
require_once( WPBC_PLUGIN_DIR . '/includes/_booking_hash/booking_hash.php' ); // FixIn: 9.2.3.3. |
| 125 |
|
| 126 |
require_once( WPBC_PLUGIN_DIR . '/includes/_news/wpbc_news.php' ); |
| 127 |
|
| 128 |
// UI Elements |
| 129 |
require_once( WPBC_PLUGIN_DIR . '/includes/_toolbar_ui/flex_ui_elements.php' ); |
| 130 |
require_once( WPBC_PLUGIN_DIR . '/includes/_toolbar_ui/ui__settings_panel.php' ); |
| 131 |
require_once( WPBC_PLUGIN_DIR . '/includes/_toolbar_ui/toolbar_ui.php' ); |
| 132 |
require_once( WPBC_PLUGIN_DIR . '/includes/_toolbar_ui/ui__form_steps_timeline.php' ); // FixIn: 10.9.6.6. |
| 133 |
|
| 134 |
// Booking Listing |
| 135 |
require_once( WPBC_PLUGIN_DIR . '/includes/_listing_css_js/listing_ui.php' ); |
| 136 |
require_once( WPBC_PLUGIN_DIR . '/includes/_pagination/pagination.php' ); |
| 137 |
require_once( WPBC_PLUGIN_DIR . '/includes/print/bookings_print.php' ); |
| 138 |
|
| 139 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-bookings/bookings__sql.php' ); |
| 140 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-bookings/bookings__actions.php' ); |
| 141 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-bookings/bookings__listing.php' ); |
| 142 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-bookings/bookings__page.php' ); |
| 143 |
|
| 144 |
// Booking > Availability page |
| 145 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-availability/availability__activation.php' ); |
| 146 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-availability/availability__toolbar_ui.php' ); |
| 147 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-availability/availability__class.php' ); |
| 148 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-availability/availability__resource.php' ); |
| 149 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-availability/availability__page.php' ); |
| 150 |
|
| 151 |
|
| 152 |
if ( WPBC_SETTINGS_ALL ) { |
| 153 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-settings-all/all__page.php' ); // FixIn: 10.4.0.2. |
| 154 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-settings-calendar-skin/calendar_skin__page.php' ); // FixIn: 11.0.0.1. |
| 155 |
} |
| 156 |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 157 |
|
| 158 |
// FixIn: 9.6.3.5. |
| 159 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-timeline.php' ); // Timeline |
| 160 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-new.php' ); // Add New Booking page |
| 161 |
|
| 162 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/wpbc-settings-functions.php' ); // Support functions for Booking > Settings General page |
| 163 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-settings.php' ); // Settings page |
| 164 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/api-settings.php' ); // Settings API |
| 165 |
|
| 166 |
|
| 167 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/wpbc-gutenberg.php' ); // Settings page |
| 168 |
|
| 169 |
//////////////////////////////////////////////////////////////////////////////// |
| 170 |
|
| 171 |
// Functions from Free form that can be use in paid versions in Wizard Setup |
| 172 |
|
| 173 |
require_once(WPBC_PLUGIN_DIR. '/includes/page-form-simple/form_templates.php' ); // Booking Form Templates // FixIn: 10.6.2.1. |
| 174 |
|
| 175 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-form-simple/form_simple__default.php' ); |
| 176 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-form-simple/form_simple__get_data.php' ); |
| 177 |
|
| 178 |
if ( file_exists( WPBC_PLUGIN_DIR.'/inc/_ps/personal.php' ) ){ |
| 179 |
require_once WPBC_PLUGIN_DIR . '/inc/_ps/personal.php'; |
| 180 |
} else { |
| 181 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-resource-free/page-resource-free.php' ); // Resource page for Free version |
| 182 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-up.php' ); // Up // FixIn: 8.0.1.6. |
| 183 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-form-simple/page-form-simple.php' ); // Booking Form Simple |
| 184 |
|
| 185 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-new-admin.php' ); // Email - New admin. |
| 186 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-new-visitor.php' ); // Email - New visitor |
| 187 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-deny.php' ); // Email - Deny - set pending |
| 188 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-approved.php' ); // Email - Approved |
| 189 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-trash.php' ); // Email - Trash |
| 190 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-email-deleted.php' ); // Email - Deleted / completely erase |
| 191 |
|
| 192 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-ics-general.php' ); // General ICS Help Settings page // FixIn: 8.1.1.10. |
| 193 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-ics-import.php' ); // Import ICS Help Settings page //FixIn: 8.0 |
| 194 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-ics-export.php' ); // Export ICS Feeds Settings page //FixIn: 8.0 |
| 195 |
require_once( WPBC_PLUGIN_DIR . '/core/admin/page-import-gcal.php' ); // Import from Google Calendar Settings page |
| 196 |
} |
| 197 |
|
| 198 |
// Booking > Setup page // FixIn: 10.2.0.1. |
| 199 |
// FixIn: 9.8.0.2. |
| 200 |
require_once( WPBC_PLUGIN_DIR . '/includes/page-setup/setup__page.php' ); |
| 201 |
require_once( WPBC_PLUGIN_DIR . '/includes/_tour/wpbc_tour.php' ); // FixIn: 10.4.0.1. |
| 202 |
|
| 203 |
|
| 204 |
require_once( WPBC_PLUGIN_DIR . '/includes/_feedback/feedback.php'); // FixIn: 9.2.3.6. |
| 205 |
|
| 206 |
// Old Working |
| 207 |
require_once WPBC_PLUGIN_DIR . '/core/lib/wpdev-booking-widget.php'; // W i d g e t s |
| 208 |
require_once WPBC_PLUGIN_DIR . '/js/captcha/captcha.php'; // C A P T C H A |
| 209 |
|
| 210 |
require_once WPBC_PLUGIN_DIR . '/core/lib/wpbc-calendar-legend.php'; // Calendar Legend // FixIn: 9.4.3.6. |
| 211 |
|
| 212 |
require_once WPBC_PLUGIN_DIR . '/core/lib/wpdev-booking-class.php'; // C L A S S B o o k i n g |
| 213 |
require_once WPBC_PLUGIN_DIR . '/core/lib/wpbc-booking-new.php'; // N e w |
| 214 |
require_once WPBC_PLUGIN_DIR . '/core/lib/wpbc-cron.php'; // CRON @since: 5.2.0 |
| 215 |
|
| 216 |
if( is_admin() ) { |
| 217 |
// FixIn: 9.9.0.15. |
| 218 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/shortcode_tpl_js_loader.php'; // Templates JS Loader |
| 219 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/sh_tpl_booking.php'; // Booking - Shortcode Config Content |
| 220 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/sh_tpl_booking_calendar.php'; |
| 221 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/sh_tpl_booking_select.php'; |
| 222 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/sh_tpl_booking_timeline.php'; |
| 223 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/sh_tpl_booking_form.php'; |
| 224 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/sh_tpl_booking_search.php'; |
| 225 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/sh_tpl_booking_other.php'; |
| 226 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/sh_tpl_booking_import.php'; |
| 227 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/sh_tpl_booking_listing.php'; |
| 228 |
require_once WPBC_PLUGIN_DIR . '/includes/ui_modal__shortcodes/tiny-button-popup.php'; // PopUp for shortcodes and Buttons in Edit toolbar |
| 229 |
} |
| 230 |
|
| 231 |
require_once WPBC_PLUGIN_DIR . '/core/sync/wpbc-gcal-class.php'; //DONE: in 7.0 // Google Calendar Feeds Import @since: 5.2.0 - v.3.0 API support @since: 5.4.0 |
| 232 |
require_once WPBC_PLUGIN_DIR . '/core/sync/wpbc-gcal.php'; //DONE: in 7.0 // Sync Google Calendar Events with WPBC @since: 5.2.0 - v.3.0 API support @since: 5.4.0 |
| 233 |
|
| 234 |
require_once( WPBC_PLUGIN_DIR . '/core/any/activation.php' ); |
| 235 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-activation.php' ); |
| 236 |
|
| 237 |
require_once( WPBC_PLUGIN_DIR . '/core/wpbc-dev-api.php' ); // API for Booking Calendar integrations //FixIn: 8.0 |
| 238 |
|
| 239 |
make_bk_action( 'wpbc_loaded_php_files' ); |