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

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