forked from felixarntz/wp-encrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwp-encrypt.php
71 lines (67 loc) · 2.35 KB
/
wp-encrypt.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
<?php
/*
Plugin Name: WP Encrypt
Plugin URI: https://wordpress.org/plugins/wp-encrypt/
Description: Generate and manage SSL certificates for your WordPress sites for free with this Let's Encrypt client.
Version: 1.0.0-beta.7
Author: Felix Arntz
Author URI: https://leaves-and-love.net
License: GNU General Public License v3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: wp-encrypt
Network: true
Tags: lets encrypt, ssl, certificates, https, free ssl
*/
/**
* Plugin initialization file
*
* @package WPENC
* @author Felix Arntz <[email protected]>
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die();
}
if ( version_compare( phpversion(), '5.3.0' ) >= 0 && ! class_exists( 'WPENC\App' ) ) {
if ( file_exists( dirname( __FILE__ ) . '/wp-encrypt/vendor/autoload.php' ) ) {
require_once dirname( __FILE__ ) . '/wp-encrypt/vendor/autoload.php';
} elseif ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
require_once dirname( __FILE__ ) . '/vendor/autoload.php';
}
} elseif ( ! class_exists( 'LaL_WP_Plugin_Loader' ) ) {
if ( file_exists( dirname( __FILE__ ) . '/wp-encrypt/vendor/felixarntz/leavesandlove-wp-plugin-util/leavesandlove-wp-plugin-loader.php' ) ) {
require_once dirname( __FILE__ ) . '/wp-encrypt/vendor/felixarntz/leavesandlove-wp-plugin-util/leavesandlove-wp-plugin-loader.php';
} elseif ( file_exists( dirname( __FILE__ ) . '/vendor/felixarntz/leavesandlove-wp-plugin-util/leavesandlove-wp-plugin-loader.php' ) ) {
require_once dirname( __FILE__ ) . '/vendor/felixarntz/leavesandlove-wp-plugin-util/leavesandlove-wp-plugin-loader.php';
}
}
// Initialize the plugin through the plugin loader.
LaL_WP_Plugin_Loader::load_plugin( array(
'slug' => 'wp-encrypt',
'name' => 'WP Encrypt',
'version' => '1.0.0-beta.7',
'main_file' => __FILE__,
'namespace' => 'WPENC',
'textdomain' => 'wp-encrypt',
'use_language_packs' => true,
'network_only' => true,
), array(
'phpversion' => '5.3.0',
'wpversion' => '4.2',
'functions' => array(
'curl_init',
'curl_setopt',
'openssl_pkey_new',
'openssl_csr_new',
),
) );
/**
* Returns the WP Encrypt main class instance.
*
* @since 1.0.0
*
* @return WPENC\App|null The WP Encrypt instance or null if failed to initialize.
*/
function wpenc() {
return LaL_WP_Plugin_Loader::get_plugin( 'wp-encrypt' );
}