-
Notifications
You must be signed in to change notification settings - Fork 3
/
init.php
93 lines (79 loc) · 3.43 KB
/
init.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
<?php
/**
* Initialization of globals.
*
* @package Bootstrap
* @author Jason Rouet <https://www.jasonrouet.com/>.
* @license http://www.gnu.org/licenses/gpl-2.0.html GPLv2 or later
* @since 3.0.0
*/
require_once (__DIR__.'/functions.php');
require_once (__DIR__.'/autoload.php');
use WeatherStation\System\Schedules\Watchdog;
use WeatherStation\System\URL\Client as URL;
use WeatherStation\System\Environment\Manager as EnvManager;
use WeatherStation\System\Storage\Manager as FS;
/**
* Definition of main constants.
*
* @since 1.0.0
*/
//--- E X P E R I M E N T A L -----------------------------------------------------------------------
define('LWS_FILE_CACHE', false);
//---------------------------------------------------------------------------------------------------
define('LWS_VERSION', '3.8.14');
define('LWS_PREVIEW', false);
define('LWS_CODENAME', '"Danakil"');
define('LWS_WHATSNEW', 'https://weather.station.software/blog/weather-station-3-8-danakil/');
define('LWS_SHOW_CHANGELOG', false);
//---------------------------------------------------------------------------------------------------
define('LWS_CHANGELOG', 'https://weather.station.software/handbook/changelog/');
define('LWS_FULL_NAME', 'Weather Station 3');
define('LWS_OWM_READY', false);
define('LWS_MINIMUM_WP_VERSION', '4.9');
define('LWS_MINIMUM_PHP_VERSION', '7.1');
define('LWS_PLUGIN_ID', 'live-weather-station');
define('LWS_PLUGIN_SLUG', 'live-weather-station');
define('LWS_PLUGIN_TEXT_DOMAIN', 'live-weather-station');
define('LWS_PLUGIN_NAME', 'Weather Station');
define('LWS_PLUGIN_SIGNATURE', LWS_PLUGIN_NAME . ' v' . LWS_VERSION);
define('LWS_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('LWS_PLUGIN_URL', plugin_dir_url(__FILE__));
define('LWS_RELATIVE_PLUGIN_URL', str_replace(get_site_url().'/', '', plugin_dir_url(__FILE__)));
define('LWS_ADMIN_DIR', plugin_dir_path(__FILE__).'admin/');
define('LWS_ADMIN_URL', plugin_dir_url(__FILE__).'admin/');
define('LWS_PUBLIC_DIR', plugin_dir_path(__FILE__).'public/');
define('LWS_PUBLIC_URL', plugin_dir_url(__FILE__).'public/');
define('LWS_INCLUDES_DIR', plugin_dir_path(__FILE__).'includes/');
define('LWS_LANGUAGES_DIR', plugin_dir_path(__FILE__).'languages/');
define('LWS_ADMIN_PHP_URL', EnvManager::admin_dir_relative_url());
define('LWS_AJAX_URL', EnvManager::ajax_dir_relative_url());
define('LWS_I18N_LOADED', EnvManager::is_i18n_loaded());
define('LWS_JSON_LOADED', EnvManager::is_json_loaded());
define('LWS_PHPVERSION_OK', EnvManager::is_php_version_ok());
define('LWS_PLUGIN_AGENT', LWS_FULL_NAME . ' (' . EnvManager::wordpress_version_id() . '; ' . EnvManager::weatherstation_version_id() . '; +https://weather.station.software)');
define('LWS_IC_WPROCKET', EnvManager::is_wp_rocket_installed());
define('LWS_IC_WPSC', EnvManager::is_wp_super_cache_installed());
define('LWS_IC_W3TC', EnvManager::is_w3_total_cache_installed());
define('LWS_IC_AUTOPTIMIZE', EnvManager::is_autoptimize_installed());
define('LWS_IC_HC', EnvManager::is_hyper_cache_installed());
define('LWS_WU_ACTIVE', false);
define('LWS_SERVICE_SEPARATOR', '{/LWS_SEP/}');
/**
* Initialize the Logger class that is responsible for logging.
*
* @since 2.8.0
*/
require_once LWS_INCLUDES_DIR.'system/Logger.php';
/**
* Begins execution of the plugin.
*
* @since 1.0.0
*/
function run_Live_Weather_Station() {
URL::init_rewrite_rules();
FS::init();
$plugin = new \WeatherStation\System\Plugin\Core();
$plugin->run();
Watchdog::start();
}