This commit is contained in:
Rachit Bhargava
2024-01-10 11:53:33 -05:00
parent 83d223b0df
commit 054b4fffc9
16481 changed files with 0 additions and 3473867 deletions

View File

@@ -1,43 +0,0 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the persistent banner.
*/
?>
<ul id="wf-onboarding-banner">
<li><?php esc_html_e('Wordfence installation is incomplete', 'wordfence'); ?></li>
<li>
<?php if (isset($dismissable) && $dismissable): ?>
<a href="#" class="wf-onboarding-btn wf-onboarding-btn-default" id="wf-onboarding-delay" data-timestamp="<?php echo time(); ?>"><?php esc_html_e('Remind Me Later', 'wordfence'); ?></a>
<?php endif ?>
<a href="<?php echo esc_attr(network_admin_url('admin.php?page=WordfenceSupport')); ?>" class="wf-onboarding-btn wf-onboarding-btn-default" id="wf-onboarding-resume"><?php esc_html_e('Resume Installation', 'wordfence'); ?></a>
</li>
</ul>
<div style="display: none;">
<div class="wf-modal" id="wf-onboarding-registration-delayed-template">
<div class="wf-modal-header">
<div class="wf-modal-header-content">
<div class="wf-modal-title"><strong><?php esc_html_e('Notice Dismissed', 'wordfence') ?></strong></div>
</div>
</div>
<div class="wf-modal-content"><span class="message"><?php esc_html_e('You will be reminded again in 12 hours.', 'wordfence') ?></span></div>
<div class="wf-modal-footer">
<ul class="wf-onboarding-flex-horizontal wf-onboarding-flex-align-right wf-onboarding-full-width">
<li><a href="#" class="wf-onboarding-btn wf-onboarding-btn-primary" onclick="jQuery.wfcolorbox.close(); return false;" role="button">Close</a></li>
</ul>
</div>
</div>
<div class="wf-modal" id="wf-onboarding-registration-delayed-error-template">
<div class="wf-modal-header">
<div class="wf-modal-header-content">
<div class="wf-modal-title"><strong><?php esc_html_e('Error', 'wordfence') ?></strong></div>
</div>
</div>
<div class="wf-modal-content"><span class="message"><?php esc_html_e('An unexpected error occurred while attempting to dismiss the notice. Please try again.', 'wordfence') ?></span></div>
<div class="wf-modal-footer">
<ul class="wf-onboarding-flex-horizontal wf-onboarding-flex-align-right wf-onboarding-full-width">
<li><a href="#" class="wf-onboarding-btn wf-onboarding-btn-primary" onclick="jQuery.wfcolorbox.close(); return false;" role="button">Close</a></li>
</ul>
</div>
</div>
</div>

View File

@@ -1,10 +0,0 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
?>
<div id="wf-toupp-required-overlay"></div>
<div id="wf-toupp-required-message">
<div id="wf-toupp-required-message-inner">
<p><?php esc_html_e('You must install a license to continue using Wordfence.', 'wordfence'); ?></p>
<p><a href="#" class="wf-btn wf-btn-default" onclick="window.location = jQuery('#wf-onboarding-resume').attr('href'); return false;" role="button"><?php esc_html_e('Resume Installation', 'wordfence'); ?></a></p>
</div>
</div>

View File

@@ -1,28 +0,0 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the fresh install modal.
*/
?>
<div id="wf-onboarding-fresh-install" class="wf-onboarding-modal">
<div id="wf-onboarding-fresh-install-1" class="wf-onboarding-modal-content">
<div class="wf-onboarding-logo"><img src="<?php echo esc_attr(wfUtils::getBaseURL() . 'images/wf-horizontal.svg'); ?>" alt="<?php esc_html_e('Wordfence - Securing your WordPress Website', 'wordfence'); ?>"></div>
<h3><?php printf(/* translators: Wordfence version. */ esc_html__('You have successfully installed Wordfence %s', 'wordfence'), WORDFENCE_VERSION); ?></h3>
<?php echo wfView::create('onboarding/registration-prompt', array('attempt' => 1)) ?>
</div>
</div>
<script type="application/javascript">
(function($) {
$(function() {
$('#wf-onboarding-fresh-install').on('click', function(e) {
e.stopPropagation();
});
$(window).on('wfOnboardingDismiss', function() {
if ($('#wf-onboarding-fresh-install-1').is(':visible')) {
wordfenceExt.setOption('onboardingAttempt1', '<?php echo esc_attr(wfOnboardingController::ONBOARDING_SKIPPED); ?>');
}
});
});
})(jQuery);
</script>

View File

