first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,673 @@
<?php
defined( 'ABSPATH' ) or die( );
if ( ! class_exists( "rsssl_config" ) ) {
class rsssl_config {
private static $_this;
public $fields = array();
public $sections;
public $pages;
public $steps;
public $hosts;
public $warning_types;
public $yes_no;
public $supported_hosts;
public $not_local_certificate_hosts;
public $no_installation_renewal_needed;
public $dashboard_activation_required;
public $activated_by_default;
public $paid_only;
function __construct() {
define('RSSSL_LE_CONFIG_LOADED', true);
if ( isset( self::$_this ) ) {
wp_die( sprintf( '%s is a singleton class and you cannot create a second instance.',
get_class( $this ) ) );
}
self::$_this = $this;
/**
* Plesk requires local SSL generation, and installation renewal.
* Cpanel default requires local SSL generation, and installation renewal.
* Cpanel autossl: no local ssl generation, no renewal
*/
$this->hosts = array(
'cloudways' => array(
'name' => 'CloudWays',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => false,
'hosting_dashboard' => 'cloudways',
'api' => true,
'ssl_installation_link' => false,
),
'tierpoint' => array(
'name' => 'TierPoint',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => true,
'ssl_installation_link' => false,
),
'godaddy' => array(
'name' => 'GoDaddy',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => false,
),
'godaddy_managed' => array(
'name' => 'GoDaddy Managed WordPress',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => 'godaddymanaged',
'api' => false,
'ssl_installation_link' => false,
),
'kasserver' => array(
'name' => 'Kasserver',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'kasserver',
'api' => false,
'ssl_installation_link' => 'https://kas.all-inkl.com/',
),
'argeweb' => array(
'name' => 'Argeweb',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'plesk',
'api' => false,
'ssl_installation_link' => 'https://www.argeweb.nl/argecs/',
),
'hostgator' => array(
'name' => 'HostGator',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => true,
'hosting_dashboard' => 'cpanel:autossl',
'api' => true,
'ssl_installation_link' => 'https://{host}:2083/frontend/paper_lantern/security/tls_status/',
),
'ionos' => array(
'name' => 'IONOS',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'paid_only',
'hosting_dashboard' => 'ionos',
'api' => false,
'ssl_installation_link' => '',
),
'simply' => array(
'name' => 'Simply',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => false,
'api' => false,
'ssl_installation_link' => 'https://www.simply.com/en/controlpanel/sslcerts/',
),
'siteground' => array(
'name' => 'SiteGround',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => false,
'api' => false,
'ssl_installation_link' => 'https://tools.siteground.com/ssl',
),
'dreamhost' => array(
'name' => 'Dreamhost',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => false,
'api' => false,
'ssl_installation_link' => 'https://help.dreamhost.com/hc/en-us/articles/216539548-Adding-a-free-Let-s-Encrypt-certificate',
),
'wpengine' => array(
'name' => 'WPEngine',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => false,
'api' => false,
'ssl_installation_link' => 'https://wpengine.com/support/add-ssl-site/#letsencrypt',
),
'ipage' => array(
'name' => 'iPage',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => false,
'api' => false,
'ssl_installation_link' => 'https://www.ipage.com/help/article/enable-your-free-ssl-certificate',
),
'onecom' => array(
'name' => 'one.com',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => false,
'api' => false,
'ssl_installation_link' => 'https://help.one.com/hc/en-us/articles/360000297458-Why-is-SSL-HTTPS-not-working-on-my-site-',
),
'wpmudev' => array(
'name' => 'WPMUDEV',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => false,
'api' => false,
'ssl_installation_link' => 'https://wpmudev.com',
),
'ovh' => array(
'name' => 'OVH',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => 'https://ovh.com',
),
'bluehost' => array(
'name' => 'BlueHost',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => 'https://www.bluehost.com/help/article/how-to-activate-a-free-wordpress-ssl',
),
'freeola' => array(
'name' => 'Freeola',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'paid_only',
'hosting_dashboard' => 'freeola',
'api' => false,
'ssl_installation_link' => '',
),
'hostinger' => array(
'name' => 'Hostinger',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'hpanel',
'api' => false,
'ssl_installation_link' => 'https://hpanel.hostinger.com/hosting/{domain}advanced/ssl',
),
'pcextreme' => array(
'name' => 'PCExtreme',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => 'directadmin',
'api' => false,
'ssl_installation_link' => 'https://help.pcextreme.nl/domains-ssl/hoe-vraag-ik-een-ssl-certificaat-aan-voor-mijn-domein/',
),
'internic' => array(
'name' => 'Internic',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => 'internic',
'api' => false,
'ssl_installation_link' => 'https://internic.com',
),
'aruba' => array(
'name' => 'Aruba',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'paid_only',
'hosting_dashboard' => 'aruba',
'api' => false,
'ssl_installation_link' => 'https://admin.aruba.it/PannelloAdmin/UI/Pages/ContentSection.aspx?Action=153',
),
'namecheap' => array(
'name' => 'Namecheap',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => 'https://www.namecheap.com/blog/install-free-ssls/',
),
'hostpapa' => array(
'name' => 'Hostpapa',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => false,
),
'webcom' => array(
'name' => 'web.com',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'paid_only',
'hosting_dashboard' => 'web.com',
'api' => false,
'ssl_installation_link' => false,
),
'crazydomains' => array(
'name' => 'Crazydomains',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'paid_only',
'hosting_dashboard' => 'crazydomains',
'api' => false,
'ssl_installation_link' => false,
),
'strato' => array(
'name' => 'Strato',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'plesk',
'api' => false,
'ssl_installation_link' => false,
),
'inmotion' => array(
'name' => 'Inmotion',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => 'https://www.inmotionhosting.com/support/website/ssl/auto-ssl-guide/',
),
'flywheel' => array(
'name' => 'Flywheel',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'flywheel',
'api' => false,
'ssl_installation_link' => 'https://getflywheel.com/why-flywheel/simple-ssl/',
),
'kinsta' => array(
'name' => 'Kinsta',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'mykinsta',
'api' => false,
'ssl_installation_link' => false,
),
'pressable' => array(
'name' => 'Pressable',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'paid_only',
'hosting_dashboard' => 'pressable',
'api' => false,
'ssl_installation_link' => false,
),
'wpx' => array(
'name' => 'WPX',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'wpx',
'api' => false,
'ssl_installation_link' => false,
),
'greengeeks' => array(
'name' => 'Greengeeks',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'greengeeks',
'api' => false,
'ssl_installation_link' => 'https://www.greengeeks.com/support/article/getting-started-adding-lets-encrypt-ssl-greengeeks-account/',
),
'liquidweb' => array(
'name' => 'Liquidweb',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => false,
),
'profreehost' => array(
'name' => 'Profreehost',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => 'https://profreehost.com/support/ssl-https/how-to-install-an-ssl-certificate/',
),
'hostdash' => array(
'name' => 'Hostdash',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => false,
),
'byethost' => array(
'name' => 'Byethost',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => 'byethost',
'api' => false,
'ssl_installation_link' => false,
),
'site5' => array(
'name' => 'Site5',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'paid_only',
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => '',
),
'epizy' => array(
'name' => 'Epizy',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => '',
),
'infinityfree' => array(
'name' => 'Infinityfree',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => '',
),
'gandi' => array(
'name' => 'Gandi',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'gandi',
'api' => false,
'ssl_installation_link' => false,
),
'contabo' => array(
'name' => 'Contabo',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => true,
'hosting_dashboard' => 'cpanel:autossl',
'api' => true,
'ssl_installation_link' => 'https://{host}:2083/frontend/paper_lantern/security/tls_status/',
),
'earthlink' => array(
'name' => 'Earthlink',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => true,
'ssl_installation_link' => false,
),
'hostway' => array(
'name' => 'Hostway',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => false,
),
'beget' => array(
'name' => 'Beget',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'beget',
'api' => false,
'ssl_installation_link' => false,
),
'fatcow' => array(
'name' => 'Fatcow',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'fatcow',
'api' => false,
'ssl_installation_link' => false,
),
'ventraip' => array(
'name' => 'Ventraip',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activated_by_default',
'hosting_dashboard' => 'cpanel:autossl',
'api' => false,
'ssl_installation_link' => 'https://{host}:2083/frontend/paper_lantern/security/tls_status/',
),
'namescouk' => array(
'name' => 'Names.co.uk',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => false,
),
'mediatemple' => array(
'name' => 'Mediatemple',
'installation_renewal_required' => true,
'local_ssl_generation_needed' => true,
'free_ssl_available' => false,
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => false,
),
'digitalocean' => array(
'name' => 'Digitalocean',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'digitalocean',
'api' => false,
'ssl_installation_link' => 'https://docs.digitalocean.com/products/accounts/security/certificates/',
),
'fisthost' => array(
'name' => 'Fisthost',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'fisthost',
'api' => false,
'ssl_installation_link' => 'https://my.fisthost.com/knowledgebase/6/How-do-I-activate-my-free-SSL.html',
),
'register' => array(
'name' => 'register.lk',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'paid_only',
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => '',
),
'fasthosts' => array(
'name' => 'Fasthosts',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'cpanel',
'api' => false,
'ssl_installation_link' => false,
),
'upress' => array(
'name' => 'Upress',
'installation_renewal_required' => false,
'local_ssl_generation_needed' => false,
'free_ssl_available' => 'activation_required',
'hosting_dashboard' => 'false',
'api' => false,
'ssl_installation_link' => 'https://support.upress.io',
),
);
$this->not_local_certificate_hosts = $this->filter_hosts( 'local_ssl_generation_needed', false);
$this->dashboard_activation_required = $this->filter_hosts( 'free_ssl_available', 'activation_required');
$this->activated_by_default = $this->filter_hosts( 'free_ssl_available', 'activated_by_default');
$this->paid_only = $this->filter_hosts( 'free_ssl_available', 'paid_only');
$this->no_installation_renewal_needed = $this->filter_hosts( 'installation_renewal_required', false);
$this->no_installation_renewal_needed[] = 'cpanel:autossl';
$this->yes_no = array(
'yes' => __( 'Yes', 'really-simple-ssl' ),
'no' => __( 'No', 'really-simple-ssl' ),
);
ksort($this->hosts);
$this->supported_hosts = array(
'none' => __('I don\'t know, or not listed, proceed with installation', 'really-simple-ssl'),
);
$this->supported_hosts = $this->supported_hosts + wp_list_pluck($this->hosts, 'name');
/* config files
Load only on lets encrypt generation pages, or during cron.
*/
if ( rsssl_letsencrypt_generation_allowed(true) ) {
require_once( rsssl_le_path . 'wizard/config/steps.php' );
require_once( rsssl_le_path . 'wizard/config/questions.php' );
/**
* Preload fields with a filter, to allow for overriding types
*/
add_action( 'plugins_loaded', array( $this, 'preload_init' ), 10 );
/**
* The integrations are loaded with priority 10
* Because we want to initialize after that, we use 15 here
*/
add_action( 'plugins_loaded', array( $this, 'init' ), 15 );
}
}
static function this() {
return self::$_this;
}
/**
* @param array $array
* @param mixed $filter_value
* @param mixed $filter_key
*
* @return array
*/
public function filter_hosts( $filter_key, $filter_value){
return array_keys(array_filter($this->hosts, function ($var) use ($filter_value, $filter_key) {
return ($var[$filter_key] == $filter_value);
}) );
}
/**
* @param string | bool $type
*
* @return bool
*/
public function host_api_supported( $type ) {
$hosting_company = rsssl_get_other_host();
//if not listed, we assume it can.
if ( !$hosting_company || $hosting_company === 'none' ) {
return true;
}
$hosts_has_dashboard = RSSSL_LE()->config->filter_hosts( 'api', $type);
if ( in_array($hosting_company, $hosts_has_dashboard) ) {
return true;
} else {
return false;
}
}
public function fields(
$page = false, $step = false, $section = false,
$get_by_fieldname = false
) {
$output = array();
$fields = $this->fields;
if ( $page ) {
$fields = rsssl_array_filter_multidimensional( $this->fields,
'source', $page );
}
foreach ( $fields as $fieldname => $field ) {
if ( $get_by_fieldname && $fieldname !== $get_by_fieldname ) {
continue;
}
if ( $step ) {
if ( $section && isset( $field['section'] ) ) {
if ( ( $field['step'] == $step
|| ( is_array( $field['step'] )
&& in_array( $step, $field['step'] ) ) )
&& ( $field['section'] == $section )
) {
$output[ $fieldname ] = $field;
}
} else {
if ( ( $field['step'] == $step )
|| ( is_array( $field['step'] )
&& in_array( $step, $field['step'] ) )
) {
$output[ $fieldname ] = $field;
}
}
}
if ( ! $step ) {
$output[ $fieldname ] = $field;
}
}
return $output;
}
public function has_sections( $page, $step ) {
if ( isset( $this->steps[ $page ][ $step ]["sections"] ) ) {
return true;
}
return false;
}
public function preload_init(){
$this->fields = apply_filters( 'rsssl_fields_load_types', $this->fields );
$this->steps = apply_filters( 'rsssl_steps', $this->steps );
}
public function init() {
$this->fields = apply_filters( 'rsssl_fields', $this->fields );
}
}
} //class closure

