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,77 @@
<?php
defined( 'ABSPATH' ) or die();
do_action('rsssl_le_activation');
//non cached SSL check.
$response = RSSSL_LE()->letsencrypt_handler->certificate_status();
$certificate_is_valid = $response->status === 'error';
$already_enabled = RSSSL()->really_simple_ssl->ssl_enabled;
$already_done = $certificate_is_valid && $already_enabled;
if ($already_done) {?>
<div class="rsssl-section">
<h2>
<?php _e("Your site is secured with a valid SSL certificate!", "really-simple-ssl") . RSSSL()->rsssl_help->get_help_tip(__("In some cases it takes a few minutes for the certificate to get detected. In that case, check back in a few minutes.", "really-simple-ssl") ); ?>
</h2>
<?php
_e("If you just activated SSL, please check for: ", 'really-simple-ssl'); ?>
<p>
<ul>
<li class="rsssl-warning"><?php _e('Http references in your .css and .js files: change any http:// into https://', 'really-simple-ssl'); ?></li>
<li class="rsssl-warning"><?php _e('Images, stylesheets or scripts from a domain without an SSL certificate: remove them or move to your own server.', 'really-simple-ssl'); ?></li>
<li class="rsssl-success"><?php _e("SSL was already activated on your website!", "really-simple-ssl") ?></li>
</ul>
</p>
<p><?php
if (!defined('rsssl_pro_version')) {
_e('You can also let the automatic scan of the pro version handle this for you, and get premium support, increased security with HSTS and more!', 'really-simple-ssl');
?>
<a target="_blank"
href="<?php
echo RSSSL()->really_simple_ssl->pro_url; ?>"><?php _e("Check out Really Simple SSL Pro", "really-simple-ssl");
}
?>
</a>
</p>
</div>
<?php } else { ?>
<div class="rsssl-section">
<h2>
<?php _e("Almost ready to activate SSL!", "really-simple-ssl") . RSSSL()->rsssl_help->get_help_tip(__("In some cases it takes a few minutes for the certificate to get detected. In that case, check back in a few minutes.", "really-simple-ssl") ); ?>
</h2>
<?php
_e("Before you migrate, please check for: ", 'really-simple-ssl'); ?>
<p>
<ul>
<li class="rsssl-warning"><?php _e('Http references in your .css and .js files: change any http:// into https://', 'really-simple-ssl'); ?></li>
<li class="rsssl-warning"><?php _e('Images, stylesheets or scripts from a domain without an SSL certificate: remove them or move to your own server.', 'really-simple-ssl'); ?></li><?php
$backup_link = "https://really-simple-ssl.com/knowledge-base/backing-up-your-site/";
$link_open = '<a target="_blank" href="'.$backup_link.'">';
$link_close = '</a>';
?>
<li class="rsssl-warning"><?php printf(__("We strongly recommend to create a %sbackup%s of your site before activating SSL", 'really-simple-ssl'), $link_open, $link_close); ?> </li>
<li class="rsssl-warning"><?php _e("You may need to login in again.", "really-simple-ssl") ?></li>
<?php if ($certificate_is_valid) { ?>
<li class="rsssl-success"><?php _e("An SSL certificate has been detected", "really-simple-ssl") ?></li>
<?php } else { ?>
<li class="rsssl-error"><?php _e("No SSL certificate has been detected yet. In some cases this takes a few minutes.", "really-simple-ssl") ?></li>
<?php }?>
</ul>
</p>
<p><?php
if (!defined('rsssl_pro_version')) {
_e('You can also let the automatic scan of the pro version handle this for you, and get premium support, increased security with HSTS and more!', 'really-simple-ssl');
?>
<a target="_blank"
href="<?php
echo RSSSL()->really_simple_ssl->pro_url; ?>"><?php _e("Check out Really Simple SSL Pro", "really-simple-ssl");
}
?>
</a>
</p>
</div>
<?php } ?>

View File

@@ -0,0 +1,10 @@
<?php defined( 'ABSPATH' ) or die( );?>
<div class="rsssl-wizard-wrap" id="rsssl-wizard">
<?php //this header is a placeholder to ensure notices do not end up in the middle of our code ?>
<h1 class="rsssl-notice-hook-element"></h1>
<div id="rsssl-{page}">
<div id="rsssl-content-area">
{content}
</div>
</div>
</div>

View File

