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

126 lines 6.1 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' => __('Timeline View','booking') // Title of TAB
46 , 'hint' => __('Timeline View', 'booking') // Hint
47 , 'page_title' => __('Timeline View', '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_icn_rotate_90 wpbc_icn_align_vertical_bottom' // CSS definition of forn Icon // FixIn: 9.5.5.3.
53 , 'header_font_icon' => 'wpbc_icn_rotate_90 wpbc_icn_align_vertical_bottom' // 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 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
85
86 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
87
88 wpbc_set_request_params_for_timeline(); // Set initial $_REQUEST['view_days_num'] depend from selected booking resources
89
90 // T o o l b a r s /////////////////////////////////////////////////
91 wpbc_timeline_toolbar();
92
93 ?><div class="clear" style="height:25px;"></div><?php
94
95 // Show T i m e L i n e ///////////////////////////////////////
96
97 // FixIn: 9.9.0.18.
98 $server_zone = date_default_timezone_get(); // If in 'Theme' or 'other plugin' set default timezone other than UTC. Save it.
99 if ( 'UTC' !== $server_zone ) { // Needed for WP date functions - set timezone to UTC
100 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
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 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
114 @date_default_timezone_set( $server_zone );
115 }
116
117 ////////////////////////////////////////////////////////////////////
118
119 wpbc_show_booking_footer();
120
121 ?></span><!-- wpdevelop class --><?php
122 }
123
124 }
125 add_action('wpbc_menu_created', array( new WPBC_Page_CalendarOverview() , '__construct') ); // Executed after creation of Menu
126