-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathangelleye-updater.php
118 lines (100 loc) · 3.12 KB
/
angelleye-updater.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
/**
*
* @wordpress-plugin
* Plugin Name: Angell EYE Updater
* Plugin URI: http://www.angelleye.com/
* Description: Manage activations and updates for premium extensions to Angell EYE plugins.
* Version: 2.0.21
* Author: Angell EYE
* Author URI: http://www.angelleye.com/
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: angelleye-updater
* Domain Path: /languages
*/
// If this file is called directly, abort.
if (!defined('WPINC')) {
die;
}
define('AU_PLUGIN_VERSION', '2.0.21');
/**
* define plugin basename
*/
if (!defined('AA_PLUGIN_BASENAME')) {
define('AA_PLUGIN_BASENAME', plugin_basename(__FILE__));
}
/**
* define PIW_PLUGIN_DIR constant for global use
*/
if (!defined('AU_PLUGIN_DIR')) {
define('AU_PLUGIN_DIR', dirname(__FILE__));
}
/**
* define AU_WEBSITE_URL constant for global use
*/
if (!defined('AU_WEBSITE_URL')) {
define('AU_WEBSITE_URL', 'https://updates.angelleye.com/');
}
if (!defined('AU_COMPANY_NAME')) {
define('AU_COMPANY_NAME', 'Angell EYE');
}
/**
* define PIW_PLUGIN_URL constant for global use
*/
if (!defined('AU_PLUGIN_URL')) {
define('AU_PLUGIN_URL', plugin_dir_url(__FILE__));
}
/**
* define plugin basename
*/
if (!defined('AU_PLUGIN_BASENAME')) {
define('AU_PLUGIN_BASENAME', plugin_basename(__FILE__));
}
if (!defined('AU_FREE_LICENSE_KEY_TEXT')) {
define('AU_FREE_LICENSE_KEY_TEXT', __('FREE', 'angelleye-updater'));
}
if (!defined('AU_EMPTY_ACTION_TEXT')) {
define('AU_EMPTY_ACTION_TEXT', __('N/A', 'angelleye-updater'));
}
/**
* The code that runs during plugin activation.
* This action is documented in includes/class-angelleye-updater-activator.php
*/
function activate_angelleye_updater() {
require_once plugin_dir_path(__FILE__) . 'includes/class-angelleye-updater-activator.php';
AngellEYE_Updater_Activator::activate();
}
/**
* The code that runs during plugin deactivation.
* This action is documented in includes/class-angelleye-updater-deactivator.php
*/
function deactivate_angelleye_updater() {
require_once plugin_dir_path(__FILE__) . 'includes/class-angelleye-updater-deactivator.php';
AngellEYE_Updater_Deactivator::deactivate();
}
register_activation_hook(__FILE__, 'activate_angelleye_updater');
register_deactivation_hook(__FILE__, 'deactivate_angelleye_updater');
/**
* The core plugin class that is used to define internationalization,
* dashboard-specific hooks, and public-facing site hooks.
*/
require plugin_dir_path(__FILE__) . 'includes/class-angelleye-updater.php';
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 1.0.0
*/
function run_angelleye_updater() {
global $angeleye_updater;
$angeleye_updater = new AngellEYE_Updater(__FILE__);
$angeleye_updater->run();
}
add_action( 'plugins_loaded', 'angelleye_updater_load', 99 );
function angelleye_updater_load() {
run_angelleye_updater();
}