PluginProbe
Boxzilla – WordPress Popup Builder / 3.2.13
Boxzilla – WordPress Popup Builder v3.2.13
3.4.11 3.4.10 3.4.9 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 trunk 3.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 All 72 releases
boxzilla / src / class-plugin.php

class-plugin.php in Boxzilla – WordPress Popup Builder 3.2.13, at src/class-plugin.php

119 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Boxzilla;
4
5 class Plugin
6 {
7
8 /**
9 * @var string The current version of the plugin
10 */
11 protected $version = '1.0';
12
13 /**
14 * @var string
15 */
16 protected $file = '';
17
18 /**
19 * @var string
20 */
21 protected $dir = '';
22
23 /**
24 * @var string
25 */
26 protected $name = '';
27
28 /**
29 * @var string
30 */
31 protected $slug = '';
32
33 /**
34 * @var int
35 */
36 protected $id = 0;
37
38 /**
39 * Constructor
40 *
41 * @param int $id
42 * @param string $name
43 * @param string $version
44 * @param string $file
45 * @param string $dir (optional)
46 */
47 public function __construct($id, $name, $version, $file, $dir = '')
48 {
49 $this->id = $id;
50 $this->name = $name;
51 $this->version = $version;
52 $this->file = $file;
53 $this->dir = $dir;
54 $this->slug = plugin_basename($file);
55
56 if (empty($dir)) {
57 $this->dir = dirname($file);
58 }
59 }
60
61 /**
62 * @return int
63 */
64 public function id()
65 {
66 return $this->id;
67 }
68
69 /**
70 * @return string
71 */
72 public function slug()
73 {
74 return $this->slug;
75 }
76
77 /**
78 * @return string
79 */
80 public function name()
81 {
82 return $this->name;
83 }
84
85 /**
86 * @return string
87 */
88 public function version()
89 {
90 return $this->version;
91 }
92
93 /**
94 * @return string
95 */
96 public function file()
97 {
98 return $this->file;
99 }
100
101 /**
102 * @return string
103 */
104 public function dir()
105 {
106 return $this->dir;
107 }
108
109 /**
110 * @param string $path
111 *
112 * @return mixed
113 */
114 public function url($path = '')
115 {
116 return plugins_url($path, $this->file());
117 }
118 }
119