-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.php
95 lines (81 loc) · 1.97 KB
/
config.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
86
87
88
89
90
91
92
93
94
95
<?php
/**
* Plugin configuration
*
* Defines constants used throughout the plugin files.
*
* @package Dashboard_Summary
* @subpackage Configuration
* @category Core
* @since 1.0.0
*/
namespace Dashboard_Summary;
// Restrict direct access.
if ( ! defined( 'ABSPATH' ) ) {
die;
}
/**
* Constant: Plugin version
*
* @since 1.0.0
* @var string The latest plugin version.
*/
define( 'DS_VERSION', '1.0.0' );
/**
* Constant: Plugin folder path
*
* @since 1.0.0
* @var string The filesystem directory path (with trailing slash)
* for the plugin __FILE__ passed in.
*/
define( 'DS_PATH', plugin_dir_path( __FILE__ ) );
/**
* Constant: Plugin folder URL
*
* @since 1.0.0
* @var string The URL directory path (with trailing slash)
* for the plugin __FILE__ passed in.
*/
define( 'DS_URL', plugin_dir_url(__FILE__ ) );
/**
* Constant: Minimum PHP version
*
* @since 1.0.0
* @var string The minimum required PHP version.
*/
define( 'DS_MIN_PHP_VERSION', '5.8' );
/**
* Function: Minimum PHP version
*
* Checks the PHP version sunning on the current host
* against the minimum version required by this plugin.
*
* @since 1.0.0
* @return boolean Returns false if the minimum is not met.
*/
function min_php_version() {
if ( version_compare( phpversion(), DS_MIN_PHP_VERSION, '<' ) ) {
return false;
}
return true;
}
/**
* Constant: Site widget title
*
* @since 1.0.0
* @var string The text of the title.
*/
if ( ! defined( 'DS_SITE_WIDGET_TITLE' ) ) {
$widget_title = apply_filters( 'ds_site_widget_title', __( 'Website Summary', 'dashboard-summary' ) );
define( 'DS_SITE_WIDGET_TITLE', $widget_title );
}
/**
* Constant: Network widget title
*
* @since 1.0.0
* @var string The text of the title.
*/
if ( ! defined( 'DS_NETWORK_WIDGET_TITLE' ) ) {
$widget_title = apply_filters( 'ds_network_widget_title', __( 'Network Summary', 'dashboard-summary' ) );
define( 'DS_NETWORK_WIDGET_TITLE', $widget_title );
}