settings.php
855 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
<?php
namespace Getwid;
class Settings {
private $version;
private $prefix;
private $pluginName;
private $pluginData;
/**
* Settings constructor.
*/
public function __construct() {
if( !function_exists('get_plugin_data') ){
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
}
$this->pluginData = get_plugin_data(GETWID_PLUGIN_FILE);
$this->version = $this->pluginData['Version'];
$this->prefix = $this->pluginData['TextDomain'];
$this->pluginName = $this->pluginData['Name'];
}
/**
* @return string
*/
public function getVersion() {
return $this->version;
}
/**
* @return string
*/
public function getPrefix() {
return $this->prefix;
}
/**
* @return string
*/
public function getPluginName() {
return $this->pluginName;
}
}