View File

@@ -0,0 +1,347 @@
<?php
defined( 'ABSPATH' ) or die( );
/*
* condition: if a question should be dynamically shown or hidden, depending on another answer. Use NOT answer to hide if not answer.
* callback_condition: if should be shown or hidden based on an answer in another screen.
* callback roept action rsssl_$page_$callback aan
* required: verplicht veld.
* help: helptext die achter het veld getoond wordt.
"fieldname" => '',
"type" => 'text',
"required" => false,
'default' => '',
'label' => '',
'table' => false,
'callback_condition' => false,
'condition' => false,
'callback' => false,
'placeholder' => '',
'optional' => false,
* */
$this->fields = $this->fields + array(
'system_status' => array(
'step' => 1,
'section' => 1,
'source' => 'lets-encrypt',
'callback' => 'system-status.php',
),
'email_address' => array(
'step' => 2,
'section' => 1,
'source' => 'lets-encrypt',
'type' => 'email',
'default' => get_option('admin_email'),
'tooltip' => __( "This email address will used to create a Let's Encrypt account. This is also where you will receive renewal notifications.", 'really-simple-ssl' ),
'tooltip-position' => 'title',
'label' => __( "Email address", 'really-simple-ssl' ),
'sublabel' => __("This field is prefilled based on your configuration", 'really-simple-ssl'),
'required' => true,
),
'accept_le_terms' => array(
'step' => 2,
'section' => 1,
'source' => 'lets-encrypt',
'type' => 'checkbox',
'default' => '',
'required' => true,
'title' => __('Terms & Conditions',"really-simple-ssl"),
'option_text' => sprintf(__("I agree to the Let's Encrypt %sTerms & Conditions%s", 'really-simple-ssl'),'<a target="_blank" href="https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf">','</a>'),
),
'disable_ocsp' => array(
'step' => 2,
'section' => 1,
'source' => 'lets-encrypt',
'type' => 'checkbox',
'default' => '',
'help' => __( "OCSP stapling should be enabled by default. You can disable if this is not supported by your hosting provider.","really-simple-ssl").rsssl_read_more('https://really-simple-ssl.com/ocsp-stapling'),
'title' => __('OCSP Stapling',"really-simple-ssl"),
'option_text' => __("Disable OCSP Stapling", 'really-simple-ssl'),
),
'domain' => array(
'step' => 2,
'section' => 1,
'source' => 'lets-encrypt',
'type' => 'text',
'default' => rsssl_get_domain(),
'label' => __( "Domain", 'really-simple-ssl' ),
'sublabel' => __("This field is prefilled based on your configuration", 'really-simple-ssl'),
'required' => false,
'disabled' => true,
),
'include_alias' => array(
'step' => 2,
'section' => 1,
'source' => 'lets-encrypt',
'type' => 'checkbox',
'default' => '',
'tooltip' => __( "This will include both the www. and non-www. version of your domain.", "really-simple-ssl").' '.__("You should have the www domain pointed to the same website as the non-www domain.", 'really-simple-ssl' ),
'tooltip-position' => 'after',
'option_text' => __("Include alias domain too?", 'really-simple-ssl'),
'callback_condition' => array(
'NOT rsssl_is_subdomain',
'NOT rsssl_wildcard_certificate_required',
)
),
'other_host_type' => array(
'step' => 2,
'section' => 1,
'source' => 'lets-encrypt',
'type' => 'select',
'tooltip' => __( "By selecting your hosting provider we can tell you if your hosting provider already supports free SSL, and how you can activate it.", "really-simple-ssl"),
'options' => $this->supported_hosts,
'help' => __( "By selecting your hosting provider we can tell you if your hosting provider already supports free SSL, and/or where you can activate it.","really-simple-ssl")."&nbsp;".
sprintf(__("If your hosting provider is not listed, and there's an SSL activation/installation link, please let us %sknow%s.","really-simple-ssl"),'<a target="_blank" href="https://really-simple-ssl.com/install-ssl-certificate/#hostingdetails">','</a>'),
'default' => false,
'label' => __( "Hosting provider", 'really-simple-ssl' ),
'required' => true,
'disabled' => false,
),
'cpanel_host' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'text',
'default' => '',
'label' => __( "CPanel host", 'really-simple-ssl' ),
'help' => __( "The URL you use to access your cPanel dashboard. Ends on :2083.", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_is_cpanel',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
)
),
'cpanel_username' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'text',
'default' => '',
'label' => __( "CPanel username", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_cpanel_api_supported',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
)
),
'cpanel_password' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'password',
'default' => '',
'label' => __( "CPanel password", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_cpanel_api_supported',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
) ),
'directadmin_host' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'text',
'default' => '',
'label' => __( "DirectAdmin host", 'really-simple-ssl' ),
'help' => __( "The URL you use to access your DirectAdmin dashboard. Ends on :2222.", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_is_directadmin',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
)
),
'directadmin_username' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'text',
'default' => '',
'label' => __( "DirectAdmin username", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_is_directadmin',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
)
),
'directadmin_password' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'password',
'default' => '',
'label' => __( "DirectAdmin password", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_is_directadmin',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
)
),
'cloudways_user_email' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'text',
'default' => '',
'placeholder' => 'email@email.com',
'label' => __( "CloudWays user email", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'other_host_type' => 'cloudways'
),
),
'cloudways_api_key' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'password',
'default' => '',
'label' => __( "CloudWays api key", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'comment' => sprintf(__("You can find your api key %shere%s (make sure you're logged in with your main account).","really-simple-ssl"),'<a target="_blank" href="https://platform.cloudways.com/api">','</a>'),
'callback_condition' => array(
'other_host_type' => 'cloudways'
)
),
'plesk_host' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'text',
'default' => '',
'label' => __( "Plesk host", 'really-simple-ssl' ),
'help' => __( "The URL you use to access your Plesk dashboard. Ends on :8443.", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_is_plesk',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
)
),
'plesk_username' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'text',
'default' => '',
'label' => __( "Plesk username", 'really-simple-ssl' ),
'help' => sprintf(__( "You can find your Plesk username and password in %s", 'really-simple-ssl' ),'https://{your-plesk-host-name}:8443/smb/my-profile'),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_is_plesk',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
)
),
'plesk_password' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'password',
'default' => '',
'label' => __( "Plesk password", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_is_plesk',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
)
),
'store_credentials' => array(
'step' => 2,
'section' => 2,
'source' => 'lets-encrypt',
'type' => 'checkbox',
'default' => '',
'title' => __( "Credentials storage", 'really-simple-ssl' ),
'option_text' => __( "Store for renewal purposes. If not stored, renewal may need to be done manually.", 'really-simple-ssl' ),
'required' => false,
'disabled' => false,
'callback_condition' => array(
'rsssl_uses_known_dashboard',
'NOT rsssl_activated_by_default',
'NOT rsssl_activation_required',
'NOT rsssl_paid_only',
),
),
'directories' => array(
'step' => 3,
'section' => 1,
'source' => 'lets-encrypt',
'callback' => 'directories.php',
'callback_condition' => 'rsssl_do_local_lets_encrypt_generation'
),
'dns-verification' => array(
'step' => 4,
'section' => 1,
'source' => 'lets-encrypt',
'callback' => 'dns-verification.php',
'callback_condition' => 'rsssl_dns_verification_required'
),
'generation' => array(
'step' => 5,
'section' => 1,
'source' => 'lets-encrypt',
'callback' => 'generation.php',
'callback_condition' => 'rsssl_do_local_lets_encrypt_generation'
),
'installation' => array(
'step' => 6,
'section' => 1,
'source' => 'lets-encrypt',
'callback' => 'installation.php',
),
'activate_ssl' => array(
'step' => 7,
'source' => 'lets-encrypt',
'callback' => 'activate.php',
),
);

