PluginProbe
ShiftController Employee Shift Scheduling / 3.2.4
ShiftController Employee Shift Scheduling v3.2.4
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / shiftcontroller.php

shiftcontroller.php in ShiftController Employee Shift Scheduling 3.2.4, at shiftcontroller.php

83 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package ShiftController
4 * @author HitCode
5 */
6 /*
7 Plugin Name: ShiftController
8 Plugin URI: http://www.shiftcontroller.com/
9 Description: Staff scheduling plugin.
10 Author: HitCode
11 Version: 3.2.4
12 Author URI: http://www.hitcode.com/
13 Text Domain: shiftcontroller
14 */
15
16 if( file_exists(dirname(__FILE__) . '/db.php') )
17 {
18 $nts_no_db = TRUE;
19 include_once( dirname(__FILE__) . '/db.php' );
20 }
21
22 if( defined('NTS_DEVELOPMENT') )
23 $happ_path = NTS_DEVELOPMENT;
24 else
25 $happ_path = dirname(__FILE__) . '/happ';
26 include_once( $happ_path . '/hclib/hcWpBase.php' );
27
28 register_uninstall_hook( __FILE__, array('ShiftController', 'uninstall') );
29
30 class ShiftController extends hcWpBase5
31 {
32 public function __construct()
33 {
34 parent::__construct(
35 strtolower(get_class()),
36 __FILE__,
37 '',
38 'ci'
39 );
40 $this->query_prefix = '?/';
41 }
42
43 public function admin_menu()
44 {
45 parent::admin_menu();
46
47 $menu_title = ucfirst($this->app);
48 $page = add_menu_page(
49 $menu_title,
50 $menu_title,
51 'read',
52 $this->slug,
53 array( $this, 'admin_view' ),
54 'dashicons-calendar'
55 );
56 }
57
58 static function uninstall( $prefix = 'shiftcontroller', $watch_other = array() )
59 {
60 $prefix = 'shiftcontroller';
61 $watch_other = array('shiftcontroller-pro.php');
62 hcWpBase5::uninstall( $prefix, $watch_other );
63 }
64 }
65
66 $sh = new ShiftController();
67
68 /*
69 Can pass the following arguments for the shortcode:
70 location:
71 one, comma separated list
72
73 staff:
74 one, comma separated list, _current_user_id_
75
76 date:
77 date like 20150712, or range like 20150712_20150719
78
79 range:
80 week, month
81 */
82
83 ?>