This repository has been archived by the owner on Dec 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
simple-desk.php
85 lines (65 loc) · 2.87 KB
/
simple-desk.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/*
Plugin Name: Simple Desk
Version: 0.0.6
Description: Simple Desk is a simple ticket and customer management system for WordPress.
Plugin URI: http://simpledesk.io
Author: Adam Sewell
Author URI: http://tinyelk.com
Simple Desk is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Simple Desk is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Simple Desk. If not, see <http://www.gnu.org/licenses/>.
*/
if ( !defined( 'ABSPATH' ) ) die();
//constants
define( 'SIMPLEDESK_BASE_URI', dirname( __FILE__ ) );
define( 'SIMPLEDESK_BASE_DIR', plugin_dir_path( __FILE__ ));
define( 'SIMPLEDESK_FILE', __FILE__);
define( 'SIMPLEDESK_VERSION', '0.0.6');
$SimpleDesk = new SimpleDesk();
class SimpleDesk {
function __construct() {
$this->includes();
}
function includes(){
require_once SIMPLEDESK_BASE_DIR . 'lib/WP_Logging.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/custom-post-types.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/custom-statuses.php';
if(is_admin() || defined('SHORTINIT')){
//general
require_once SIMPLEDESK_BASE_DIR . 'lib/scripts.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/ajax.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/functions.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/admin-actions.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/admin-pages.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/admin-notices.php';
//customers
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/customers/customer-actions.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/customers/customer-functions.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/customers/ui.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/customers/metaboxes.php';
//tickets
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/tickets/ticket-actions.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/tickets/ticket-functions.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/tickets/ui.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/tickets/metaboxes.php';
//reports
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/reporting/reports.php';
//email
require_once SIMPLEDESK_BASE_DIR . 'lib/emails/template.php';
require_once SIMPLEDESK_BASE_DIR . 'lib/emails/functions.php';
//tools
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/tools/ui.php';
//settings
require_once SIMPLEDESK_BASE_DIR . 'lib/admin/settings/settings.php';
}
require_once SIMPLEDESK_BASE_DIR . 'lib/install.php';
}
}