View File

@@ -0,0 +1,166 @@
<?php
defined( 'ABSPATH' ) or die( );
$this->steps = array(
'lets-encrypt' =>
array(
1 => array(
"id" => "system-status",
"title" => __( "System Status", 'really-simple-ssl' ),
"intro" => __( "Detected status of your setup.", "really-simple-ssl" ),
'actions' => array(
array(
'description' => __("Checking PHP version...", "really-simple-ssl"),
'action'=> 'rsssl_php_requirement_met',
'attempts' => 1,
),
array(
'description' => __("Checking SSL certificate...", "really-simple-ssl"),
'action'=> 'certificate_status',
'attempts' => 1,
),
array(
'description' => __("Checking if CURL is available...", "really-simple-ssl"),
'action'=> 'curl_exists',
'attempts' => 1,
),
array(
'description' => __("Checking server software...", "really-simple-ssl"),
'action'=> 'server_software',
'attempts' => 1,
),
array(
'description' => __("Checking alias domain...", "really-simple-ssl"),
'action'=> 'alias_domain_available',
'attempts' => 3,
),
array(
'description' => __("Checking for website configuration...", "really-simple-ssl"),
'action'=> 'check_domain',
'attempts' => 1,
),
),
),
2 => array(
"id" => "domain",
"title" => __( "General settings", 'really-simple-ssl' ),
'intro' => '<p>'.
sprintf(__('We have tried to make our Wizard as simple and fast as possible. Although these questions are all necessary, if theres any way you think we can improve the plugin, please let us %sknow%s!', 'really-simple-ssl'),'<a target="_blank" href="https://really-simple-ssl.com/contact">', '</a>').
sprintf(__(' Please note that you can always save and finish the wizard later, use our %sdocumentation%s for additional information or log a %ssupport ticket%s if you need our assistance.', 'really-simple-ssl'),'<a target="_blank" href="https://really-simple-ssl.com/knowledge-base/generate-your-free-ssl-certificate/">', '</a>','<a target="_blank" href="https://wordpress.org/support/plugin/really-simple-ssl/">', '</a>').'</p>',
'sections' => array (
1 => array(
'title' => __( 'Domain', 'really-simple-ssl' ),
'intro' => __( 'Letʼs Encrypt is a free, automated and open certificate authority brought to you by the nonprofit Internet Security Research Group (ISRG).', 'really-simple-ssl' ). rsssl_read_more( 'https://really-simple-ssl.com/about-lets-encrypt/' ),
),
2 => array(
'title' => __( 'Hosting', 'really-simple-ssl' ),
'intro' => __( 'Below you will find the instructions for different hosting environments and configurations. If you start the process with the necessary instructions and credentials the next few steps will be done in no time.', 'really-simple-ssl'),
),
),
'actions' => array(),
),
3 => array(
"id" => "directories",
"title" => __( "Directories", 'really-simple-ssl' ),
'actions' => array(
array(
'description' => __("Checking host...", "really-simple-ssl"),
'action'=> 'check_host',
'attempts' => 1,
'speed' => 'normal',
),
array(
'description' => __("Checking challenge directory...", "really-simple-ssl"),
'action'=> 'check_challenge_directory',
'attempts' => 1,
'speed' => 'normal',
),
array(
'description' => __("Checking key directory...", "really-simple-ssl"),
'action'=> 'check_key_directory',
'attempts' => 2,
'speed' => 'normal',
),
array(
'description' => __("Checking certs directory...", "really-simple-ssl"),
'action'=> 'check_certs_directory',
'attempts' => 1,
'speed' => 'normal',
),
array(
'description' => __("Checking permissions...", "really-simple-ssl"),
'action'=> 'check_writing_permissions',
'attempts' => 1,
'speed' => 'normal',
),
array(
'description' => __("Checking challenge directory reachable over http...", "really-simple-ssl"),
'action'=> 'challenge_directory_reachable',
'attempts' => 1,
'speed' => 'normal',
),
),
),
4 => array(
"id" => "dns-verification",
"title" => __( "DNS Verification", 'really-simple-ssl' ),
'actions' => array(
array(
'description' => __("Creating account...", "really-simple-ssl"),
'action'=> 'get_account',
'attempts' => 5,
'speed' => 'normal',
),
array(
'description' => __("Retrieving DNS verification token...", "really-simple-ssl"),
'action'=> 'get_dns_token',
'attempts' => 5,
'speed' => 'normal',
),
),
),
5 => array(
"id" => "generation",
"title" => __( "Generation", 'really-simple-ssl' ),
"intro" => __( "We will now generate your SSL Certificate", "really-simple-ssl" ),
'actions' => array(
array(
'description' => __("Checking if Terms & Conditions are accepted...", "really-simple-ssl"),
'action'=> 'terms_accepted',
'attempts' => 1,
'speed' => 'normal',
),
array(
'description' => __("Creating account...", "really-simple-ssl"),
'action'=> 'get_account',
'attempts' => 5,
'speed' => 'normal',
),
array(
'description' => __("Generating SSL certificate...", "really-simple-ssl"),
'action'=> 'create_bundle_or_renew',
'attempts' => 5,
'speed' => 'normal',
),
),
),
6 => array(
"id" => "installation",
"title" => __( "Installation", 'really-simple-ssl' ),
'actions' => array(
array(
'description' => __("Searching for link to SSL installation page on your server...", "really-simple-ssl"),
'action'=> 'search_ssl_installation_url',
'attempts' => 1,
'speed' => 'normal',
),
),
),
7 => array(
"id" => "activation",
"title" => __( "Activate SSL", 'really-simple-ssl' ),
'actions' => array(),
),
),
);