@@ -0,0 +1,41 @@
<?php defined( 'ABSPATH' ) or die( );?>
<div class="rsssl-section-content">
<?php
$hide = isset( $_POST['rsssl-save']) ? 'rsssl-settings-saved--fade-in': ''; ?>
<div class="rsssl-settings-saved <?php echo $hide?>">
<div class="rsssl-settings-saved__text_and_icon">
<span><div class="rsssl-tooltip-icon dashicons-before rsssl-icon rsssl-success check"><svg width="18" height="18" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z"></path></svg></div></span>
<span><?php _e('Changes saved successfully', 'really-simple-ssl') ?> </span>
</div>
</div>
<form action="{page_url}" method="POST">
<input type="hidden" value="{step}" name="step">
<input type="hidden" value="{section}" name="section">
<?php wp_nonce_field( 'rsssl_save', 'rsssl_le_nonce' ); ?>
<div class="rsssl-wizard-title rsssl-section-content-title-header">
<h1>{title}</h1>
<span>
<a class="rsssl-reset" onclick="return confirm('<?php _e("This will clear all settings for Really Simple SSL Let\'s Encrypt, and will clear the order in the ssl/keys directory.","really-simple-ssl")?>');" href="<?php echo esc_url(add_query_arg(array("page"=>"rlrsssl_really_simple_ssl", 'tab'=>"letsencrypt", "reset-letsencrypt" => 1),admin_url("options-general.php") ) );?>"><?php _e("Reset Let's Encrypt","really-simple-ssl")?></a>
</span>
</div>
<div class="rsssl-wizard-title rsssl-section-content-notifications-header">
<h1><?php _e("Notifications", 'really-simple-ssl')?></h1>
</div>
{intro}
<!-- before do action -->
<?php do_action("rsssl_le_installation_step" ); ?>
<!-- after do action -->
{fields}
<div class="rsssl-section-footer">
{save_notice}
<div class="rsssl-buttons-container">
{previous_button}
{save_button}
{next_button}
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,83 @@
<?php
defined( 'ABSPATH' ) or die( );
rsssl_progress_add('directories');
?>
<div class="rsssl-section">
<div class="rsssl-hidden rsssl-general rsssl-show-on-error">
<h2>
<?php _e("Next step", "really-simple-ssl"); ?>
</h2>
</div>
<div class="rsssl-hidden rsssl-check_challenge_directory rsssl-challenge_directory_reachable rsssl-show-on-warning rsssl-show-on-error">
<p>
<?php _e("If the challenge directory cannot be created, or is not reachable, you can either remove the server limitation, or change to DNS verification.", "really-simple-ssl"); ?>
</p><br>
<button class="button button-default" name="rsssl-switch-to-dns"><?php _e("Switch to DNS verification", "really-simple-ssl"); ?></button>
</div>
<div class="rsssl-hidden rsssl-check_challenge_directory rsssl-show-on-error">
<h2>
<?php _e("Create a challenge directory", "really-simple-ssl")
. RSSSL()->rsssl_help->get_help_tip(__("The challenge directory is used to verify the domain ownership.", "really-simple-ssl") ); ?>
</h2>
<p>
<?php _e("Navigate in FTP or File Manager to the root of your WordPress installation:", "really-simple-ssl"); ?>
</p>
<ul>
<li class="rsssl-tooltip-icon dashicons-before rsssl-icon arrow-right-alt2 dashicons-arrow-right-alt2">
<?php _e('Create a folder called “.well-known”', 'really-simple-ssl'); ?>
</li>
<li class="rsssl-tooltip-icon dashicons-before rsssl-icon arrow-right-alt2 dashicons-arrow-right-alt2">
<?php _e('Inside the folder called “.well-known” create a new folder called “acme-challenge”, with 644 writing permissions.', 'really-simple-ssl'); ?>
</li>
<li class="rsssl-tooltip-icon dashicons-before rsssl-icon arrow-right-alt2 dashicons-arrow-right-alt2">
<?php _e('Click the refresh button.', 'really-simple-ssl'); ?>
</li>
</ul>
<h2>
<?php _e("Or you can switch to DNS verification", "really-simple-ssl"); ?>
</h2>
<p><?php _e("If the challenge directory cannot be created, you can either remove the server limitation, or change to DNS verification.", "really-simple-ssl"); ?></p><br>
<button class="button button-default" name="rsssl-switch-to-dns"><?php _e("Switch to DNS verification", "really-simple-ssl"); ?></button>
</div><div class="rsssl-hidden rsssl-check_key_directory rsssl-show-on-error">
<h3>
<?php _e("Create a key directory", "really-simple-ssl")
. RSSSL()->rsssl_help->get_help_tip(__("The key directory is needed to store the generated keys.","really-simple-ssl").' '.__("By placing it outside the root folder, it is not accessible over the internet.", "really-simple-ssl") ); ?>
</h3>
<p>
<?php _e("Navigate in FTP or File Manager to one level above the root of your WordPress installation:", "really-simple-ssl"); ?>
</p>
<ul>
<li class="rsssl-tooltip-icon dashicons-before rsssl-icon arrow-right-alt2 dashicons-arrow-right-alt2">
<?php _e('Create a folder called “ssl”', 'really-simple-ssl'); ?>
</li>
<li class="rsssl-tooltip-icon dashicons-before rsssl-icon arrow-right-alt2 dashicons-arrow-right-alt2">
<?php _e('Inside the folder called “ssl” create a new folder called “keys”, with 644 writing permissions.', 'really-simple-ssl'); ?>
</li>
<li class="rsssl-tooltip-icon dashicons-before rsssl-icon arrow-right-alt2 dashicons-arrow-right-alt2">
<?php _e('Click the refresh button.', 'really-simple-ssl'); ?>
</li>
</ul>
</div><div class="rsssl-hidden rsssl-check_certs_directory rsssl-show-on-error">
<h2>
<?php _e("Create a certs directory", "really-simple-ssl")
. RSSSL()->rsssl_help->get_help_tip(__("The certificate will get stored in this directory.", "really-simple-ssl").' '.__("By placing it outside the root folder, it is not accessible over the internet.", "really-simple-ssl") ); ?>
</h2>
<p>
<?php _e("Navigate in FTP or File Manager to one level above the root of your WordPress installation:", "really-simple-ssl"); ?>
</p>
<ul>
<li class="rsssl-tooltip-icon dashicons-before rsssl-icon arrow-right-alt2 dashicons-arrow-right-alt2">
<?php _e('Create a folder called “ssl”', 'really-simple-ssl'); ?>
</li>
<li class="rsssl-tooltip-icon dashicons-before rsssl-icon arrow-right-alt2 dashicons-arrow-right-alt2">
<?php _e('Inside the folder called “ssl” create a new folder called “certs”, with 644 writing permissions.', 'really-simple-ssl'); ?>
</li>
<li class="rsssl-tooltip-icon dashicons-before rsssl-icon arrow-right-alt2 dashicons-arrow-right-alt2">
<?php _e('Click the refresh button.', 'really-simple-ssl'); ?>
</li>
</ul>
</div>
</div>

