function wpdevbk_show_booking_page() { wpbc_welcome_panel(); //////////////////////////////////////////////////////////////////////////////////////////////////////// // Get from SETTINGS (if its not set in request yet) the "tab" & "view_mode" and set to $_REQUEST // If we have the "saved" filter set so LOAD it and set to REQUEST, if REQUEST was not set previously // & skip "wh_booking_type" from the saved filter set //////////////////////////////////////////////////////////////////////////////////////////////////////// wpdevbk_get_default_bk_listing_filter_set_to_params('default'); // Get saved filters set DONE! //debuge($_REQUEST); // Setting $_REQUEST['wh_booking_type'] if (function_exists('wpdevbk_check_wh_booking_type_param_in_request')) { wpdevbk_check_wh_booking_type_param_in_request(); } // DONE! // If "wh_booking_type" is not set, and current user is not superadmin, then set to - $_REQUEST['wh_booking_type'] - booking resource from regular user make_bk_action('check_for_resources_of_notsuperadmin_in_booking_listing'); // DONE! wpdevbk_booking_view_mode_buttons(); // Show switch calendar/listing buttons DONE! //debuge($_REQUEST); switch ($_REQUEST['view_mode']) { case 'vm_calendar': // vm_calendar bookings_overview_in_calendar(); break; default: // vm_listing wpdevbk_show_booking_listings(); } wpdevbk_booking_listing_write_js(); // Wtite inline JS wpdevbk_booking_listing_write_css(); // Write inline CSS }
function bookingtimeline_shortcode($attr) { ob_start(); bookings_overview_in_calendar(); wpdevbk_booking_listing_write_js(); // Wtite inline JS wpdevbk_booking_listing_write_css(); // Write inline CSS $timeline_results = ob_get_contents(); ob_end_clean(); return $timeline_results; }