@@ -1,41 +0,0 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the final onboarding attempt modal.
*/
?>
<div class="wf-modal" id="wf-onboarding-final-attempt">
<div class="wf-modal-header">
<div class="wf-modal-header-content">
<div class="wf-modal-title"><?php esc_html_e('Please Complete Wordfence Installation', 'wordfence'); ?></div>
</div>
<div class="wf-modal-header-action">
<div class="wf-padding-add-left-small wf-modal-header-action-close"><a href="<?php echo esc_attr(network_admin_url('admin.php?page=Wordfence')); ?>"><i class="wf-fa wf-fa-times-circle" aria-hidden="true"></i></a></div>
</div>
</div>
<div class="wf-modal-content">
<div id="wf-onboarding-final-attempt-1" class="wf-onboarding-modal-content"<?php if (wfConfig::get('onboardingAttempt3') == wfOnboardingController::ONBOARDING_EMAILS) { echo ' style="display: none;"'; } ?>>
<?php echo wfView::create('onboarding/registration-prompt', array('attempt' => 3)) ?>
</div>
<div id="wf-onboarding-final-attempt-2" class="wf-onboarding-modal-content"<?php if (wfConfig::get('onboardingAttempt3') != wfOnboardingController::ONBOARDING_EMAILS) { echo ' style="display: none;"'; } ?>>
<h3><?php esc_html_e('Activate Premium', 'wordfence'); ?></h3>
<p><?php esc_html_e('Enter your premium license key to enable real-time protection for your website.', 'wordfence'); ?></p>
<div id="wf-onboarding-license-status" style="display: none;"></div>
<div id="wf-onboarding-license"><input type="text" placeholder="<?php esc_html_e('Enter Premium Key', 'wordfence'); ?>"><a href="#" class="wf-onboarding-btn wf-onboarding-btn-primary wf-disabled" id="wf-onboarding-license-install" role="button"><?php esc_html_e('Install', 'wordfence'); ?></a></div>
<div id="wf-onboarding-or"><span>or</span></div>
<p id="wf-onboarding-premium-cta"><?php esc_html_e('If you don\'t have one, you can purchase one now.', 'wordfence'); ?></p>
<div id="wf-onboarding-license-footer">
<ul>
<li><a href="https://www.wordfence.com/gnl1onboardingFinalGet/wordfence-signup/#premium-order-form" class="wf-onboarding-btn wf-onboarding-btn-primary" id="wf-onboarding-get" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Upgrade to Premium', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></li>
<li><a href="https://www.wordfence.com/gnl1onboardingFinalLearn/wordfence-signup/" class="wf-onboarding-btn wf-onboarding-btn-default" id="wf-onboarding-learn" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Learn More', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></li>
<li><a href="#" id="wf-onboarding-no-thanks" role="button"><?php esc_html_e('No Thanks', 'wordfence'); ?></a></li>
</ul>
</div>
<div id="wf-onboarding-license-finished" style="display: none;">
<ul>
<li><a href="<?php echo esc_attr(network_admin_url('admin.php?page=Wordfence')); ?>" class="wf-onboarding-btn wf-onboarding-btn-primary"><?php esc_html_e('Close', 'wordfence'); ?></a></li>
</ul>
</div>
</div>
</div>
</div>

View File

@@ -1,35 +0,0 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the overlay.
*
* Expects $contentHTML to be defined.
*
* @var string $contentHTML The HTML content to show on the overlay.
*/
?>
<div id="wf-onboarding-plugin-overlay">
<a href="#" id="wf-onboarding-dismiss" role="button">&times;</a>
<?php echo $contentHTML; ?>
<script type="application/javascript">
(function($) {
$(function() {
$('#wf-onboarding-dismiss, #wf-onboarding-plugin-overlay').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
$(window).trigger('wfOnboardingDismiss');
$('#wf-onboarding-plugin-overlay').fadeOut(400, function() {
$('#wf-onboarding-plugin-overlay').remove();
});
});
$(document).keyup(function(e) {
if (e.keyCode == 27) { //esc
$('#wf-onboarding-dismiss').trigger('click');
}
});
});
})(jQuery);
</script>
</div>

View File