View File

@@ -0,0 +1,30 @@
<?php
defined( 'ABSPATH' ) or die( );
rsssl_progress_add('dns-verification');
?>
<div class="rsssl-section">
<div class="rsssl-hidden rsssl-get_dns_token rsssl-show-on-success">
<h2><?php _e("Next step", "really-simple-ssl"); ?></h2>
<p><?php echo __("Add the following token as text record to your DNS records. We recommend to use a short TTL during installation, in case you need to change it.", "really-simple-ssl").
rsssl_read_more("https://really-simple-ssl.com/how-to-add-a-txt-record-to-dns/"); ?></p>
<div id="rsssl-dns-text-records"></div>
<script>
jQuery(document).ready(function ($) {
$(document).on("rsssl_le_response", rsssl_dns_data_handler);
function rsssl_dns_data_handler(response) {
if (response.detail.status==='success') {
var tokens = JSON.parse(response.detail.output);
for (var identifier in tokens) {
if (tokens.hasOwnProperty(identifier)) {
var token = tokens[identifier];
var inputField = '<div class="rsssl-dns-label" >@/<?php _e("domain","really-simple-ssl") ?></div><div class="rsssl-dns-field rsssl-selectable">_acme-challenge.'+identifier+'</div>';
inputField += '<div class="rsssl-dns-label" ><?php _e("Value","really-simple-ssl") ?></div><div class="rsssl-dns-field rsssl-selectable">'+token+'</div>';
$("#rsssl-dns-text-records").append(inputField);
}
}
}
}
});
</script>
</div>
</div>

View File

