-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathloader.php
54 lines (43 loc) · 1.58 KB
/
loader.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
<?php
/**
* Plugin Name: DigitalOcean Spaces Sync
* Plugin URI: https://github.com/keeross/DO-Spaces-Wordpress-Sync
* Description: This WordPress plugin syncs your media library with DigitalOcean Spaces Container.
* Version: 1.0.8
* Author: keeross
* Author URI: https://github.com/keeross
* License: MIT
* Text Domain: dos
* Domain Path: /languages
*/
load_plugin_textdomain('dos', false, dirname(plugin_basename(__FILE__)) . '/lang');
function dos_incompatibile($msg) {
require_once ABSPATH . DIRECTORY_SEPARATOR . 'wp-admin' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'plugin.php';
deactivate_plugins(__FILE__);
wp_die($msg);
}
if ( is_admin() && ( !defined('DOING_AJAX') || !DOING_AJAX ) ) {
if ( version_compare(PHP_VERSION, '5.3.3', '<') ) {
dos_incompatibile(
__(
'Plugin DigitalOcean Spaces Sync requires PHP 5.3.3 or higher. The plugin has now disabled itself.',
'dos'
)
);
} elseif ( !function_exists('curl_version')
|| !($curl = curl_version()) || empty($curl['version']) || empty($curl['features'])
|| version_compare($curl['version'], '7.16.2', '<')
) {
dos_incompatibile(
__('Plugin DigitalOcean Spaces Sync requires cURL 7.16.2+. The plugin has now disabled itself.', 'dos')
);
} elseif (!($curl['features'] & CURL_VERSION_SSL)) {
dos_incompatibile(
__(
'Plugin DigitalOcean Spaces Sync requires that cURL is compiled with OpenSSL. The plugin has now disabled itself.',
'dos'
)
);
}
}
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'code.php';