PluginProbe
Booking Calendar / 11.0
Booking Calendar v11.0
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 10.11 10.11.2 10.11.3 All 202 releases
booking / core / admin / page-timeline.php

page-timeline.php in Booking Calendar 11.0, at core/admin/page-timeline.php

146 lines 8.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php /**
2 * @version 1.0
3 * @package Booking Calendar
4 * @category Content of Booking Listing page
5 * @author wpdevelop
6 *
7 * @web-site https://wpbookingcalendar.com/
8 * @email info@wpbookingcalendar.com
9 *
10 * @modified 2015-11-13
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
15
16
17 /**
18 * Show Content
19 * Update Content
20 * Define Slug
21 * Define where to show
22 */
23 class WPBC_Page_CalendarOverview extends WPBC_Page_Structure {
24
25 private $timeline;
26
27 public function in_page() {
28 return 'wpbc';
29 }
30
31 public function tabs() {
32
33 $is_full_screen = WPBC_User_Custom_Data_Saver::get_user_data_value( wpbc_get_current_user_id(), 'is_full_screen' );
34 $is_full_screen = ( 'On' === $is_full_screen );
35
36 $tabs = array();
37 $tabs[ 'vm_calendar' ] = array(
38 'is_show_top_path' => false, // true | false. By default value is: false.
39 'is_show_top_navigation' => true, // true | false. By default value is: false.
40 'left_navigation__default_view_mode' => ( $is_full_screen ) ? 'compact' : 'min', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
41 'page_title' => false, // Header - Title. If false, than hidden.
42 'page_description' => false, // Header - Title Description. If false, than hidden.
43 'title' => __('Timeline View','booking') // Title of TAB
44 , 'hint' => __('Timeline View', 'booking') // Hint
45 , 'link' => '' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
46 , 'position' => '' // 'left' || 'right' || ''
47 , 'css_classes' => '' // CSS class(es)
48 , 'icon' => '' // Icon - link to the real PNG img
49 , 'font_icon' => 'wpbc_icn_rotate_90 wpbc_icn_align_vertical_bottom' // CSS definition of forn Icon // FixIn: 9.5.5.3.
50 , 'default' => false // Is this tab activated by default or not: true || false.
51 , 'disabled' => false // Is this tab disbaled: true || false.
52 , 'hided' => true // Is this tab hided: true || false.
53 , 'subtabs' => array()
54
55 );
56 // $tabs[ 'add-booking' ] = array(
57 // 'is_show_top_path' => false, // true | false. By default value is: false.
58 // 'left_navigation__default_view_mode' => 'min', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
59 // 'page_title' => __( 'Add New Booking', 'booking' ), // Header - Title. If false, than hidden.
60 // 'page_description' => __( 'Manually add new bookings from the Admin Panel.', 'booking' ), // Header - Title Description. If false, than hidden.
61 // 'title' => __( 'Add booking', 'booking' ), // Title of TAB.
62 // 'hint' => __( 'Add booking', 'booking' ), // Hint.
63 // 'position' => '', // Can be: 'left' | 'right' | ''.
64 // 'css_classes' => '', // this is CSS class(es).
65 // 'icon' => '', // Icon - link to the real PNG img.
66 // 'font_icon' => 'wpbc-bi-plus', // CSS definition of forn Icon.
67 // 'default' => false, // Is this tab disbaled: true || false.
68 // 'disabled' => false, // Is this tab disbaled: true || false.
69 // 'hided' => !false, // Is this tab hided: true || false.
70 // 'subtabs' => array()
71 // , 'link' => wpbc_get_new_booking_url__base( ) // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
72 // //, 'font_icon_right' => 'wpbc-bi-question-circle'
73 // , 'folder_style' => 'order:101;',
74 // );
75 //
76
77 // $subtabs = array();
78 // $tabs[ 'bookings' ][ 'subtabs' ] = $subtabs;
79
80 return $tabs;
81 }
82
83
84 public function content() {
85
86 wpbc_check_request_paramters(); //Cleanup REQUEST parameters // FixIn: 6.2.1.4.
87
88 do_action( 'wpbc_hook_booking_page_header', 'timeline' ); // Define Notices Section and show some static messages, if needed.
89
90 if ( ! wpbc_is_mu_user_can_be_here( 'activated_user' ) ) return false; // Check if MU user activated, otherwise show Warning message.
91
92 if ( ! wpbc_set_default_resource_to__get() ) return false; // Define default booking resources for $_ GET and check if booking resource belong to user.
93
94 ?><span class="wpdevelop"><?php // BS UI CSS Class
95
96 wpbc_js_for_bookings_page(); // JavaScript functions
97
98
99 make_bk_action( 'wpbc_check_request_param__wh_booking_type' ); // Setting $_REQUEST['wh_booking_type'] - remove empty and duplicates ID of booking resources in this list
100
101 make_bk_action( 'check_for_resources_of_notsuperadmin_in_booking_listing' ); // If "Regular User", then filter resources in $_REQUEST['wh_booking_type'] to show only resources of this user
102
103 wpbc_set_request_params_for_timeline(); // Set initial $_REQUEST['view_days_num'] depend from selected booking resources
104
105 // T o o l b a r s /////////////////////////////////////////////////
106 wpbc_ui__timeline__resource_selection();
107
108
109 // Show T i m e L i n e ///////////////////////////////////////
110
111 // FixIn: 9.9.0.18.
112 $server_zone = date_default_timezone_get(); // If in 'Theme' or 'other plugin' set default timezone other than UTC. Save it.
113 if ( 'UTC' !== $server_zone ) { // Needed for WP date functions - set timezone to UTC
114 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
115 @date_default_timezone_set( 'UTC' );
116 }
117
118 // FixIn: 8.6.1.13.
119 $this->timeline = new WPBC_TimelineFlex();
120
121 $this->timeline->admin_init(); // Define all REQUEST parameters and get bookings
122
123 $this->timeline->show_timeline();
124
125 // FixIn: 9.9.0.18.
126 if ( 'UTC' !== $server_zone ) { // Back to previos state, if it was changed.
127 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
128 @date_default_timezone_set( $server_zone );
129 }
130
131 ////////////////////////////////////////////////////////////////////
132
133 wpbc_welcome_panel(); // Welcome Panel (links)
134
135 wpbc_show_booking_footer();
136
137 ?></span><!-- wpdevelop class --><?php
138
139 if ( class_exists( 'WPBC_Add_Booking_Modal' ) ) {
140 WPBC_Add_Booking_Modal::template_for_modal();
141 }
142 }
143
144 }
145 add_action('wpbc_menu_created', array( new WPBC_Page_CalendarOverview() , '__construct') ); // Executed after creation of Menu
146