@@ -0,0 +1,18 @@
<?php defined( 'ABSPATH' ) or die(); ?>
<div class="rsssl-section">
<div class="rsssl-template-intro">
<p>
</p>
</div>
<div class="rsssl-hidden rsssl-verify_dns rsssl-show-on-warning">
<p><?php _e("We could not check the DNS records. If you just added the record, please check in a few minutes.","really-simple-ssl")?>&nbsp;
<?php printf(__("You can manually check the DNS records in an %sonline tool%s.","really-simple-ssl"),'<a target="_blank" href="https://mxtoolbox.com/SuperTool.aspx">','</a>')?>
<?php _e("If you're sure it's set correctly, you can click the button to skip the DNS check.","really-simple-ssl")?>&nbsp;
</p>
<br>
<input class="button button-default" type="submit" value="<?php _e("Skip DNS check",'really-simple-ssl')?>" name="rsssl-skip-dns-check">
</div>
</div>

View File

@@ -0,0 +1,49 @@
<?php
defined( 'ABSPATH' ) or die();
?>
<div class="rsssl-section">
<?php if ( rsssl_generated_by_rsssl() ) {
$download_url = rsssl_le_url.'download.php?token='.wp_create_nonce('rsssl_download_cert');
$key_file = get_option('rsssl_private_key_path');
$cert_file = get_option('rsssl_certificate_path');
$cabundle_file = get_option('rsssl_intermediate_path');
$key_content = file_exists($key_file) ? file_get_contents($key_file) : 'no data found';
$certificate_content = file_exists($cert_file) ? file_get_contents($cert_file) : 'no data found';
$ca_bundle_content = file_exists($cabundle_file) ? file_get_contents($cabundle_file) : 'no data found';
?>
<div class="rsssl-hidden rsssl-copied-feedback"><?php _e("copied!","really-simple-ssl")?></div>
<div class="rsssl-manual rsssl-warning rsssl-hidden">
<div>
<h2>
<?php _e("Next step", "really-simple-ssl"); ?>
</h2>
</div>
<div class="rsssl-template-intro">
<p><?php _e("Install your certificate.", "really-simple-ssl")?></p>
</div>
<h2>
<?php _e("Certificate (CRT)", "really-simple-ssl")
. RSSSL()->rsssl_help->get_help_tip(__("This is the certificate, which you need to install in your hosting dashboard.", "really-simple-ssl") ); ?>
</h2>
<div class="rsssl-certificate-data rsssl-certificate" id="rsssl-certificate"><?php echo $certificate_content ?></div>
<a href="<?php echo $download_url?>&type=certificate" class="button button-secondary"><?php _e("Download", "really-simple-ssl")?></a>
<button type="button" class="button button-primary rsssl-copy-content" data-item="certificate"><?php _e("Copy content", "really-simple-ssl")?></button>
<h2>
<?php _e("Private Key (KEY)", "really-simple-ssl")
. RSSSL()->rsssl_help->get_help_tip(__("The private key can be uploaded or pasted in the appropriate field on your hosting dashboard.", "really-simple-ssl") ); ?>
</h2>
<div class="rsssl-certificate-data rsssl-key" id="rsssl-key"><?php echo $key_content ?></div>
<a href="<?php echo $download_url?>&type=private_key" class="button button-secondary"><?php _e("Download", "really-simple-ssl")?></a>
<button type="button" class="button button-primary rsssl-copy-content" data-item="key"><?php _e("Copy content", "really-simple-ssl")?></button>
<h2>
<?php _e("Certificate Authority Bundle (CABUNDLE)", "really-simple-ssl")
. RSSSL()->rsssl_help->get_help_tip(__("The CA Bundle will sometimes be automatically detected. If not, you can use this file.", "really-simple-ssl") ); ?>
</h2>
<div class="rsssl-certificate-data rsssl-cabundle" id="rsssl-cabundle"><?php echo $ca_bundle_content;?></div>
<a href="<?php echo $download_url?>&type=intermediate" class="button button-secondary"><?php _e("Download", "really-simple-ssl")?></a>
<button type="button" class="button button-primary rsssl-copy-content" data-item="cabundle"><?php _e("Copy content", "really-simple-ssl")?></button>
</div>
<?php } ?>
</div>

View File

@@ -0,0 +1,14 @@
<?php
defined( 'ABSPATH' ) or die();
ob_start();
do_action('rsssl_activation_notice_inner');
$content = ob_get_clean();
ob_start();
do_action('rsssl_activation_notice_footer');
$footer = ob_get_clean();
$class = apply_filters("rsssl_activation_notice_classes", "updated activate-ssl rsssl-pro-dismiss-notice");
$title = __("Almost ready to migrate to SSL!", "really-simple-ssl");
echo RSSSL_LE()->really_simple_ssl->notice_html( $class, $title, $content, $footer);