@@ -1,41 +0,0 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the fresh install plugin header.
*/
?>
<div id="wf-onboarding-plugin-header">
<div id="wf-onboarding-plugin-header-header">
<div id="wf-onboarding-plugin-header-title"><?php esc_html_e('Please Complete Wordfence Installation', 'wordfence'); ?></div>
<div id="wf-onboarding-plugin-header-accessory"><a href="#" id="wf-onboarding-plugin-header-dismiss" role="button">&times;</a></div>
</div>
<div id="wf-onboarding-plugin-header-content">
<ul>
<li id="wf-onboarding-plugin-header-stage-content">
<div id="wf-onboarding-plugin-header-stage-content-1">
<?php echo wfView::create('onboarding/registration-prompt', array('attempt' => 2)) ?>
</div>
</li>
<li id="wf-onboarding-plugin-header-stage-image"></li>
</ul>
</div>
</div>
<script type="application/javascript">
(function($) {
$(function() {
$('#wf-onboarding-plugin-header-dismiss').on('click', function(e) {
e.preventDefault();
e.stopPropagation();
$(window).trigger('wfOnboardingDismiss2');
$('#wf-onboarding-plugin-header').slideUp(400, function() {
$('#wf-onboarding-plugin-overlay').remove();
});
if ($('#wf-onboarding-plugin-header-stage-content-1').is(':visible')) {
wordfenceExt.setOption('onboardingAttempt2', '<?php echo esc_attr(wfOnboardingController::ONBOARDING_SKIPPED); ?>');
}
});
});
})(jQuery);
</script>

View File

