-
Notifications
You must be signed in to change notification settings - Fork 18
/
aspire-update.php
60 lines (52 loc) · 1.6 KB
/
aspire-update.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
<?php
/**
* AspireUpdate - Update plugins and themes for WordPress.
*
* @package aspire-update
* @author AspireUpdate
* @copyright AspireUpdate
* @license GPLv2
*
* Plugin Name: AspireUpdate
* Plugin URI: https://aspirepress.org/
* Description: Update plugins and themes for WordPress.
* Version: 0.5
* Author: AspirePress
* Author URI: https://docs.aspirepress.org/aspireupdate/
* Requires at least: 5.3
* Requires PHP: 7.4
* Tested up to: 6.7
* License: GPLv2
* License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
* Text Domain: AspireUpdate
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/aspirepress/AspireUpdate
* Primary Branch: main
*/
if ( ! defined( 'ABSPATH' ) ) {
die;
}
if ( ! defined( 'AP_VERSION' ) ) {
define( 'AP_VERSION', '0.5' );
}
add_action( 'plugins_loaded', 'define_constant' );
function define_constant() {
if ( ! defined( 'AP_PATH' ) ) {
define( 'AP_PATH', dirname( plugin_basename( __FILE__ ) ) );
}
}
require_once __DIR__ . '/includes/autoload.php';
add_action( 'plugins_loaded', 'aspire_update' );
function aspire_update() {
if ( ! defined( 'AP_RUN_TESTS' ) ) {
new AspireUpdate\Controller();
}
}
register_activation_hook( __FILE__, 'aspire_update_activation_hook' );
function aspire_update_activation_hook() {
register_uninstall_hook( __FILE__, 'aspire_update_uninstall_hook' );
}
function aspire_update_uninstall_hook() {
$admin_settings = AspireUpdate\Admin_Settings::get_instance();
$admin_settings->delete_all_settings();
}