View File

@@ -0,0 +1,10 @@
<div class="rsssl-wizard-menu">
<div class="rsssl-wizard-title"><h1><?php _e( "Installation", 'really-simple-ssl' ) ?></h1></div>
<div class="rsssl-wizard-progress-bar">
<div class="rsssl-wizard-progress-bar-value" style="width: {percentage-complete}%"></div>
</div>
{title}
<div class="rsssl-wizard-menu-menus">
{steps}
</div>
</div>

View File

@@ -0,0 +1,61 @@
<?php defined('ABSPATH') or die(); ?>
<?php
$plugins = array(
'RSSSL' => array(
'constant_free' => 'rsssl_version',
'constant_premium' => 'rsssl_pro_version',
'website' => 'https://ziprecipes.net/premium/',
'search' => 'really-simple-ssl%20rogier%20lankhorst&tab=search',
'url' => 'https://wordpress.org/plugins/really-simple-ssl/',
'title' => 'Really Simple SSL - '. __("Easily migrate your website to SSL.", 'really-simple-ssl'),
),
'COMPLIANZ' => array(
'constant_free' => 'rsssl_plugin',
'constant_premium' => 'rsssl_premium',
'website' => 'https://complianz.io/pricing',
'url' => 'https://wordpress.org/plugins/complianz-gdpr/',
'search' => 'complianz+really+simple+cookies+rogierlankhorst',
'title' => 'Complianz GDPR/CCPA - '. __("The Privacy Suite for WordPress", 'really-simple-ssl'),
),
'ZIP' => array(
'constant_free' => 'ZRDN_PLUGIN_BASENAME',
'constant_premium' => 'ZRDN_PREMIUM',
'website' => 'https://ziprecipes.net/premium/',
'search' => 'zip+recipes+recipe+maker+really+simple+plugins+complianz',
'url' => 'https://wordpress.org/plugins/zip-recipes/',
'title' => 'Zip Recipes - '. __("Beautiful recipes optimized for Google.", 'really-simple-ssl'),
),
);
?>
<div class="rsssl-other-plugin-container">
<div><!-- / menu column /--></div>
<div class="rsssl-other-plugin-block">
<div class="rsssl-other-plugin-header">
<div class="rsssl-other-plugin-title"><?php _e("Our Plugins", "really-simple-ssl")?></div>
<div class="rsssl-other-plugin-image"><img src="<?php echo rsssl_le_url?>/assets/images/really-simple-plugins.svg" ></div>
</div>
<div class="rsssl-other-plugin-content">
<?php foreach ($plugins as $id => $plugin) {
$prefix = strtolower($id);
?>
<div class="rsssl-other-plugin rsssl-<?php echo $prefix?>">
<div class="plugin-color">
<div class="rsssl-bullet"></div>
</div>
<div class="plugin-text">
<a href="<?php echo $plugin['url']?>" target="_blank"><?php echo $plugin['title']?></a>
</div>
<div class="plugin-status">
<span><?php echo RSSSL::$admin->get_status_link($plugin)?></span>
</div>
</div>
<?php }?>
</div>
</div>
<div><!-- / notices column /--></div>
</div>

View File

@@ -0,0 +1,6 @@
<div class="rsssl-section {active} {completed}">
{icon}
<a href="{url}">
<h3>{title}</h3>
</a>
</div>

View File

@@ -0,0 +1,8 @@
<div class="rsssl-step">
<div class="rsssl-step-header {active} {completed}">
<a href="{url}">
<h2>{title}</h2>
</a>
</div>
{sections}
</div>

View File

@@ -0,0 +1,16 @@
<?php defined( 'ABSPATH' ) or die();
?>
<div class="rsssl-section">
<?php rsssl_progress_add('system-status');?>
<?php /*
<div class="rsssl-hidden rsssl-server_software rsssl-show-on-warning">
<p>
<?php _e("If you're absolutely sure you're running either Plesk or cPanel, you can force detection.","really-simple-ssl")?>&nbsp;
</p>
<br>
<input class="button button-default" type="submit" value="<?php _e("Force Plesk",'really-simple-ssl')?>" name="rsssl-force-plesk">
<input class="button button-default" type="submit" value="<?php _e("Force cPanel",'really-simple-ssl')?>" name="rsssl-force-cpanel">
</div>
*/?>
</div>