PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.21
Timetics – Appointment Booking Calendar & Scheduling v1.0.21
1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 All 62 releases
timetics / core / staffs / onboard.php

onboard.php in Timetics – Appointment Booking Calendar & Scheduling 1.0.21, at core/staffs/onboard.php

52 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Staff Onboard Class
4 *
5 * @package Timetics
6 */
7 namespace Timetics\Core\Staffs;
8
9 use Timetics\Utils\Singleton;
10
11 /**
12 * Onboard Class
13 */
14 class Onboard {
15 use Singleton;
16
17 /**
18 * Initialize the class
19 *
20 * @return void
21 */
22 public function init() {
23 add_action( 'admin_menu', [ $this, 'add_page' ] );
24 add_action( 'admin_init', [ $this, 'setup_onboard_page' ] );
25 }
26
27 /**
28 * Add dashboard page for staff onboard
29 *
30 * @return void
31 */
32 public function add_page() {
33 add_dashboard_page( '', '', 'manage_timetics', 'staff-onboard', '' );
34 }
35
36 /**
37 * Setup onboard page template
38 *
39 * @return void
40 */
41 public function setup_onboard_page() {
42 $page = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : '';
43
44 if ( 'staff-onboard' !== $page ) {
45 return;
46 }
47 ob_start();
48 include_once TIMETICS_PLUGIN_DIR . '/templates/staff/onboard.php';
49 exit();
50 }
51 }
52