-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomparison.php
More file actions
55 lines (39 loc) · 885 Bytes
/
comparison.php
File metadata and controls
55 lines (39 loc) · 885 Bytes
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
<?php
/*
Plugin Name: Comparison
Plugin URI: #
Description: a plugin for compare car models
Author: Erfan Kargosha
Author URI: #
Text Domain: Comparison
Version: 1.0.0
*/
final class Comparison{
protected static $_instance;
public static function get_instance()
{
if (is_null(self::$_instance)){
self::$_instance = new self;
}
}
public function __construct()
{
$this->init();
$this->define_constants();
$this->do_includes();
}
private function init()
{
defined('ABSPATH') || exit();
}
private function define_constants()
{
define('PLUGIN_DIR',plugin_dir_path(__FILE__));
define('PLUGIN_URL',plugin_dir_url(__FILE__));
}
private function do_includes()
{
include PLUGIN_DIR.'functions.php';
}
}
Comparison::get_instance();