PluginProbe
Booking Calendar / 10.11.2
Booking Calendar v10.11.2
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 10.11.2, at core/admin/page-timeline.php

124 lines 6.2 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 $tabs = array();
34 $tabs[ 'vm_calendar' ] = array(
35 'is_show_top_path' => false, // true | false. By default value is: false.
36 'is_show_top_navigation' => true, // true | false. By default value is: false.
37 'left_navigation__default_view_mode' => 'min', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''.
38 'page_title' => false, // Header - Title. If false, than hidden.
39 'page_description' => false, // Header - Title Description. If false, than hidden.
40 'title' => __('Timeline View','booking') // Title of TAB
41 , 'hint' => __('Timeline View', 'booking') // Hint
42 , 'link' => '' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
43 , 'position' => '' // 'left' || 'right' || ''
44 , 'css_classes' => '' // CSS class(es)
45 , 'icon' => '' // Icon - link to the real PNG img
46 , 'font_icon' => 'wpbc_icn_rotate_90 wpbc_icn_align_vertical_bottom' // CSS definition of forn Icon // FixIn: 9.5.5.3.
47 , 'default' => false // Is this tab activated by default or not: true || false.
48 , 'disabled' => false // Is this tab disbaled: true || false.
49 , 'hided' => true // Is this tab hided: true || false.
50 , 'subtabs' => array()
51
52 );
53
54 // $subtabs = array();
55 // $tabs[ 'bookings' ][ 'subtabs' ] = $subtabs;
56
57 return $tabs;
58 }
59
60
61 public function content() {
62
63 wpbc_check_request_paramters(); //Cleanup REQUEST parameters // FixIn: 6.2.1.4.
64
65 do_action( 'wpbc_hook_booking_page_header', 'timeline' ); // Define Notices Section and show some static messages, if needed.
66
67 if ( ! wpbc_is_mu_user_can_be_here( 'activated_user' ) ) return false; // Check if MU user activated, otherwise show Warning message.
68
69 if ( ! wpbc_set_default_resource_to__get() ) return false; // Define default booking resources for $_ GET and check if booking resource belong to user.
70
71 ?><span class="wpdevelop"><?php // BS UI CSS Class
72
73 wpbc_js_for_bookings_page(); // JavaScript functions
74
75
76 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
77
78 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
79
80 wpbc_set_request_params_for_timeline(); // Set initial $_REQUEST['view_days_num'] depend from selected booking resources
81
82 // T o o l b a r s /////////////////////////////////////////////////
83 if ( WPBC_NEW_LISTING ) {
84 wpbc_ui__timeline__resource_selection();
85 } else {
86 wpbc_timeline_toolbar();
87 ?><div class="clear" style="height:25px;"></div><?php
88 }
89
90
91 // Show T i m e L i n e ///////////////////////////////////////
92
93 // FixIn: 9.9.0.18.
94 $server_zone = date_default_timezone_get(); // If in 'Theme' or 'other plugin' set default timezone other than UTC. Save it.
95 if ( 'UTC' !== $server_zone ) { // Needed for WP date functions - set timezone to UTC
96 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
97 @date_default_timezone_set( 'UTC' );
98 }
99
100 // FixIn: 8.6.1.13.
101 $this->timeline = new WPBC_TimelineFlex();
102
103 $this->timeline->admin_init(); // Define all REQUEST parameters and get bookings
104
105 $this->timeline->show_timeline();
106
107 // FixIn: 9.9.0.18.
108 if ( 'UTC' !== $server_zone ) { // Back to previos state, if it was changed.
109 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
110 @date_default_timezone_set( $server_zone );
111 }
112
113 ////////////////////////////////////////////////////////////////////
114
115 wpbc_welcome_panel(); // Welcome Panel (links)
116
117 wpbc_show_booking_footer();
118
119 ?></span><!-- wpdevelop class --><?php
120 }
121
122 }
123 add_action('wpbc_menu_created', array( new WPBC_Page_CalendarOverview() , '__construct') ); // Executed after creation of Menu
124