-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ticket.php
85 lines (58 loc) · 1.85 KB
/
Ticket.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
<?php
/**
* Plugin Name: تیکت جدید همیار
* Version: 2.0.0
* Author: reza hossein pour
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: hamyarNotify
* Domain Path: /core/languages/
*/
namespace HWP_Ticket;
use HWP_Ticket\core\Loader;
use HWP_Ticket\core\Registration;
if (!defined('WPINC')) {
die;
}
class Ticket
{
protected static $_instance = null;
public static function get_instance()
{
if (is_null(self::$_instance)) {
self::$_instance = new self();
}
return self::$_instance;
}
public function __construct()
{
self::define();
self::registeration();
self::run();
}
public static function define()
{
define( 'HWP_TICKET_DEVELOPER_MODE', true );
define( 'HWP_TICKET_VERSION' , '2.3.7');
define( 'HWP_TICKET_ROOT' , plugin_dir_path(__FILE__) );
define( 'HWP_TICKET_ASSETS' , plugin_dir_url(__FILE__) . 'assets/');
define( 'HWP_TICKET_ADMIN_ASSETS' , HWP_TICKET_ASSETS . 'admin/');
define( 'HWP_TICKET_PUBLIC_ASSETS' , HWP_TICKET_ASSETS . 'public/');
define( 'HWP_TICKET_CORE' , HWP_TICKET_ROOT . '/core/');
define( 'HWP_TICKET_LANGUAGE_URL' , dirname(plugin_basename(__FILE__)) . '/languages/');
define( 'HWP_TICKET__FILE__' , __FILE__ );
define( 'HWP_TICKET_SCRIPTS_VERSION' ,
HWP_TICKET_DEVELOPER_MODE ? time() : HWP_TICKET_VERSION
);
require_once HWP_TICKET_ROOT .'vendor/autoload.php';
}
public static function run()
{
Loader::get_instance();
}
public static function registeration()
{
Registration::get_instance();
}
}
Ticket::get_instance();