@@ -1,124 +0,0 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Prompts the user for a license key, directing to wordfence.com to register for a free license key
*/
if (!isset($existing))
$existing = false;
if (!isset($email))
$email = null;
if (!isset($license))
$license = null;
$registrationLink = wfLicense::generateRegistrationLink();
$populated = $existing && $email && $license;
?>
<div class="wf-onboarding-registration-prompt">
<p>
<?php if ($existing): ?>
<?php esc_html_e('Install your license to finish activating Wordfence.', 'wordfence') ?>
<?php else: ?>
<?php esc_html_e('Register with Wordfence to secure your site with the latest threat intelligence.', 'wordfence') ?>
<?php endif ?>
</p>
<div class="wf-onboarding-install-new wf-onboarding-install-type"<?php if ($existing): ?> style="display: none;"<?php endif ?>>
<div>
<a class="wf-btn wf-btn-primary wf-onboardng-register" href="<?php esc_attr_e($registrationLink) ?>" target="_blank"><?php esc_html_e('Get Your Wordfence License', 'wordfence') ?></a>
</div>
<div>
<a class="wf-onboarding-install-type-toggle" href="#"><?php esc_html_e('Install an existing license', 'wordfence') ?></a>
</div>
</div>
<div class="wf-onboarding-install-existing wf-onboarding-install-type" data-attempt="<?php echo esc_attr($attempt) ?>"
data-option-value-emails="<?php esc_attr_e(wfOnboardingController::ONBOARDING_EMAILS) ?>"
data-option-value-license="<?php esc_attr_e(wfOnboardingController::ONBOARDING_LICENSE) ?>"
<?php if (!$existing): ?>style="display: none;"<?php endif ?>
>
<form class="wf-onboarding-form">
<div class="wf-onboarding-form-group">
<label for="wf-onboarding-email-input"><?php esc_html_e('Email', 'wordfence') ?></label>
<input id="wf-onboarding-email-input" type="email" value="<?php echo esc_attr((string) $email) ?>" pattern="^[^@\s]+@[^@\s]+\.[^@\s]+$" title="<?php esc_html_e('Please enter a valid email address', 'wordfence') ?>" required>
<small><?php esc_html_e('This is where future security alerts for your website will be sent. This can also be changed in Global Options.', 'wordfence') ?></small>
</div>
<div class="wf-onboarding-form-group">
<label for="wf-onboarding-license-input"><?php esc_html_e('License Key', 'wordfence') ?></label>
<textarea id="wf-onboarding-license-input" rows="3" required><?php echo esc_html((string) $license) ?></textarea>
</div>
<div class="wf-onboarding-form-group wf-onboarding-consent-group"<?php if ($populated): ?> style="display: none;"<?php endif ?>>
<label id="wf-onboarding-subscription-options-label"><?php esc_html_e('Would you like WordPress security and vulnerability alerts sent to you via email?', 'wordfence') ?></label>
<div class="wf-onboarding-subscription-options" role="radiogroup" aria-labelledby="wf-onboarding-subscription-options-label">
<ul class="wf-switch">
<li data-value="1" role="radio" tabindex="0"><?php esc_html_e('Yes', 'wordfence') ?></li>
<li data-value="0" role="radio" tabindex="0"><?php esc_html_e('No', 'wordfence') ?></li>
</ul>
<small class="wf-onboarding-subscription-option-required" style="display: none;"><?php esc_html_e('You must select either "Yes" or "No"', 'wordfence') ?></small>
</div>
</div>
<div class="wf-onboarding-form-group wf-onboarding-consent-group"<?php if ($populated): ?> style="display: none;"<?php endif ?>>
<input type="checkbox" id="wf-onboarding-consent-input" required<?php if ($populated): ?> checked<?php endif ?>>
<label for="wf-onboarding-consent-input"><?php echo wp_kses(__('I have read and agree to the <a href="https://www.wordfence.com/license-terms-and-conditions/" target="_blank" rel="noopener noreferrer">Wordfence License Terms and Conditions</a>, the <a href="https://www.wordfence.com/services-subscription-agreement" rel="noopener noreferrer" target="_blank">Services Subscription Agreement</a>, and <a href="https://www.wordfence.com/terms-of-service/" target="_blank" rel="noopener noreferrer">Terms of Service</a>, and have read and acknowledge the <a href="https://www.wordfence.com/privacy-policy/" target="_blank" rel="noopener noreferrer">Wordfence Privacy Policy</a>.', 'wordfence'), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()))) ?></label>
</div>
<button class="wf-btn wf-btn-primary wf-onboarding-install-license" type="submit"><?php esc_html_e('Install License', 'wordfence') ?></button>
</form>
<?php if (!$populated): ?>
<div>
<a class="wf-onboarding-link" href="<?php esc_attr_e($registrationLink) ?>" target="_blank"><?php esc_html_e('Get a new license', 'wordfence') ?></a>
</div>
<?php endif ?>
</div>
</div>
<div style="display: none;">
<?php
$licenseTypeModals = array(
'response' => array(
'title' => __('Response License Installed', 'wordfence'),
'content' => __('Congratulations! Wordfence Response is now active on your website. Please note that some Response features are not enabled by default.', 'wordfence')
),
'care' => array(
'title' => __('Care License Installed', 'wordfence'),
'content' => __('Congratulations! Wordfence Care is now active on your website. Please note that some Care features are not enabled by default.', 'wordfence')
),
'premium' => array(
'title' => __('Premium License Installed', 'wordfence'),
'content' => __('Congratulations! Wordfence Premium is now active on your website. Please note that some Premium features are not enabled by default.', 'wordfence')
),
'free' => array(
'title' => __('Free License Installed', 'wordfence'),
'content' => __('Congratulations! Wordfence Free is now active on your website.', 'wordfence')
),
);
?>
<?php foreach ($licenseTypeModals as $key => $modal): ?>
<div class="wf-modal wf-modal-success" id="<?php echo esc_attr("wf-onboarding-registration-success-$key-template") ?>">
<div class="wf-model-success-wrapper">
<div class="wf-modal-header">
<div class="wf-modal-header-content">
<div class="wf-modal-title"><?php echo esc_html($modal['title']) ?></div>
</div>
</div>
<div class="wf-modal-content"><?php echo esc_html($modal['content']) ?></div>
</div>
<div class="wf-modal-footer">
<ul class="wf-onboarding-flex-horizontal wf-onboarding-flex-align-right wf-onboarding-full-width">
<li><a href="<?php echo esc_url(network_admin_url('admin.php?page=Wordfence')); ?>" class="wf-onboarding-btn wf-onboarding-btn-primary"><?php esc_html_e('Go To Dashboard', 'wordfence'); ?></a></li>
</ul>
</div>
</div>
<?php endforeach ?>
<div class="wf-modal" id="wf-onboarding-registration-error-template">
<div class="wf-modal-header">
<div class="wf-modal-header-content">
<div class="wf-modal-title"><strong><?php esc_html_e('Error Installing License', 'wordfence') ?></strong></div>
</div>
</div>
<div class="wf-modal-content">
<p class="message"><?php esc_html_e('An error occurred while installing your license key.', 'wordfence') ?></p>
<p><?php echo wp_kses(__('Please try again. If the problem persists, please <a href="https://www.wordfence.com/help/api-key" target="_blank" rel="noopener noreferrer">contact Wordfence Support<span class="screen-reader-text">(opens in new tab)</span></a>', 'wordfence'), array('a' => array('href' => array(), 'target' => array(), 'rel' => array()), 'span' => array('class' => array()))) ?>
</div>
<div class="wf-modal-footer">
<ul class="wf-onboarding-flex-horizontal wf-onboarding-flex-align-right wf-onboarding-full-width">
<li><a href="#" class="wf-onboarding-btn wf-onboarding-btn-primary" onclick="jQuery.wfcolorbox.close(); return false;" role="button">Close</a></li>
</ul>
</div>
</div>
</div>

View File

@@ -1,9 +0,0 @@
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the overlay.
*/
?>
<div id="wf-onboarding-tour-overlay" style="display: none;">
</div>