Skip to content

Commit

Permalink
feat: display warning if https is disabled
Browse files Browse the repository at this point in the history
issue #1549
  • Loading branch information
eteubert committed Dec 22, 2024
1 parent 540352f commit d19f201
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/modules/onboarding/settings/onboarding_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,19 @@ public function page()
$acknowledgeHeadline = __('Onboarding Assistant 👋', 'podlove-podcasting-plugin-for-wordpress');
$acknowledgeDescription = __('To be able to offer you this service, we have to run the onboarding assistant on our external server. We have done everything in our power to make the service as privacy friendly as possible. We do not store any of your entered data, everything is saved in your browser 🤞. However, it is important to us that you are aware of this fact before you use the onboarding service.', 'podlove-podcasting-plugin-for-wordpress');
$acknowledgeButton = __('All right, I\'ve got it', 'podlove-podcasting-plugin-for-wordpress');
$httpsWarningText = __('Warning: Your website is not configured to use https! This usually means that the authentication method the assistant uses is disabled by WordPress for security reasons. Please enable https before continuing.', 'podlove-podcasting-plugin-for-wordpress');

$httpsWarning = !wp_is_using_https() ? <<<EOD
<p class="onboarding-warning">⚠️ {$httpsWarningText}</p>
EOD : '';

echo <<<EOD
<iframe id="onboarding-assistant" class="hidden"></iframe>
<div id="onboarding-acknowledge">
<div id="onboarding-acknowledge-message">
<h1 class="onboarding-headline">{$acknowledgeHeadline}</h1>
<p class="onboarding-description">{$acknowledgeDescription}</p>
{$httpsWarning}
<button id="acknowledge-button" class="onboarding-button">{$acknowledgeButton}</button>
</div>
</div>
Expand Down Expand Up @@ -147,6 +153,11 @@ function loadService() {
color: rgb(107 114 128);
}
.onboarding-warning {
color: rgb(107 114 128);
font-weight: bold;
}
.update-message {
display: none;
}
Expand Down

0 comments on commit d19f201

Please sign in to comment.