rebase on oct-10-2023
This commit is contained in:
@@ -4,17 +4,17 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
if (!isset($defaultGracePeriod))
|
||||
$defaultGracePeriod = \WordfenceLS\Controller_Settings::shared()->get_user_2fa_grace_period();
|
||||
$defaultGracePeriod = max($defaultGracePeriod, 1);
|
||||
$errorMessage = $gracePeriod === null ? __('Unable to Activate Grace Period', 'wordfence-2fa') : __('Unable to Reset Grace Period', 'wordfence-2fa');
|
||||
$errorMessage = $gracePeriod === null ? __('Unable to Activate Grace Period', 'wordfence') : __('Unable to Reset Grace Period', 'wordfence');
|
||||
?>
|
||||
<div class="wfls-add-top wfls-add-bottom wfls-grace-period-container">
|
||||
<div class="wfls-grace-period-input-container">
|
||||
<label for="wfls-user-grace-period-override" style="display: none"><?php esc_html_e('Grace Period Override', 'wordfence-2fa') ?></label>
|
||||
<label for="wfls-user-grace-period-override" style="display: none"><?php esc_html_e('Grace Period Override', 'wordfence') ?></label>
|
||||
<input type="text" id="wfls-user-grace-period-override" maxlength="2" pattern="[0-9]+" value="<?php echo (int) $defaultGracePeriod ?>">
|
||||
<label for="wfls-user-grace-period-override"><?php esc_html_e('days', 'wordfence-2fa') ?></label>
|
||||
<label for="wfls-user-grace-period-override"><?php esc_html_e('days', 'wordfence') ?></label>
|
||||
</div>
|
||||
<div class="wfls-grace-period-button-container">
|
||||
<button class="wfls-btn wfls-btn-default" id="wfls-reset-grace-period">
|
||||
<?php echo $gracePeriod === null ? esc_html__('Activate Grace Period', 'wordfence-2fa') : esc_html__('Reset Grace Period', 'wordfence-2fa') ?>
|
||||
<?php echo $gracePeriod === null ? esc_html__('Activate Grace Period', 'wordfence') : esc_html__('Reset Grace Period', 'wordfence') ?>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
@@ -45,7 +45,7 @@ $errorMessage = $gracePeriod === null ? __('Unable to Activate Grace Period', 'w
|
||||
WFLS.panelModal(
|
||||
(WFLS.screenSize(500) ? '300px' : '400px'),
|
||||
<?php echo json_encode($errorMessage) ?>,
|
||||
<?php echo json_encode($gracePeriod === null ? __('An unexpected error occurred while attempting to activate the grace period.', 'wordfence-2fa') : __('An unexpected error occurred while attempting to reset the grace period.', 'wordfence-2fa')) ?>
|
||||
<?php echo json_encode($gracePeriod === null ? __('An unexpected error occurred while attempting to activate the grace period.', 'wordfence') : __('An unexpected error occurred while attempting to reset the grace period.', 'wordfence')) ?>
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
|
||||
$errorMessage = __('Unable to Revoke Grace Period', 'wordfence-2fa');
|
||||
$errorMessage = __('Unable to Revoke Grace Period', 'wordfence');
|
||||
?>
|
||||
<div class="wfls-add-top wfls-add-bottom wfls-grace-period-container">
|
||||
<div class="wfls-grace-period-button-container">
|
||||
<button class="wfls-btn wfls-btn-default" id="wfls-revoke-grace-period">
|
||||
<?php esc_html_e('Revoke Grace Period', 'wordfence-2fa') ?>
|
||||
<?php esc_html_e('Revoke Grace Period', 'wordfence') ?>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
@@ -35,7 +35,7 @@ $errorMessage = __('Unable to Revoke Grace Period', 'wordfence-2fa');
|
||||
WFLS.panelModal(
|
||||
(WFLS.screenSize(500) ? '300px' : '400px'),
|
||||
<?php echo json_encode($errorMessage) ?>,
|
||||
<?php echo json_encode(__('An unexpected error occurred while attempting to revoke the grace period.', 'wordfence-2fa')) ?>
|
||||
<?php echo json_encode(__('An unexpected error occurred while attempting to revoke the grace period.', 'wordfence')) ?>
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -8,15 +8,15 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
* @var bool $canEnable2FA Whether or not the user this is being sent to can enable 2FA. Optional
|
||||
*/
|
||||
?>
|
||||
<strong><?php echo wp_kses(sprintf(__('Please verify a login attempt for your account on <a href="%s"><strong>%s</strong></a>.', 'wordfence-2fa'), esc_url($siteURL), $siteName), array('a'=>array('href'=>array()), 'strong'=>array())); ?></strong>
|
||||
<strong><?php echo wp_kses(sprintf(__('Please verify a login attempt for your account on <a href="%s"><strong>%s</strong></a>.', 'wordfence'), esc_url($siteURL), $siteName), array('a'=>array('href'=>array()), 'strong'=>array())); ?></strong>
|
||||
<br><br>
|
||||
<?php echo '<strong>' . esc_html__('Request Time:', 'wordfence-2fa') . '</strong> ' . esc_html(\WordfenceLS\Controller_Time::format_local_time('F j, Y h:i:s A')); ?><br>
|
||||
<?php echo '<strong>' . esc_html__('IP:', 'wordfence-2fa') . '</strong> ' . esc_html($ip); ?>
|
||||
<?php echo '<strong>' . esc_html__('Request Time:', 'wordfence') . '</strong> ' . esc_html(\WordfenceLS\Controller_Time::format_local_time('F j, Y h:i:s A')); ?><br>
|
||||
<?php echo '<strong>' . esc_html__('IP:', 'wordfence') . '</strong> ' . esc_html($ip); ?>
|
||||
<br><br>
|
||||
<?php echo wp_kses(__('The request was flagged as suspicious, and we need verification that you attempted to log in to allow it to proceed. This verification link <b>will be valid for 15 minutes</b> from the time it was sent. If you did not attempt this login, please change your password immediately.', 'wordfence-2fa'), array('b'=>array())); ?>
|
||||
<?php echo wp_kses(__('The request was flagged as suspicious, and we need verification that you attempted to log in to allow it to proceed. This verification link <b>will be valid for 15 minutes</b> from the time it was sent. If you did not attempt this login, please change your password immediately.', 'wordfence'), array('b'=>array())); ?>
|
||||
<br><br>
|
||||
<?php if (isset($canEnable2FA) && $canEnable2FA): ?>
|
||||
<?php esc_html_e('You may bypass this verification step permanently by enabling two-factor authentication on your account.', 'wordfence-2fa'); ?>
|
||||
<?php esc_html_e('You may bypass this verification step permanently by enabling two-factor authentication on your account.', 'wordfence'); ?>
|
||||
<br><br>
|
||||
<?php endif; ?>
|
||||
<?php echo wp_kses(sprintf(__('<a href="%s"><b>Verify and Log In</b></a>', 'wordfence-2fa'), esc_url($verificationURL)), array('a'=>array('href'=>array()), 'b'=>array())); ?>
|
||||
<?php echo wp_kses(sprintf(__('<a href="%s"><b>Verify and Log In</b></a>', 'wordfence'), esc_url($verificationURL)), array('a'=>array('href'=>array()), 'b'=>array())); ?>
|
||||
@@ -10,17 +10,17 @@ $recovery = $initializationData->get_recovery_codes();
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<strong><?php esc_html_e('2. Enter Code from Authenticator App', 'wordfence-2fa'); ?></strong>
|
||||
<strong><?php esc_html_e('2. Enter Code from Authenticator App', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wfls-block-content wfls-padding-add-bottom">
|
||||
<p><?php esc_html_e('Download Recovery Codes', 'wordfence-2fa'); ?> <em class="wfls-text-small"><?php esc_html_e('Optional', 'wordfence-2fa'); ?></em></p>
|
||||
<p><?php echo esc_html(sprintf(__('Use one of these %d codes to log in if you lose access to your authenticator device. Codes are %d characters long plus optional spaces. Each one may be used only once.', 'wordfence-2fa'), count($recovery), \WordfenceLS\Model_Crypto::strlen($recovery[0]) * 2)); ?></p>
|
||||
<p><?php esc_html_e('Download Recovery Codes', 'wordfence'); ?> <em class="wfls-text-small"><?php esc_html_e('Optional', 'wordfence'); ?></em></p>
|
||||
<p><?php echo esc_html(sprintf(__('Use one of these %d codes to log in if you lose access to your authenticator device. Codes are %d characters long plus optional spaces. Each one may be used only once.', 'wordfence'), count($recovery), \WordfenceLS\Model_Crypto::strlen($recovery[0]) * 2)); ?></p>
|
||||
<ul class="wfls-recovery-codes">
|
||||
<?php
|
||||
$recoveryCodeFileContents = sprintf(__('Two-Factor Authentication Recovery Codes - %s (%s)', 'wordfence-2fa'), home_url(), $user->user_login) . "\r\n";
|
||||
$recoveryCodeFileContents .= "\r\n" . sprintf(__('Each line of %d letters and numbers is a single recovery code, with optional spaces for readability. To use a recovery code, after entering your username and password, enter the code like "1234 5678 90AB CDEF" at the 2FA prompt. If your site has a custom login prompt and does not show a 2FA prompt, you can use the single-step method by entering your password and the code together in the Password field, like "mypassword1234 5678 90AB CDEF". Your recovery codes are:', 'wordfence-2fa'), \WordfenceLS\Model_Crypto::strlen($recovery[0]) * 2) . "\r\n\r\n";
|
||||
$recoveryCodeFileContents = sprintf(__('Two-Factor Authentication Recovery Codes - %s (%s)', 'wordfence'), home_url(), $user->user_login) . "\r\n";
|
||||
$recoveryCodeFileContents .= "\r\n" . sprintf(__('Each line of %d letters and numbers is a single recovery code, with optional spaces for readability. To use a recovery code, after entering your username and password, enter the code like "1234 5678 90AB CDEF" at the 2FA prompt. If your site has a custom login prompt and does not show a 2FA prompt, you can use the single-step method by entering your password and the code together in the Password field, like "mypassword1234 5678 90AB CDEF". Your recovery codes are:', 'wordfence'), \WordfenceLS\Model_Crypto::strlen($recovery[0]) * 2) . "\r\n\r\n";
|
||||
foreach ($recovery as $c) {
|
||||
$hex = bin2hex($c);
|
||||
$blocks = str_split($hex, 4);
|
||||
@@ -29,19 +29,19 @@ $recovery = $initializationData->get_recovery_codes();
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<p class="wfls-center"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-recovery-download" target="_blank" rel="noopener noreferrer"><i class="dashicons dashicons-download"></i> <?php esc_html_e('Download', 'wordfence-2fa'); ?></a></p>
|
||||
<p class="wfls-center"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-recovery-download" target="_blank" rel="noopener noreferrer"><i class="dashicons dashicons-download"></i> <?php esc_html_e('Download', 'wordfence'); ?></a></p>
|
||||
|
||||
<hr class="wfls-half">
|
||||
|
||||
<p><?php esc_html_e('Enter the code from your authenticator app below to verify and activate two-factor authentication for this account.', 'wordfence-2fa'); ?></p>
|
||||
<p><?php esc_html_e('Enter the code from your authenticator app below to verify and activate two-factor authentication for this account.', 'wordfence'); ?></p>
|
||||
<p><input type="text" id="wfls-activate-field" value="" size="6" maxlength="6" placeholder="123456" autocomplete="off"></p>
|
||||
</div>
|
||||
<div class="wfls-block-footer">
|
||||
<div class="wfls-block-footer-content">
|
||||
<div class="wfls-block-title" id="wfls-activation-help-link-container">
|
||||
<a href="<?php echo \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('For help on setting up an app, visit our help article.', 'wordfence-2fa'); ?></a>
|
||||
<a href="<?php echo \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('For help on setting up an app, visit our help article.', 'wordfence'); ?></a>
|
||||
</div>
|
||||
<div class="wfls-block-footer-action"><a href="#" id="wfls-activate" class="wfls-btn wfls-btn-default wfls-disabled"><?php esc_html_e('Activate', 'wordfence-2fa'); ?></a></div>
|
||||
<div class="wfls-block-footer-action"><a href="#" id="wfls-activate" class="wfls-btn wfls-btn-default wfls-disabled"><?php esc_html_e('Activate', 'wordfence'); ?></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,7 +85,7 @@ $recovery = $initializationData->get_recovery_codes();
|
||||
payload,
|
||||
function(response) {
|
||||
if (response.error) {
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Activating 2FA', 'wordfence-2fa')); ?>', response.error);
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Activating 2FA', 'wordfence')); ?>', response.error);
|
||||
}
|
||||
else {
|
||||
$('#wfls-activation-controls').crossfade($('#wfls-deactivation-controls'));
|
||||
@@ -116,7 +116,7 @@ $recovery = $initializationData->get_recovery_codes();
|
||||
}
|
||||
},
|
||||
function(error) {
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Activating 2FA', 'wordfence-2fa')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to activate two-factor authentication. Please try again.', 'wordfence-2fa')); ?>');
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Activating 2FA', 'wordfence')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to activate two-factor authentication. Please try again.', 'wordfence')); ?>');
|
||||
WFLS.userIsActivating = false;
|
||||
}
|
||||
);
|
||||
@@ -127,10 +127,10 @@ $recovery = $initializationData->get_recovery_codes();
|
||||
<script type="text/x-jquery-template" id="wfls-tmpl-recovery-skipped-prompt">
|
||||
<?php
|
||||
echo \WordfenceLS\Model_View::create('common/modal-prompt', array(
|
||||
'title' => __('Download Recovery Codes', 'wordfence-2fa'),
|
||||
'message' => __('Reminder: If you lose access to your authenticator device, you can use recovery codes to log in. If you have not saved a copy of your recovery codes, we recommend downloading them now.', 'wordfence-2fa'),
|
||||
'primaryButton' => array('id' => 'wfls-recovery-skipped-download', 'label' => __('Download', 'wordfence-2fa'), 'link' => '#'),
|
||||
'secondaryButtons' => array(array('id' => 'wfls-recovery-skipped-skip', 'label' => __('Skip', 'wordfence-2fa'), 'link' => '#')),
|
||||
'title' => __('Download Recovery Codes', 'wordfence'),
|
||||
'message' => __('Reminder: If you lose access to your authenticator device, you can use recovery codes to log in. If you have not saved a copy of your recovery codes, we recommend downloading them now.', 'wordfence'),
|
||||
'primaryButton' => array('id' => 'wfls-recovery-skipped-download', 'label' => __('Download', 'wordfence'), 'link' => '#'),
|
||||
'secondaryButtons' => array(array('id' => 'wfls-recovery-skipped-skip', 'label' => __('Skip', 'wordfence'), 'link' => '#')),
|
||||
))->render();
|
||||
?>
|
||||
</script>
|
||||
@@ -8,12 +8,12 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<strong><?php esc_html_e('1. Scan Code or Enter Key', 'wordfence-2fa'); ?></strong>
|
||||
<strong><?php esc_html_e('1. Scan Code or Enter Key', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wfls-block-content wfls-padding-add-bottom">
|
||||
<p>Scan the code below with your authenticator app to add this account. Some authenticator apps also allow you to type in the text version instead.</p>
|
||||
<p><?php esc_html_e('Scan the code below with your authenticator app to add this account. Some authenticator apps also allow you to type in the text version instead.', 'wordfence') ?></p>
|
||||
<div id="wfls-qr-code"></div>
|
||||
<p class="wfls-center wfls-no-bottom"><input id="wfls-qr-code-text" class="wfls-center" type="text" value="<?php echo esc_attr($initializationData->get_base32_secret()); ?>" onclick="this.select();" size="32" readonly></p>
|
||||
</div>
|
||||
|
||||
@@ -14,22 +14,22 @@ if ($ownUser->ID == $user->ID) {
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<strong><?php esc_html_e('Wordfence 2FA Active', 'wordfence-2fa'); ?></strong>
|
||||
<strong><?php esc_html_e('Wordfence 2FA Active', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wfls-block-content wfls-padding-add-bottom">
|
||||
<p><?php if ($ownAccount) { esc_html_e('Wordfence two-factor authentication is currently active on your account. You may deactivate it by clicking the button below.', 'wordfence-2fa'); } else { echo wp_kses(sprintf(__('Wordfence two-factor authentication is currently active on the account <strong>%s</strong>. You may deactivate it by clicking the button below.', 'wordfence-2fa'), esc_html($user->user_login)), array('strong'=>array())); } ?></p>
|
||||
<p class="wfls-center wfls-add-top"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-deactivate" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Deactivate', 'wordfence-2fa'); ?></a></p>
|
||||
<p><?php if ($ownAccount) { esc_html_e('Wordfence two-factor authentication is currently active on your account. You may deactivate it by clicking the button below.', 'wordfence'); } else { echo wp_kses(sprintf(__('Wordfence two-factor authentication is currently active on the account <strong>%s</strong>. You may deactivate it by clicking the button below.', 'wordfence'), esc_html($user->user_login)), array('strong'=>array())); } ?></p>
|
||||
<p class="wfls-center wfls-add-top"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-deactivate" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Deactivate', 'wordfence'); ?></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/x-jquery-template" id="wfls-tmpl-deactivate-prompt">
|
||||
<?php
|
||||
echo \WordfenceLS\Model_View::create('common/modal-prompt', array(
|
||||
'title' => __('Deactivate 2FA', 'wordfence-2fa'),
|
||||
'message' => __('Are you sure you want to deactivate two-factor authentication?', 'wordfence-2fa'),
|
||||
'primaryButton' => array('id' => 'wfls-deactivate-prompt-cancel', 'label' => __('Cancel', 'wordfence-2fa'), 'link' => '#'),
|
||||
'secondaryButtons' => array(array('id' => 'wfls-deactivate-prompt-confirm', 'label' => __('Deactivate', 'wordfence-2fa'), 'link' => '#')),
|
||||
'title' => __('Deactivate 2FA', 'wordfence'),
|
||||
'message' => __('Are you sure you want to deactivate two-factor authentication?', 'wordfence'),
|
||||
'primaryButton' => array('id' => 'wfls-deactivate-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'),
|
||||
'secondaryButtons' => array(array('id' => 'wfls-deactivate-prompt-confirm', 'label' => __('Deactivate', 'wordfence'), 'link' => '#')),
|
||||
))->render();
|
||||
?>
|
||||
</script>
|
||||
@@ -63,7 +63,7 @@ if ($ownUser->ID == $user->ID) {
|
||||
payload,
|
||||
function(response) {
|
||||
if (response.error) {
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Deactivating 2FA', 'wordfence-2fa')); ?>', response.error);
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Deactivating 2FA', 'wordfence')); ?>', response.error);
|
||||
}
|
||||
else {
|
||||
$('#wfls-deactivation-controls').crossfade($('#wfls-activation-controls'));
|
||||
@@ -72,7 +72,7 @@ if ($ownUser->ID == $user->ID) {
|
||||
WFLS.panelClose(); //The prompt
|
||||
},
|
||||
function(error) {
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Deactivating 2FA', 'wordfence-2fa')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to deactivate two-factor authentication. Please try again.', 'wordfence-2fa')); ?>');
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Deactivating 2FA', 'wordfence')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to deactivate two-factor authentication. Please try again.', 'wordfence')); ?>');
|
||||
WFLS.panelClose(); //The prompt
|
||||
}
|
||||
);
|
||||
|
||||
@@ -19,7 +19,7 @@ $hasGracePeriod = $defaultGracePeriod > 0;
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<strong><?php echo $gracePeriod ? esc_html__('Grace Period', 'wordfence-2fa') : esc_html__('Locked Out', 'wordfence-2fa') ?></strong>
|
||||
<strong><?php echo $gracePeriod ? esc_html__('Grace Period', 'wordfence') : esc_html__('Locked Out', 'wordfence') ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -28,8 +28,8 @@ $hasGracePeriod = $defaultGracePeriod > 0;
|
||||
<p><?php
|
||||
$requiredDateFormatted = \WordfenceLS\Controller_Time::format_local_time('F j, Y g:i A', $requiredAt);
|
||||
echo $ownAccount ?
|
||||
sprintf(wp_kses(__('Two-factor authentication will be required for your account beginning <strong>%s</strong>', 'wordfence-2fa'), array('strong'=>array())), $requiredDateFormatted) :
|
||||
sprintf(wp_kses(__('Two-factor authentication will be required for user <strong>%s</strong> beginning <strong>%s</strong>.', 'wordfence-2fa'), array('strong'=>array())), esc_html($user->user_login), $requiredDateFormatted)
|
||||
sprintf(wp_kses(__('Two-factor authentication will be required for your account beginning <strong>%s</strong>', 'wordfence'), array('strong'=>array())), $requiredDateFormatted) :
|
||||
sprintf(wp_kses(__('Two-factor authentication will be required for user <strong>%s</strong> beginning <strong>%s</strong>.', 'wordfence'), array('strong'=>array())), esc_html($user->user_login), $requiredDateFormatted)
|
||||
?></p>
|
||||
<?php if (\WordfenceLS\Controller_Users::shared()->has_revokable_grace_period($user)): ?>
|
||||
<?php echo \WordfenceLS\Model_View::create(
|
||||
@@ -41,8 +41,8 @@ $hasGracePeriod = $defaultGracePeriod > 0;
|
||||
<?php else: ?>
|
||||
<p>
|
||||
<?php echo $ownAccount ?
|
||||
esc_html__('Two-factor authentication is required for your account, but has not been configured.', 'wordfence-2fa') :
|
||||
esc_html__('Two-factor authentication is required for this account, but has not been configured.', 'wordfence-2fa') ?>
|
||||
esc_html__('Two-factor authentication is required for your account, but has not been configured.', 'wordfence') :
|
||||
esc_html__('Two-factor authentication is required for this account, but has not been configured.', 'wordfence') ?>
|
||||
</p>
|
||||
<?php echo \WordfenceLS\Model_View::create(
|
||||
'common/reset-grace-period',
|
||||
|
||||
@@ -9,22 +9,22 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<strong><?php esc_html_e('Recovery Codes', 'wordfence-2fa'); ?></strong>
|
||||
<strong><?php esc_html_e('Recovery Codes', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wfls-block-content wfls-padding-add-bottom">
|
||||
<p id="wfls-recovery-code-count"><?php echo esc_html(sprintf($remaining == 1 ? __('%d unused recovery code remains. You may generate a new set by clicking below.', 'wordfence-2fa') : __('%d unused recovery codes remain. You may generate a new set by clicking below.', 'wordfence-2fa'), $remaining)); ?></p>
|
||||
<p class="wfls-center wfls-add-top"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-recovery" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Generate New Codes', 'wordfence-2fa'); ?></a></p>
|
||||
<p id="wfls-recovery-code-count"><?php echo esc_html(sprintf($remaining == 1 ? __('%d unused recovery code remains. You may generate a new set by clicking below.', 'wordfence') : __('%d unused recovery codes remain. You may generate a new set by clicking below.', 'wordfence'), $remaining)); ?></p>
|
||||
<p class="wfls-center wfls-add-top"><a href="#" class="wfls-btn wfls-btn-default" id="wfls-recovery" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Generate New Codes', 'wordfence'); ?></a></p>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/x-jquery-template" id="wfls-tmpl-recovery-prompt">
|
||||
<?php
|
||||
echo \WordfenceLS\Model_View::create('common/modal-prompt', array(
|
||||
'title' => __('Generate New Recovery Codes', 'wordfence-2fa'),
|
||||
'message' => __('Are you sure you want to generate new recovery codes? Any remaining unused codes will be disabled.', 'wordfence-2fa'),
|
||||
'primaryButton' => array('id' => 'wfls-recovery-prompt-cancel', 'label' => __('Cancel', 'wordfence-2fa'), 'link' => '#'),
|
||||
'secondaryButtons' => array(array('id' => 'wfls-recovery-prompt-confirm', 'label' => __('Generate', 'wordfence-2fa'), 'link' => '#')),
|
||||
'title' => __('Generate New Recovery Codes', 'wordfence'),
|
||||
'message' => __('Are you sure you want to generate new recovery codes? Any remaining unused codes will be disabled.', 'wordfence'),
|
||||
'primaryButton' => array('id' => 'wfls-recovery-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'),
|
||||
'secondaryButtons' => array(array('id' => 'wfls-recovery-prompt-confirm', 'label' => __('Generate', 'wordfence'), 'link' => '#')),
|
||||
))->render();
|
||||
?>
|
||||
</script>
|
||||
@@ -58,15 +58,15 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
payload,
|
||||
function(response) {
|
||||
if (response.error) {
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo esc_js(__('Error Generating New Codes', 'wordfence-2fa')); ?>', response.error);
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo esc_js(__('Error Generating New Codes', 'wordfence')); ?>', response.error);
|
||||
}
|
||||
else if (response.recovery) {
|
||||
$('#wfls-recovery-code-count').text(response.text);
|
||||
|
||||
var message = '<p><?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(sprintf(__('Use one of these %d codes to log in if you lose access to your authenticator device. Codes are %d characters long plus optional spaces. Each one may be used only once.', 'wordfence-2fa'), \WordfenceLS\Controller_Users::RECOVERY_CODE_COUNT, \WordfenceLS\Controller_Users::RECOVERY_CODE_SIZE * 2)); ?></p><ul class="wfls-recovery-codes">';
|
||||
var message = '<p><?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(sprintf(__('Use one of these %d codes to log in if you lose access to your authenticator device. Codes are %d characters long plus optional spaces. Each one may be used only once.', 'wordfence'), \WordfenceLS\Controller_Users::RECOVERY_CODE_COUNT, \WordfenceLS\Controller_Users::RECOVERY_CODE_SIZE * 2)); ?></p><ul class="wfls-recovery-codes">';
|
||||
|
||||
var recoveryCodeFileContents = '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(sprintf(__('Two-Factor Authentication Recovery Codes - %s (%s)', 'wordfence-2fa'), preg_replace('~^https?://~i', '', home_url()), $user->user_login)); ?>' + "\r\n";
|
||||
recoveryCodeFileContents = recoveryCodeFileContents + "\r\n" + '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(sprintf(__('Each line of %d letters and numbers is a single recovery code, with optional spaces for readability. To use a recovery code, after entering your username and password, enter the code like "1234 5678 90AB CDEF" at the 2FA prompt. If your site has a custom login prompt and does not show a 2FA prompt, you can use the single-step method by entering your password and the code together in the Password field, like "mypassword1234 5678 90AB CDEF". Your recovery codes are:', 'wordfence-2fa'), \WordfenceLS\Controller_Users::RECOVERY_CODE_SIZE * 2)); ?>' + "\r\n\r\n";
|
||||
var recoveryCodeFileContents = '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(sprintf(__('Two-Factor Authentication Recovery Codes - %s (%s)', 'wordfence'), preg_replace('~^https?://~i', '', home_url()), $user->user_login)); ?>' + "\r\n";
|
||||
recoveryCodeFileContents = recoveryCodeFileContents + "\r\n" + '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(sprintf(__('Each line of %d letters and numbers is a single recovery code, with optional spaces for readability. To use a recovery code, after entering your username and password, enter the code like "1234 5678 90AB CDEF" at the 2FA prompt. If your site has a custom login prompt and does not show a 2FA prompt, you can use the single-step method by entering your password and the code together in the Password field, like "mypassword1234 5678 90AB CDEF". Your recovery codes are:', 'wordfence'), \WordfenceLS\Controller_Users::RECOVERY_CODE_SIZE * 2)); ?>' + "\r\n\r\n";
|
||||
for (var i = 0; i < response.recovery.length; i++) {
|
||||
message = message + '<li>' + response.recovery[i] + '</li>';
|
||||
recoveryCodeFileContents = recoveryCodeFileContents + response.recovery[i] + "\r\n";
|
||||
@@ -74,10 +74,10 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
|
||||
message = message + "</ul>";
|
||||
|
||||
message = message + "<p class=\"wfls-center\"><a href=\"#\" class=\"wfls-btn wfls-btn-default\" id=\"wfls-recovery-new-download\" target=\"_blank\" rel=\"noopener noreferrer\"><i class=\"dashicons dashicons-download\"></i> <?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Download', 'wordfence-2fa')); ?></a></p>";
|
||||
message = message + "<p class=\"wfls-center\"><a href=\"#\" class=\"wfls-btn wfls-btn-default\" id=\"wfls-recovery-new-download\" target=\"_blank\" rel=\"noopener noreferrer\"><i class=\"dashicons dashicons-download\"></i> <?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Download', 'wordfence')); ?></a></p>";
|
||||
|
||||
|
||||
WFLS.panelModalHTML((WFLS.screenSize(500) ? '300px' : '400px'), "<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('New Recovery Codes', 'wordfence-2fa')); ?>", message, {onComplete: function() {
|
||||
WFLS.panelModalHTML((WFLS.screenSize(500) ? '300px' : '400px'), "<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('New Recovery Codes', 'wordfence')); ?>", message, {onComplete: function() {
|
||||
$('#wfls-recovery-new-download').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
@@ -89,7 +89,7 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
WFLS.panelClose(); //The prompt
|
||||
},
|
||||
function(error) {
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Generating New Codes', 'wordfence-2fa')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to generate new recovery codes. Please try again.', 'wordfence-2fa')); ?>');
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Generating New Codes', 'wordfence')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to generate new recovery codes. Please try again.', 'wordfence')); ?>');
|
||||
WFLS.panelClose(); //The prompt
|
||||
}
|
||||
);
|
||||
|
||||
@@ -6,12 +6,12 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
?>
|
||||
<div id="wfls-onboarding-standalone-modal">
|
||||
<div id="wfls-onboarding-standalone-modal-header">
|
||||
<div id="wfls-onboarding-standalone-modal-header-title"><?php esc_html_e('Wordfence Login Security Installed', 'wordfence-2fa'); ?></div>
|
||||
<div id="wfls-onboarding-standalone-modal-header-title"><?php esc_html_e('Wordfence Login Security Installed', 'wordfence'); ?></div>
|
||||
<div id="wfls-onboarding-standalone-modal-header-accessory"><a href="#" id="wfls-onboarding-standalone-modal-dismiss">×</a></div>
|
||||
</div>
|
||||
<div id="wfls-onboarding-standalone-modal-content">
|
||||
<p><?php esc_html_e('You have just installed the Wordfence Login Security plugin. It contains a subset of the functionality found in the full Wordfence plugin: Two-factor Authentication, XML-RPC Protection and Login Page CAPTCHA.', 'wordfence-2fa'); ?></p>
|
||||
<p><?php printf(__('If you\'re looking for a more comprehensive solution, the <a href="%s" target="_blank" rel="noopener noreferrer">full Wordfence plugin</a> includes all of the features in this plugin as well as a full-featured WordPress firewall, a security scanner, live traffic, and more. The standard installation includes a robust set of free features that can be upgraded via a Premium license key.', 'wordfence-2fa'), 'https://wordpress.org/plugins/wordfence/'); ?></p>
|
||||
<p><?php esc_html_e('You have just installed the Wordfence Login Security plugin. It contains a subset of the functionality found in the full Wordfence plugin: Two-factor Authentication, XML-RPC Protection and Login Page CAPTCHA.', 'wordfence'); ?></p>
|
||||
<p><?php printf(__('If you\'re looking for a more comprehensive solution, the <a href="%s" target="_blank" rel="noopener noreferrer">full Wordfence plugin</a> includes all of the features in this plugin as well as a full-featured WordPress firewall, a security scanner, live traffic, and more. The standard installation includes a robust set of free features that can be upgraded via a Premium license key.', 'wordfence'), 'https://wordpress.org/plugins/wordfence/'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<script type="application/javascript">
|
||||
|
||||
@@ -4,17 +4,17 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
$optionName = \WordfenceLS\Controller_Settings::OPTION_RECAPTCHA_THRESHOLD;
|
||||
$currentValue = \WordfenceLS\Controller_Settings::shared()->get_float($optionName, 0.5);
|
||||
$selectOptions = array(
|
||||
array('label' => __('1.0 (definitely a human)', 'wordfence-2fa'), 'value' => 1.0),
|
||||
array('label' => __('0.9', 'wordfence-2fa'), 'value' => 0.9),
|
||||
array('label' => __('0.8', 'wordfence-2fa'), 'value' => 0.8),
|
||||
array('label' => __('0.7', 'wordfence-2fa'), 'value' => 0.7),
|
||||
array('label' => __('0.6', 'wordfence-2fa'), 'value' => 0.6),
|
||||
array('label' => __('0.5 (probably a human)', 'wordfence-2fa'), 'value' => 0.5),
|
||||
array('label' => __('0.4', 'wordfence-2fa'), 'value' => 0.4),
|
||||
array('label' => __('0.3', 'wordfence-2fa'), 'value' => 0.3),
|
||||
array('label' => __('0.2', 'wordfence-2fa'), 'value' => 0.2),
|
||||
array('label' => __('0.1', 'wordfence-2fa'), 'value' => 0.1),
|
||||
array('label' => __('0.0 (definitely a bot)', 'wordfence-2fa'), 'value' => 0.0),
|
||||
array('label' => __('1.0 (definitely a human)', 'wordfence'), 'value' => 1.0),
|
||||
array('label' => __('0.9', 'wordfence'), 'value' => 0.9),
|
||||
array('label' => __('0.8', 'wordfence'), 'value' => 0.8),
|
||||
array('label' => __('0.7', 'wordfence'), 'value' => 0.7),
|
||||
array('label' => __('0.6', 'wordfence'), 'value' => 0.6),
|
||||
array('label' => __('0.5 (probably a human)', 'wordfence'), 'value' => 0.5),
|
||||
array('label' => __('0.4', 'wordfence'), 'value' => 0.4),
|
||||
array('label' => __('0.3', 'wordfence'), 'value' => 0.3),
|
||||
array('label' => __('0.2', 'wordfence'), 'value' => 0.2),
|
||||
array('label' => __('0.1', 'wordfence'), 'value' => 0.1),
|
||||
array('label' => __('0.0 (definitely a bot)', 'wordfence'), 'value' => 0.0),
|
||||
);
|
||||
?>
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
@@ -25,8 +25,8 @@ $selectOptions = array(
|
||||
<ul>
|
||||
<li class="wfls-option-title">
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
<li><span id="wfls-option-recaptcha-threshold-label"><strong><?php esc_html_e('reCAPTCHA human/bot threshold score', 'wordfence-2fa'); ?></strong></span></li>
|
||||
<li class="wfls-option-subtitle"><?php esc_html_e('A reCAPTCHA score equal to or higher than this value will be considered human. Anything lower will be treated as a bot and require additional verification for login and registration.', 'wordfence-2fa'); ?></li>
|
||||
<li><span id="wfls-option-recaptcha-threshold-label"><strong><?php esc_html_e('reCAPTCHA human/bot threshold score', 'wordfence'); ?></strong></span></li>
|
||||
<li class="wfls-option-subtitle"><?php esc_html_e('A reCAPTCHA score equal to or higher than this value will be considered human. Anything lower will be treated as a bot and require additional verification for login and registration.', 'wordfence'); ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="wfls-option-select wfls-padding-add-top-xs-small">
|
||||
@@ -48,7 +48,7 @@ $selectOptions = array(
|
||||
<canvas id="wfls-recaptcha-score-history"></canvas>
|
||||
</div>
|
||||
<div class="wfls-center">
|
||||
<a href="#" id="wfls-reset-recaptcha-score-stats" class="wfls-text-small"><?php esc_html_e('Reset Score Statistics', 'wordfence-2fa'); ?></a>
|
||||
<a href="#" id="wfls-reset-recaptcha-score-stats" class="wfls-text-small"><?php esc_html_e('Reset Score Statistics', 'wordfence'); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -85,7 +85,7 @@ $selectOptions = array(
|
||||
var barChartData = {
|
||||
labels: ['0.0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0'],
|
||||
datasets: [{
|
||||
label: '<?php esc_attr_e('Requests', 'wordfence-2fa'); ?>',
|
||||
label: '<?php esc_attr_e('Requests', 'wordfence'); ?>',
|
||||
backgroundColor: 'rgba(75,192,192,0.4)',
|
||||
borderColor: 'rgba(75,192,192,1.0)',
|
||||
borderWidth: 1,
|
||||
@@ -103,21 +103,21 @@ $selectOptions = array(
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: '<?php esc_attr_e('reCAPTCHA Score History', 'wordfence-2fa'); ?>'
|
||||
text: '<?php esc_attr_e('reCAPTCHA Score History', 'wordfence'); ?>'
|
||||
},
|
||||
scales: {
|
||||
yAxes: [{
|
||||
y: {
|
||||
display: true,
|
||||
scaleLabel: {
|
||||
title: {
|
||||
display: true,
|
||||
labelString: '<?php esc_attr_e('Count', 'wordfence-2fa'); ?>'
|
||||
text: '<?php esc_attr_e('Count', 'wordfence'); ?>'
|
||||
},
|
||||
ticks: {
|
||||
min: 0,
|
||||
precision: 0,
|
||||
stepSize: <?php echo max(10, pow(10, floor(log10(array_sum($stats['counts']) / 5)))); ?>
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -17,9 +17,9 @@ $secretValue = \WordfenceLS\Controller_Settings::shared()->get($secretOptionName
|
||||
<li class="wfls-option-title">
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
<li>
|
||||
<strong id="wfls-enable-auth-captcha-label"><?php esc_html_e('Enable reCAPTCHA on the login and user registration pages', 'wordfence-2fa'); ?></strong>
|
||||
<strong id="wfls-enable-auth-captcha-label"><?php esc_html_e('Enable reCAPTCHA on the login and user registration pages', 'wordfence'); ?></strong>
|
||||
</li>
|
||||
<li class="wfls-option-subtitle"><?php printf(__('reCAPTCHA v3 does not make users solve puzzles or click a checkbox like previous versions. The only visible part is the reCAPTCHA logo. If a visitor\'s browser fails the CAPTCHA, Wordfence will send an email to the user\'s address with a link they can click to verify that they are a user of your site. You can read further details <a href="%s" target="_blank" rel="noopener noreferrer">in our documentation</a>.', 'wordfence-2fa'), \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_CAPTCHA)); ?></li>
|
||||
<li class="wfls-option-subtitle"><?php printf(__('reCAPTCHA v3 does not make users solve puzzles or click a checkbox like previous versions. The only visible part is the reCAPTCHA logo. If a visitor\'s browser fails the CAPTCHA, Wordfence will send an email to the user\'s address with a link they can click to verify that they are a user of your site. You can read further details <a href="%s" target="_blank" rel="noopener noreferrer">in our documentation</a>.', 'wordfence'), \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_CAPTCHA)); ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -30,11 +30,11 @@ $secretValue = \WordfenceLS\Controller_Settings::shared()->get($secretOptionName
|
||||
<li>
|
||||
<table>
|
||||
<tr class="wfls-option wfls-option-text" data-original-value="<?php echo esc_attr($siteKeyValue); ?>" data-text-option="<?php echo esc_attr($siteKeyOptionName); ?>">
|
||||
<th id="wfls-enable-captcha-site-key-label" class="wfls-padding-add-bottom"><?php esc_html_e('reCAPTCHA v3 Site Key', 'wordfence-2fa'); ?></th>
|
||||
<th id="wfls-enable-captcha-site-key-label" class="wfls-padding-add-bottom"><?php esc_html_e('reCAPTCHA v3 Site Key', 'wordfence'); ?></th>
|
||||
<td class="wfls-option-text wfls-padding-add-bottom"><input type="text" name="recaptchaSiteKey" id="input-recaptchaSiteKey" class="wfls-form-control" value="<?php echo esc_attr($siteKeyValue); ?>"<?php if (!$currentEnableValue) { echo ' disabled'; } ?>></td>
|
||||
</tr>
|
||||
<tr class="wfls-option wfls-option-text" data-original-value="<?php echo esc_attr($secretValue); ?>" data-text-option="<?php echo esc_attr($secretOptionName); ?>">
|
||||
<th id="wfls-enable-captcha-secret-label"><?php esc_html_e('reCAPTCHA v3 Secret', 'wordfence-2fa'); ?></th>
|
||||
<th id="wfls-enable-captcha-secret-label"><?php esc_html_e('reCAPTCHA v3 Secret', 'wordfence'); ?></th>
|
||||
<td class="wfls-option-text"><input type="text" name="recaptchaSecret" id="input-recaptchaSecret" class="wfls-form-control" value="<?php echo esc_attr($secretValue); ?>"<?php if (!$currentEnableValue) { echo ' disabled'; } ?>></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -44,7 +44,7 @@ $secretValue = \WordfenceLS\Controller_Settings::shared()->get($secretOptionName
|
||||
<li class="wfls-option-spacer"></li>
|
||||
<li class="wfls-option-title">
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
<li class="wfls-option-subtitle"><?php echo wp_kses(__('Note: This feature requires a free site key and secret for the <a href="https://www.google.com/recaptcha/about/" target="_blank" rel="noopener noreferrer">Google reCAPTCHA v3 Service</a>. To set up new reCAPTCHA keys, log into your Google account and go to the <a href="https://www.google.com/recaptcha/admin" target="_blank" rel="noopener noreferrer">reCAPTCHA admin page</a>.', 'wordfence-2fa'), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?></li>
|
||||
<li class="wfls-option-subtitle"><?php echo wp_kses(__('Note: This feature requires a free site key and secret for the <a href="https://www.google.com/recaptcha/about/" target="_blank" rel="noopener noreferrer">Google reCAPTCHA v3 Service</a>. To set up new reCAPTCHA keys, log into your Google account and go to the <a href="https://www.google.com/recaptcha/admin" target="_blank" rel="noopener noreferrer">reCAPTCHA admin page</a>.', 'wordfence'), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -5,10 +5,10 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
*/
|
||||
|
||||
$selectOptions = array(
|
||||
array('value' => \WordfenceLS\Model_Request::IP_SOURCE_AUTOMATIC, 'label' => esc_html__('Use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites.', 'wordfence-2fa') . ' <strong>' . esc_html__('(Recommended)', 'wordfence-2fa') . '</strong>'),
|
||||
array('value' => \WordfenceLS\Model_Request::IP_SOURCE_REMOTE_ADDR, 'label' => esc_html__('Use PHP\'s built in REMOTE_ADDR and don\'t use anything else. Very secure if this is compatible with your site.', 'wordfence-2fa')),
|
||||
array('value' => \WordfenceLS\Model_Request::IP_SOURCE_X_FORWARDED_FOR, 'label' => esc_html__('Use the X-Forwarded-For HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'wordfence-2fa')),
|
||||
array('value' => \WordfenceLS\Model_Request::IP_SOURCE_X_REAL_IP, 'label' => esc_html__('Use the X-Real-IP HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'wordfence-2fa')),
|
||||
array('value' => \WordfenceLS\Model_Request::IP_SOURCE_AUTOMATIC, 'label' => esc_html__('Use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites.', 'wordfence') . ' <strong>' . esc_html__('(Recommended)', 'wordfence') . '</strong>'),
|
||||
array('value' => \WordfenceLS\Model_Request::IP_SOURCE_REMOTE_ADDR, 'label' => esc_html__('Use PHP\'s built in REMOTE_ADDR and don\'t use anything else. Very secure if this is compatible with your site.', 'wordfence')),
|
||||
array('value' => \WordfenceLS\Model_Request::IP_SOURCE_X_FORWARDED_FOR, 'label' => esc_html__('Use the X-Forwarded-For HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'wordfence')),
|
||||
array('value' => \WordfenceLS\Model_Request::IP_SOURCE_X_REAL_IP, 'label' => esc_html__('Use the X-Real-IP HTTP header. Only use if you have a front-end proxy or spoofing may result.', 'wordfence')),
|
||||
);
|
||||
?>
|
||||
<ul class="wfls-flex-vertical wfls-flex-full-width">
|
||||
@@ -16,7 +16,7 @@ $selectOptions = array(
|
||||
<ul id="wfls-option-ip-source" class="wfls-option wfls-option-ip-source" data-option="<?php echo esc_attr(\WordfenceLS\Controller_Settings::OPTION_IP_SOURCE); ?>" data-original-value="<?php echo esc_attr(\WordfenceLS\Controller_Settings::shared()->get(\WordfenceLS\Controller_Settings::OPTION_IP_SOURCE)); ?>" data-text-area-option="<?php echo esc_attr(\WordfenceLS\Controller_Settings::OPTION_IP_TRUSTED_PROXIES); ?>" data-original-text-area-value="<?php echo esc_attr(\WordfenceLS\Controller_Settings::shared()->get(\WordfenceLS\Controller_Settings::OPTION_IP_TRUSTED_PROXIES)); ?>">
|
||||
<li class="wfls-option-content wfls-no-right">
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
<li class="wfls-option-title"><strong><?php esc_html_e('How to get IPs', 'wordfence-2fa'); ?></strong></li>
|
||||
<li class="wfls-option-title"><strong><?php esc_html_e('How to get IPs', 'wordfence'); ?></strong></li>
|
||||
<li>
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
<li class="wfls-padding-add-left">
|
||||
@@ -44,8 +44,8 @@ $selectOptions = array(
|
||||
<ul>
|
||||
<li class="wfls-option-title">
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
<li><?php esc_html_e('Trusted Proxies', 'wordfence-2fa'); ?></li>
|
||||
<li class="wfls-option-subtitle"><?php esc_html_e('These IPs (or CIDR ranges) will be ignored when determining the requesting IP via the X-Forwarded-For HTTP header. Enter one IP or CIDR range per line.', 'wordfence-2fa'); ?></li>
|
||||
<li><?php esc_html_e('Trusted Proxies', 'wordfence'); ?></li>
|
||||
<li class="wfls-option-subtitle"><?php esc_html_e('These IPs (or CIDR ranges) will be ignored when determining the requesting IP via the X-Forwarded-For HTTP header. Enter one IP or CIDR range per line.', 'wordfence'); ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="wfls-option-textarea">
|
||||
|
||||
@@ -5,28 +5,28 @@ $cronDisabled = \WordfenceLS\Controller_Settings::shared()->is_ntp_cron_disabled
|
||||
$id = 'wfls-option-ntp';
|
||||
?>
|
||||
<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-flex-vertical wfls-flex-align-left">
|
||||
<li class="wfls-option-title"><strong><?php esc_html_e('NTP', 'wordfence-2fa') ?></strong></li>
|
||||
<li class="wfls-option-title"><strong><?php esc_html_e('NTP', 'wordfence') ?></strong></li>
|
||||
<li class="wfls-option-content">
|
||||
<p><?php esc_html_e('NTP is a protocol that allows for remote time synchronization. Wordfence Login Security uses this protocol to ensure that it has the most accurate time which is necessary for TOTP-based two-factor authentication.', 'wordfence-2fa') ?></p>
|
||||
<p><?php esc_html_e('NTP is a protocol that allows for remote time synchronization. Wordfence Login Security uses this protocol to ensure that it has the most accurate time which is necessary for TOTP-based two-factor authentication.', 'wordfence') ?></p>
|
||||
<?php if (\WordfenceLS\Controller_Settings::shared()->is_ntp_disabled_via_constant()): ?>
|
||||
<p><?php esc_html_e('The constant WORDFENCE_LS_DISABLE_NTP is defined which disables NTP entirely. Remove this constant or set it to a falsy value to enable NTP.', 'wordfence-2fa') ?></p>
|
||||
<p><?php esc_html_e('The constant WORDFENCE_LS_DISABLE_NTP is defined which disables NTP entirely. Remove this constant or set it to a falsy value to enable NTP.', 'wordfence') ?></p>
|
||||
<?php elseif ($cronDisabled): ?>
|
||||
<?php if ($failureCount > 0): ?>
|
||||
<p><strong><?php echo sprintf(esc_html__('NTP is currently disabled as %d subsequent attempts have failed.', 'wordfence-2fa'), $maxFailures) ?></strong></p>
|
||||
<p><strong><?php echo sprintf(esc_html__('NTP is currently disabled as %d subsequent attempts have failed.', 'wordfence'), $maxFailures) ?></strong></p>
|
||||
<?php else: ?>
|
||||
<p><?php esc_html_e('NTP was manually disabled.', 'wordfence-2fa') ?></p>
|
||||
<p><?php esc_html_e('NTP was manually disabled.', 'wordfence') ?></p>
|
||||
<?php endif ?>
|
||||
<button id="wfls-reset-ntp-failure-count" class="wfls-btn wfls-btn-sm wfls-btn-default"><?php esc_html_e('Reset', 'wordfence-2fa') ?></button>
|
||||
<button id="wfls-reset-ntp-failure-count" class="wfls-btn wfls-btn-sm wfls-btn-default"><?php esc_html_e('Reset', 'wordfence') ?></button>
|
||||
<?php else: ?>
|
||||
<p><?php echo wp_kses(__('NTP is currently <strong>enabled</strong>.', 'wordfence-2fa'), array('strong'=>array())); ?></p>
|
||||
<p><?php echo wp_kses(__('NTP is currently <strong>enabled</strong>.', 'wordfence'), array('strong'=>array())); ?></p>
|
||||
<?php if ($failureCount > 0): ?>
|
||||
<?php $remainingAttempts = $maxFailures - $failureCount; ?>
|
||||
<p>
|
||||
<strong><?php esc_html_e('NTP updates are currently failing.', 'wordfence-2fa') ?></strong>
|
||||
<?php echo $remainingAttempts > 0 ? sprintf(esc_html__('NTP will be automatically disabled after %d more attempts.', 'wordfence-2fa'), $remainingAttempts) : esc_html__('NTP will be automatically disabled after 1 more attempt.', 'wordfence-2fa') ?>
|
||||
<strong><?php esc_html_e('NTP updates are currently failing.', 'wordfence') ?></strong>
|
||||
<?php echo $remainingAttempts > 0 ? sprintf(esc_html__('NTP will be automatically disabled after %d more attempts.', 'wordfence'), $remainingAttempts) : esc_html__('NTP will be automatically disabled after 1 more attempt.', 'wordfence') ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
<button id="wfls-disable-ntp" class="wfls-btn wfls-btn-sm wfls-btn-default"><?php esc_html_e('Disable', 'wordfence-2fa') ?></button>
|
||||
<button id="wfls-disable-ntp" class="wfls-btn wfls-btn-sm wfls-btn-default"><?php esc_html_e('Disable', 'wordfence') ?></button>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -40,8 +40,8 @@ $id = 'wfls-option-ntp';
|
||||
function handleError(message) {
|
||||
WFLS.panelModal(
|
||||
(WFLS.screenSize(500) ? '300px' : '400px'),
|
||||
'<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Resetting NTP', 'wordfence-2fa')); ?>',
|
||||
typeof message === 'undefined' ? '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to reset the NTP state. Please try again.', 'wordfence-2fa')); ?>' : message
|
||||
'<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Resetting NTP', 'wordfence')); ?>',
|
||||
typeof message === 'undefined' ? '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to reset the NTP state. Please try again.', 'wordfence')); ?>' : message
|
||||
);
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@ $id = 'wfls-option-ntp';
|
||||
function handleError(message) {
|
||||
WFLS.panelModal(
|
||||
(WFLS.screenSize(500) ? '300px' : '400px'),
|
||||
'<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Disabling NTP', 'wordfence-2fa')); ?>',
|
||||
typeof message === 'undefined' ? '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to disable NTP. Please try again.', 'wordfence-2fa')); ?>' : message
|
||||
'<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Disabling NTP', 'wordfence')); ?>',
|
||||
typeof message === 'undefined' ? '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to disable NTP. Please try again.', 'wordfence')); ?>' : message
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ use WordfenceLS\Controller_Settings;
|
||||
use WordfenceLS\Text\Model_JavaScript;
|
||||
|
||||
$states = array(
|
||||
Controller_Settings::STATE_2FA_DISABLED => __('Disabled', 'wordfence-2fa'),
|
||||
Controller_Settings::STATE_2FA_OPTIONAL => __('Optional', 'wordfence-2fa'),
|
||||
Controller_Settings::STATE_2FA_REQUIRED => __('Required', 'wordfence-2fa')
|
||||
Controller_Settings::STATE_2FA_DISABLED => __('Disabled', 'wordfence'),
|
||||
Controller_Settings::STATE_2FA_OPTIONAL => __('Optional', 'wordfence'),
|
||||
Controller_Settings::STATE_2FA_REQUIRED => __('Required', 'wordfence')
|
||||
);
|
||||
|
||||
$gracePeriod = Controller_Settings::shared()->get_int(Controller_Settings::OPTION_REQUIRE_2FA_USER_GRACE_PERIOD, Controller_Settings::DEFAULT_REQUIRE_2FA_USER_GRACE_PERIOD);
|
||||
@@ -20,12 +20,12 @@ foreach ($options as $option) {
|
||||
}
|
||||
}
|
||||
|
||||
$customerRoleWarning = __('Requiring 2FA for customers is not recommended as some customers may experience difficulties setting up or using two-factor authentication. Instead, using the "Optional" mode for users with the customer role is recommended which will allow customers to enable 2FA, but will not require them to do so.', 'wordfence-2fa');
|
||||
$customerRoleWarning = __('Requiring 2FA for customers is not recommended as some customers may experience difficulties setting up or using two-factor authentication. Instead, using the "Optional" mode for users with the customer role is recommended which will allow customers to enable 2FA, but will not require them to do so.', 'wordfence');
|
||||
|
||||
?>
|
||||
<ul class="wfls-option wfls-option-2fa-roles">
|
||||
<li class="wfls-option-title">
|
||||
<label><?php esc_html_e('2FA Roles', 'wordfence-2fa') ?></label>
|
||||
<label><?php esc_html_e('2FA Roles', 'wordfence') ?></label>
|
||||
</li>
|
||||
<li class="wfls-option-content">
|
||||
<ul>
|
||||
@@ -50,28 +50,28 @@ $customerRoleWarning = __('Requiring 2FA for customers is not recommended as som
|
||||
</ul>
|
||||
<p id="wfls-customer-2fa-required-warning" class="wfls-notice" style="display: none;"><?php echo esc_html($customerRoleWarning) ?></p>
|
||||
<?php if ($hasWoocommerce && !$woocommerceIntegrationEnabled): ?>
|
||||
<p class="wfls-woocommerce-customer-integration-message"><small><?php esc_html_e('In order to use 2FA with the WooCommerce customer role, you must either enable the "WooCommerce integration" option or use the "wordfence_2fa_management" shortcode to provide customers with access to the 2FA management interface. The default interface is only available through WordPress admin pages which are not accessible to users in the customer role.', 'wordfence-2fa') ?></small></p>
|
||||
<p class="wfls-woocommerce-customer-integration-message"><small><?php esc_html_e('In order to use 2FA with the WooCommerce customer role, you must either enable the "WooCommerce integration" option or use the "wordfence_2fa_management" shortcode to provide customers with access to the 2FA management interface. The default interface is only available through WordPress admin pages which are not accessible to users in the customer role.', 'wordfence') ?></small></p>
|
||||
<?php endif ?>
|
||||
</li>
|
||||
<li class="wfls-2fa-grace-period-container">
|
||||
<label for="wfls-2fa-grace-period" class="wfls-primary-label"><?php esc_html_e('Grace Period', 'wordfence-2fa') ?></label>
|
||||
<label for="wfls-2fa-grace-period" class="wfls-primary-label"><?php esc_html_e('Grace Period', 'wordfence') ?></label>
|
||||
<input id="wfls-2fa-grace-period" type="text" pattern="[0-9]+" value="<?php echo (int)$gracePeriod; ?>" class="wfls-option-input wfls-option-input-required" name="<?php echo esc_html(Controller_Settings::OPTION_REQUIRE_2FA_USER_GRACE_PERIOD) ?>" maxlength="2">
|
||||
<label for="wfls-2fa-grace-period"><?php esc_html_e('days', 'wordfence-2fa') ?></label>
|
||||
<label for="wfls-2fa-grace-period"><?php esc_html_e('days', 'wordfence') ?></label>
|
||||
<div id="wfls-grace-period-zero-warning" style="display: none;">
|
||||
<strong><?php esc_html_e('Setting the grace period to 0 will prevent users in roles where 2FA is required, including newly created users, from logging in if they have not already enabled two-factor authentication.', 'wordfence-2fa') ?></strong>
|
||||
<a href="<?php echo esc_attr(\WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_ROLES)) ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Learn More', 'wordfence-2fa') ?></a>
|
||||
<strong><?php esc_html_e('Setting the grace period to 0 will prevent users in roles where 2FA is required, including newly created users, from logging in if they have not already enabled two-factor authentication.', 'wordfence') ?></strong>
|
||||
<a href="<?php echo esc_attr(\WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_ROLES)) ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Learn More', 'wordfence') ?></a>
|
||||
</div>
|
||||
<small><?php esc_html_e('For roles that require 2FA, users will have this many days to set up 2FA. Failure to set up 2FA during this period will result in the user losing account access. This grace period will apply to new users from the time of account creation. For existing users, this grace period will apply relative to the time at which the requirement is implemented. This grace period will not automatically apply to admins and must be manually enabled for each admin user.', 'wordfence-2fa') ?></small>
|
||||
<small><?php esc_html_e('For roles that require 2FA, users will have this many days to set up 2FA. Failure to set up 2FA during this period will result in the user losing account access. This grace period will apply to new users from the time of account creation. For existing users, this grace period will apply relative to the time at which the requirement is implemented. This grace period will not automatically apply to admins and must be manually enabled for each admin user.', 'wordfence') ?></small>
|
||||
</li>
|
||||
<?php if (!empty($requiredRoles)): ?>
|
||||
<li class="wfls-2fa-notification-action">
|
||||
<h4><?php esc_html_e('2FA Notifications', 'wordfence-2fa') ?></h4>
|
||||
<h4><?php esc_html_e('2FA Notifications', 'wordfence') ?></h4>
|
||||
<p>
|
||||
<small><?php esc_html_e('Send an email to users with the selected role to notify them of the grace period for enabling 2FA. Select the desired role and optionally specify the URL to be sent in the email to setup 2FA. If left blank, the URL defaults to the standard wordpress login and Wordfence’s Two-Factor Authentication plugin page. For example, if using WooCommerce, input the relative URL of the account page.', 'wordfence-2fa') ?></small>
|
||||
<small><?php esc_html_e('Send an email to users with the selected role to notify them of the grace period for enabling 2FA. Select the desired role and optionally specify the URL to be sent in the email to setup 2FA. If left blank, the URL defaults to the standard wordpress login and Wordfence’s Two-Factor Authentication plugin page. For example, if using WooCommerce, input the relative URL of the account page.', 'wordfence') ?></small>
|
||||
<a href="<?php echo \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA_NOTIFICATIONS) ?>" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="<?php echo \WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o'; ?>" aria-hidden="true"></i></a>
|
||||
</p>
|
||||
<div>
|
||||
<label><?php esc_html_e('2FA Role', 'wordfence-2fa') ?></label>
|
||||
<label><?php esc_html_e('2FA Role', 'wordfence') ?></label>
|
||||
<select id="wfls-grace-period-notification-role">
|
||||
<?php foreach ($requiredRoles as $role => $label): ?>
|
||||
<option value="<?php echo esc_attr($role) ?>"><?php echo esc_html($label) ?></option>
|
||||
@@ -79,10 +79,10 @@ $customerRoleWarning = __('Requiring 2FA for customers is not recommended as som
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label><?php esc_html_e('2FA Relative URL (optional)', 'wordfence-2fa') ?></label>
|
||||
<label><?php esc_html_e('2FA Relative URL (optional)', 'wordfence') ?></label>
|
||||
<input id="wfls-grace-period-notification-url" type="text" placeholder="ex: /my-account/">
|
||||
</div>
|
||||
<button class="wfls-btn wfls-btn-default wfls-btn-sm" id="wfls-send-grace-period-notification"><?php esc_html_e('Notify', 'wordfence-2fa') ?></button>
|
||||
<button class="wfls-btn wfls-btn-default wfls-btn-sm" id="wfls-send-grace-period-notification"><?php esc_html_e('Notify', 'wordfence') ?></button>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
@@ -103,21 +103,21 @@ $customerRoleWarning = __('Requiring 2FA for customers is not recommended as som
|
||||
};
|
||||
if (response.limit_exceeded) {
|
||||
settings.additional_buttons.push({
|
||||
label: '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Send Anyway', 'wordfence-2fa')); ?>',
|
||||
label: '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Send Anyway', 'wordfence')); ?>',
|
||||
id: 'wfls-send-grace-period-notification-over-limit'
|
||||
});
|
||||
}
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Sending Notification', 'wordfence-2fa')); ?>', response.error, settings);
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Sending Notification', 'wordfence')); ?>', response.error, settings);
|
||||
}
|
||||
else {
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Notification Sent', 'wordfence-2fa')); ?>', response.confirmation);
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Notification Sent', 'wordfence')); ?>', response.confirmation);
|
||||
}
|
||||
if (request.notify_all) {
|
||||
WFLS.panelClose();
|
||||
}
|
||||
},
|
||||
function (error) {
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Sending Notification', 'wordfence-2fa')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to send the notification. Please try again.', 'wordfence-2fa')); ?>');
|
||||
WFLS.panelModal((WFLS.screenSize(500) ? '300px' : '400px'), '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('Error Sending Notification', 'wordfence')); ?>', '<?php echo \WordfenceLS\Text\Model_JavaScript::esc_js(__('An error was encountered while trying to send the notification. Please try again.', 'wordfence')); ?>');
|
||||
if (request.notify_all) {
|
||||
WFLS.panelClose();
|
||||
}
|
||||
@@ -158,16 +158,16 @@ $customerRoleWarning = __('Requiring 2FA for customers is not recommended as som
|
||||
toggleCustomerRoleWarning();
|
||||
if (isCustomerRoleRequired()) {
|
||||
WFLS.displayModalMessage(
|
||||
<?php Model_JavaScript::echo_string_literal(__('Not Recommended', 'wordfence-2fa')) ?>,
|
||||
<?php Model_JavaScript::echo_string_literal(__('Not Recommended', 'wordfence')) ?>,
|
||||
<?php Model_JavaScript::echo_string_literal($customerRoleWarning) ?>,
|
||||
[
|
||||
{
|
||||
label: <?php Model_JavaScript::echo_string_literal(__('Make Optional', 'wordfence-2fa')) ?>,
|
||||
label: <?php Model_JavaScript::echo_string_literal(__('Make Optional', 'wordfence')) ?>,
|
||||
id: 'wfls-customer-role-warning-revert',
|
||||
type: 'primary'
|
||||
},
|
||||
{
|
||||
label: <?php Model_JavaScript::echo_string_literal(__('Proceed', 'wordfence-2fa')) ?>,
|
||||
label: <?php Model_JavaScript::echo_string_literal(__('Proceed', 'wordfence')) ?>,
|
||||
id: 'wfls-generic-modal-close',
|
||||
type: 'danger'
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ $id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $selectOptionName);
|
||||
<li class="wfls-option-spacer"></li>
|
||||
<li class="wfls-option-content">
|
||||
<ul>
|
||||
<li class="wfls-option-title"><span id="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence-2fa') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li>
|
||||
<li class="wfls-option-title"><span id="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li>
|
||||
<li class="wfls-option-select wfls-padding-add-top-xs-small">
|
||||
<select<?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?> aria-labelledby="<?php echo esc_attr($id); ?>-label">
|
||||
<?php foreach ($selectOptions as $o): ?>
|
||||
|
||||
@@ -27,7 +27,7 @@ $id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $textOptionName);
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
<li>
|
||||
<?php endif; ?>
|
||||
<span id="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence-2fa') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
<span id="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
<?php if (isset($subtitle)): ?>
|
||||
</li>
|
||||
<li class="wfls-option-subtitle"><?php echo esc_html($subtitle); ?></li>
|
||||
|
||||
@@ -29,7 +29,7 @@ $id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $optionName);
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
<li>
|
||||
<?php endif; ?>
|
||||
<span id="<?php echo esc_attr($id); ?>-label"><?php echo (!empty($title)) ? esc_html($title) : ''; echo (!empty($htmlTitle)) ? wp_kses($htmlTitle, 'post') : ''; ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence-2fa') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
<span id="<?php echo esc_attr($id); ?>-label"><?php echo (!empty($title)) ? esc_html($title) : ''; echo (!empty($htmlTitle)) ? wp_kses($htmlTitle, 'post') : ''; ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
<?php if (isset($subtitleHTML)): ?>
|
||||
</li>
|
||||
<li class="wfls-option-subtitle"><?php echo $subtitleHTML; ?></li>
|
||||
|
||||
@@ -18,7 +18,7 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
$id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $optionName);
|
||||
?>
|
||||
<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-toggled-segmented<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-option="<?php echo esc_attr($optionName); ?>" data-enabled-value="<?php echo esc_attr($enabledValue); ?>" data-disabled-value="<?php echo esc_attr($disabledValue); ?>" data-original-value="<?php echo esc_attr($value == $enabledValue ? $enabledValue : $disabledValue); ?>">
|
||||
<li class="wfls-option-title"><?php echo (!empty($title)) ? esc_html($title) : ''; echo (!empty($htmlTitle)) ? wp_kses($htmlTitle, 'post') : ''; ?><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence-2fa') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li>
|
||||
<li class="wfls-option-title"><?php echo (!empty($title)) ? esc_html($title) : ''; echo (!empty($htmlTitle)) ? wp_kses($htmlTitle, 'post') : ''; ?><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li>
|
||||
<li class="wfls-option-segments">
|
||||
<?php
|
||||
$onId = sanitize_key('wfls-segment-' . $optionName . '-on');
|
||||
|
||||
@@ -24,7 +24,7 @@ $selectID = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $selectOptionName
|
||||
<li id="<?php echo esc_attr($toggleID); ?>" class="wfls-option-checkbox<?php echo ($toggleValue == $enabledToggleValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($toggleValue == $enabledToggleValue ? 'true' : 'false'); ?>" tabindex="0"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true"></i></li>
|
||||
<li class="wfls-option-content">
|
||||
<ul id="<?php echo esc_attr($selectID); ?>">
|
||||
<li class="wfls-option-title"><span id="<?php echo esc_attr($selectID); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence-2fa') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li>
|
||||
<li class="wfls-option-title"><span id="<?php echo esc_attr($selectID); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li>
|
||||
<li class="wfls-option-select wfls-padding-add-top-xs-small">
|
||||
<select<?php echo ($toggleValue == $enabledToggleValue && !(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?> aria-labelledby="<?php echo esc_attr($selectID); ?>-label">
|
||||
<?php foreach ($selectOptions as $o): ?>
|
||||
|
||||
@@ -41,7 +41,7 @@ $subID = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $subOptionName);
|
||||
<ul id="<?php echo esc_attr($id); ?>" class="wfls-option wfls-option-toggled<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-option="<?php echo esc_attr($optionName); ?>" data-enabled-value="<?php echo esc_attr($enabledValue); ?>" data-disabled-value="<?php echo esc_attr($disabledValue); ?>" data-original-value="<?php echo esc_attr($value == $enabledValue ? $enabledValue : $disabledValue); ?>">
|
||||
<li class="wfls-option-checkbox<?php echo ($value == $enabledValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($value == $enabledValue ? 'true' : 'false'); ?>" tabindex="0" aria-labelledby="<?php echo esc_attr($id); ?>-label"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true"></i></li>
|
||||
<li class="wfls-option-title">
|
||||
<span id="<?php echo esc_attr($id); ?>-label"><?php echo $htmlTitle; ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence-2fa') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
<span id="<?php echo esc_attr($id); ?>-label"><?php echo $htmlTitle; ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -49,7 +49,7 @@ $subID = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $subOptionName);
|
||||
<ul id="<?php echo esc_attr($subID); ?>" class="wfls-option wfls-option-toggled<?php if (!wfConfig::p() && isset($subPremium) && $subPremium) { echo ' wfls-option-premium'; } ?>" data-option="<?php echo esc_attr($subOptionName); ?>" data-enabled-value="<?php echo esc_attr($subEnabledValue); ?>" data-disabled-value="<?php echo esc_attr($subDisabledValue); ?>" data-original-value="<?php echo esc_attr($subValue == $subEnabledValue ? $subEnabledValue : $subDisabledValue); ?>">
|
||||
<li class="wfls-option-checkbox<?php echo ($subValue == $subEnabledValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($subValue == $subEnabledValue ? 'true' : 'false'); ?>" tabindex="0" aria-labelledby="<?php echo esc_attr($subID); ?>-label"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true"></i></li>
|
||||
<li class="wfls-option-title">
|
||||
<span id="<?php echo esc_attr($subID); ?>-label"><?php echo $subHtmlTitle; ?></span><?php if (!wfConfig::p() && isset($subPremium) && $subPremium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence-2fa') . '</a>'; } ?><?php if (isset($subHelpLink)) { echo ' <a href="' . esc_attr($subHelpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
<span id="<?php echo esc_attr($subID); ?>-label"><?php echo $subHtmlTitle; ?></span><?php if (!wfConfig::p() && isset($subPremium) && $subPremium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($subHelpLink)) { echo ' <a href="' . esc_attr($subHelpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -21,7 +21,7 @@ $textAreaID = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $textAreaOption
|
||||
?>
|
||||
<ul class="wfls-option wfls-option-toggled-textarea<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wfls-option-premium'; } ?>" data-toggle-option="<?php echo esc_attr($toggleOptionName); ?>" data-enabled-toggle-value="<?php echo esc_attr($enabledToggleValue); ?>" data-disabled-toggle-value="<?php echo esc_attr($disabledToggleValue); ?>" data-original-toggle-value="<?php echo esc_attr($toggleValue == $enabledToggleValue ? $enabledToggleValue : $disabledToggleValue); ?>" data-text-area-option="<?php echo esc_attr($textAreaOptionName); ?>" data-original-text-area-value="<?php echo esc_attr($textAreaValue); ?>">
|
||||
<li id="<?php echo esc_attr($toggleID); ?>" class="wfls-option-checkbox<?php echo ($toggleValue == $enabledToggleValue ? ' wfls-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($toggleValue == $enabledToggleValue ? 'true' : 'false'); ?>" tabindex="0"><i class="wfls-ion-ios-checkmark-empty" aria-hidden="true" aria-labelledby="<?php echo esc_attr($toggleID); ?>-label"></i></li>
|
||||
<li class="wfls-option-title"><span id="<?php echo esc_attr($toggleID); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence-2fa') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li>
|
||||
<li class="wfls-option-title"><span id="<?php echo esc_attr($toggleID); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?></li>
|
||||
<li id="<?php echo esc_attr($textAreaID); ?>" class="wfls-option-textarea">
|
||||
<select<?php echo ($toggleValue == $enabledToggleValue && !(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?> aria-labelledby="<?php echo esc_attr($toggleID); ?>-label">
|
||||
<textarea<?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' disabled'); ?>><?php echo esc_html($textAreaValue); ?></textarea>
|
||||
|
||||
@@ -22,7 +22,7 @@ $id = 'wfls-option-' . preg_replace('/[^a-z0-9]/i', '-', $tokenOptionName);
|
||||
<ul class="wfls-flex-vertical wfls-flex-align-left">
|
||||
<li>
|
||||
<?php endif; ?>
|
||||
<span id="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence-2fa') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
<span id="<?php echo esc_attr($id); ?>-label"><?php echo esc_html($title); ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wfls-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" target="_blank" rel="noopener noreferrer" class="wfls-inline-help"><i class="' . (\WordfenceLS\Controller_WordfenceLS::shared()->should_use_core_font_awesome_styles() ? 'wf-fa wf-fa-question-circle-o' : 'wfls-fa wfls-fa-question-circle-o') . '" aria-hidden="true"></i></a>'; } ?>
|
||||
<?php if (isset($subtitle)): ?>
|
||||
</li>
|
||||
<li class="wfls-option-subtitle"><?php echo esc_html($subtitle); ?></li>
|
||||
|
||||
@@ -23,7 +23,7 @@ $columnClasses = 'wfls-flex-row wfls-flex-item-xs-100 ' . ($stacked ? '' : 'wfls
|
||||
<?php $asset->renderInlineIfNotEnqueued(); ?>
|
||||
<?php endforeach ?>
|
||||
<div id="wfls-management-embedded"<?php if ($stacked): ?> class="stacked" <?php endif ?>>
|
||||
<p><?php echo wp_kses(sprintf(__('Two-Factor Authentication, or 2FA, significantly improves login security for your account. Wordfence 2FA works with a number of TOTP-based apps like Google Authenticator, FreeOTP, and Authy. For a full list of tested TOTP-based apps, <a href="%s" target="_blank" rel="noopener noreferrer">click here</a>.', 'wordfence-2fa'), \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?></p>
|
||||
<p><?php echo wp_kses(sprintf(__('Two-Factor Authentication, or 2FA, significantly improves login security for your account. Wordfence 2FA works with a number of TOTP-based apps like Google Authenticator, FreeOTP, and Authy. For a full list of tested TOTP-based apps, <a href="%s" target="_blank" rel="noopener noreferrer">click here</a>.', 'wordfence'), \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?></p>
|
||||
<div id="wfls-deactivation-controls" class="<?php echo $containerClasses ?>"<?php if (!$enabled) { echo ' style="display: none;"'; } ?>>
|
||||
<!-- begin status content -->
|
||||
<div class="<?php echo $columnClasses ?>">
|
||||
|
||||
@@ -21,14 +21,14 @@ $requires2fa = \WordfenceLS\Controller_Users::shared()->requires_2fa($user, $inG
|
||||
$lockedOut = $requires2fa && !$enabled;
|
||||
|
||||
?>
|
||||
<p><?php echo wp_kses(sprintf(__('Two-Factor Authentication, or 2FA, significantly improves login security for your website. Wordfence 2FA works with a number of TOTP-based apps like Google Authenticator, FreeOTP, and Authy. For a full list of tested TOTP-based apps, <a href="%s" target="_blank" rel="noopener noreferrer">click here</a>.', 'wordfence-2fa'), \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?></p>
|
||||
<p><?php echo wp_kses(sprintf(__('Two-Factor Authentication, or 2FA, significantly improves login security for your website. Wordfence 2FA works with a number of TOTP-based apps like Google Authenticator, FreeOTP, and Authy. For a full list of tested TOTP-based apps, <a href="%s" target="_blank" rel="noopener noreferrer">click here</a>.', 'wordfence'), \WordfenceLS\Controller_Support::esc_supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_2FA)), array('a'=>array('href'=>array(), 'target'=>array(), 'rel'=>array()))); ?></p>
|
||||
<?php if ($canEditUsers): ?>
|
||||
<div id="wfls-editing-display" class="wfls-flex-row wfls-flex-row-xs-wrappable wfls-flex-row-equal-heights">
|
||||
<div class="wfls-block wfls-always-active wfls-flex-item-full-width wfls-add-bottom">
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<strong><?php echo wp_kses(sprintf(__('Editing User: %s <span class="wfls-text-plain">%s</span>', 'wordfence-2fa'), get_avatar($user->ID, 16, '', $user->user_login), \WordfenceLS\Text\Model_HTML::esc_html($user->user_login) . ($ownAccount ? ' ' . __('(you)', 'wordfence-2fa') : '')), array('span'=>array('class'=>array()))); ?></strong>
|
||||
<strong><?php echo wp_kses(sprintf(__('Editing User: %s <span class="wfls-text-plain">%s</span>', 'wordfence'), get_avatar($user->ID, 16, '', $user->user_login), \WordfenceLS\Text\Model_HTML::esc_html($user->user_login) . ($ownAccount ? ' ' . __('(you)', 'wordfence') : '')), array('span'=>array('class'=>array()))); ?></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,15 +105,15 @@ if (empty($tz)) {
|
||||
}
|
||||
?>
|
||||
<?php if (\WordfenceLS\Controller_Permissions::shared()->can_manage_settings()): ?>
|
||||
<p><?php esc_html_e('Server Time:', 'wordfence-2fa'); ?> <?php echo date('Y-m-d H:i:s', $time); ?> UTC (<?php echo \WordfenceLS\Controller_Time::format_local_time('Y-m-d H:i:s', $time) . ' ' . $tz; ?>)<br>
|
||||
<?php esc_html_e('Browser Time:', 'wordfence-2fa'); ?> <script type="application/javascript">var date = new Date(); document.write(date.toUTCString() + ' (' + date.toString() + ')');</script><br>
|
||||
<p><?php esc_html_e('Server Time:', 'wordfence'); ?> <?php echo date('Y-m-d H:i:s', $time); ?> UTC (<?php echo \WordfenceLS\Controller_Time::format_local_time('Y-m-d H:i:s', $time) . ' ' . $tz; ?>)<br>
|
||||
<?php esc_html_e('Browser Time:', 'wordfence'); ?> <script type="application/javascript">var date = new Date(); document.write(date.toUTCString() + ' (' + date.toString() + ')');</script><br>
|
||||
<?php
|
||||
if (\WordfenceLS\Controller_Settings::shared()->is_ntp_enabled()) {
|
||||
echo esc_html__('Corrected Time (NTP):', 'wordfence-2fa') . ' ' . date('Y-m-d H:i:s', $correctedTime) . ' UTC (' . \WordfenceLS\Controller_Time::format_local_time('Y-m-d H:i:s', $correctedTime) . ' ' . $tz . ')<br>';
|
||||
echo esc_html__('Corrected Time (NTP):', 'wordfence') . ' ' . date('Y-m-d H:i:s', $correctedTime) . ' UTC (' . \WordfenceLS\Controller_Time::format_local_time('Y-m-d H:i:s', $correctedTime) . ' ' . $tz . ')<br>';
|
||||
}
|
||||
else if (WORDFENCE_LS_FROM_CORE && $correctedTime != $time) {
|
||||
echo esc_html__('Corrected Time (WF):', 'wordfence-2fa') . ' ' . date('Y-m-d H:i:s', $correctedTime) . ' UTC (' . \WordfenceLS\Controller_Time::format_local_time('Y-m-d H:i:s', $correctedTime) . ' ' . $tz . ')<br>';
|
||||
echo esc_html__('Corrected Time (WF):', 'wordfence') . ' ' . date('Y-m-d H:i:s', $correctedTime) . ' UTC (' . \WordfenceLS\Controller_Time::format_local_time('Y-m-d H:i:s', $correctedTime) . ' ' . $tz . ')<br>';
|
||||
}
|
||||
?>
|
||||
<?php esc_html_e('Detected IP:', 'wordfence-2fa'); ?> <?php echo \WordfenceLS\Text\Model_HTML::esc_html(\WordfenceLS\Model_Request::current()->ip()); if (\WordfenceLS\Controller_Whitelist::shared()->is_whitelisted(\WordfenceLS\Model_Request::current()->ip())) { echo ' (' . esc_html__('allowlisted', 'wordfence-2fa') . ')'; } ?></p>
|
||||
<?php esc_html_e('Detected IP:', 'wordfence'); ?> <?php echo \WordfenceLS\Text\Model_HTML::esc_html(\WordfenceLS\Model_Request::current()->ip()); if (\WordfenceLS\Controller_Whitelist::shared()->is_whitelisted(\WordfenceLS\Model_Request::current()->ip())) { echo ' (' . esc_html__('allowlisted', 'wordfence') . ')'; } ?></p>
|
||||
<?php endif; ?>
|
||||
@@ -3,6 +3,6 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
|
||||
?>
|
||||
<div>
|
||||
<h2><?php esc_html_e('Permission Denied', 'wordfence-2fa') ?></h2>
|
||||
<p><?php esc_html_e('You do not have permission to manage 2FA settings for your account.', 'wordfence-2fa') ?></p>
|
||||
<h2><?php esc_html_e('Permission Denied', 'wordfence') ?></h2>
|
||||
<p><?php esc_html_e('You do not have permission to manage 2FA settings for your account.', 'wordfence') ?></p>
|
||||
</div>
|
||||
@@ -2,20 +2,20 @@
|
||||
if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
?>
|
||||
<?php if (is_multisite()): ?>
|
||||
<p><em>(<?php esc_html_e('This page only shows users and roles on the main site of this network', 'wordfence-2fa') ?>)</em></p>
|
||||
<p><em>(<?php esc_html_e('This page only shows users and roles on the main site of this network', 'wordfence') ?>)</em></p>
|
||||
<?php endif ?>
|
||||
<div class="wfls-block wfls-always-active wfls-flex-item-full-width wfls-add-bottom">
|
||||
<?php if ($requiredAt === false): ?>
|
||||
<div class="wfls-block-content">
|
||||
<p><?php echo esc_html(sprintf(__('2FA is not required for the %s role', 'wordfence-2fa'), $roleTitle)) ?></p>
|
||||
<p><?php echo esc_html(sprintf(__('2FA is not required for the %s role', 'wordfence'), $roleTitle)) ?></p>
|
||||
</div>
|
||||
<?php elseif (empty($users)): ?>
|
||||
<div class="wfls-block-content">
|
||||
<p>
|
||||
<?php if ($page == 1): ?>
|
||||
<?php echo esc_html(sprintf(__('No users found in the %s state for the %s role', 'wordfence-2fa'), $stateTitle, $roleTitle)) ?>
|
||||
<?php echo esc_html(sprintf(__('No users found in the %s state for the %s role', 'wordfence'), $stateTitle, $roleTitle)) ?>
|
||||
<?php else: ?>
|
||||
<?php echo esc_html(sprintf(__('Page %d is out of range', 'wordfence-2fa'), $page)) ?>
|
||||
<?php echo esc_html(sprintf(__('Page %d is out of range', 'wordfence'), $page)) ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</div>
|
||||
@@ -32,7 +32,7 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<?php if ($user->required_at): ?>
|
||||
<?php echo esc_html(\WordfenceLS\Controller_Time::format_local_time('F j, Y g:i A', $user->required_at)) ?>
|
||||
<?php else: ?>
|
||||
<?php esc_html_e('N/A', 'wordfence-2fa'); ?>
|
||||
<?php esc_html_e('N/A', 'wordfence'); ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -43,7 +43,7 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<?php if ($page > 1): ?>
|
||||
<a href="<?php echo esc_attr(add_query_arg($pageKey, $page-1) . "#$stateKey") ?>"><span class="dashicons dashicons-arrow-left-alt2"></span></a>
|
||||
<?php endif ?>
|
||||
<strong class="wfls-page-indicator"><?php esc_html_e('Page ', 'wordfence-2fa') ?><?php echo (int) $page ?></strong>
|
||||
<strong class="wfls-page-indicator"><?php esc_html_e('Page ', 'wordfence') ?><?php echo (int) $page ?></strong>
|
||||
<?php if (!$lastPage): ?>
|
||||
<a href="<?php echo esc_attr(add_query_arg($pageKey, $page+1) . "#$stateKey") ?>"><span class="dashicons dashicons-arrow-right-alt2"></span></a>
|
||||
<?php endif ?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
?>
|
||||
<div class="wfls-save-banner wfls-nowrap wfls-padding-add-right-responsive">
|
||||
<a href="#" id="wfls-cancel-changes" class="wfls-btn wfls-btn-sm wfls-btn-default wfls-disabled"><?php echo wp_kses(__('Cancel<span class="wfls-visible-sm-inline"> Changes</span>', 'wordfence-2fa'), array('span'=>array('class'=>array()))); ?></a> <a href="#" id="wfls-save-changes" class="wfls-btn wfls-btn-sm wfls-btn-primary wfls-disabled"><?php echo wp_kses(__('Save<span class="wfls-visible-sm-inline"> Changes</span>', 'wordfence-2fa'), array('span'=>array('class'=>array()))); ?></a>
|
||||
<a href="#" id="wfls-cancel-changes" class="wfls-btn wfls-btn-sm wfls-btn-default wfls-disabled"><?php echo wp_kses(/* translators: word order may be reversed as long as HTML remains around "Changes" */ __('Cancel<span class="wfls-visible-sm-inline"> Changes</span>', 'wordfence'), array('span'=>array('class'=>array()))); ?></a> <a href="#" id="wfls-save-changes" class="wfls-btn wfls-btn-sm wfls-btn-primary wfls-disabled"><?php echo wp_kses(/* translators: word order may be reversed as long as HTML remains around "Changes" */ __('Save<span class="wfls-visible-sm-inline"> Changes</span>', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>
|
||||
</div>
|
||||
<div id="wfls-settings" class="wfls-flex-row wfls-flex-row-wrappable wfls-flex-row-equal-heights">
|
||||
<!-- begin status content -->
|
||||
|
||||
@@ -6,7 +6,7 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<h3><?php esc_html_e('2FA', 'wordfence-2fa'); ?></h3>
|
||||
<h3><?php esc_html_e('2FA', 'wordfence'); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -20,7 +20,7 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
$options[] = array(
|
||||
'role' => 'super-admin',
|
||||
'name' => 'enabled-roles.super-admin',
|
||||
'title' => __('Super Administrator', 'wordfence-2fa'),
|
||||
'title' => __('Super Administrator', 'wordfence'),
|
||||
'editable' => true,
|
||||
'allow_disabling' => false,
|
||||
'state' => \WordfenceLS\Controller_Settings::shared()->get_required_2fa_role_activation_time('super-admin') !== false ? 'required' : 'optional'
|
||||
@@ -48,8 +48,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
'enabledValue' => '1',
|
||||
'disabledValue' => '0',
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_REMEMBER_DEVICE_ENABLED) ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Allow remembering device for 30 days', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('If enabled, users with 2FA enabled may choose to be prompted for a code only once every 30 days per device.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Allow remembering device for 30 days', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('If enabled, users with 2FA enabled may choose to be prompted for a code only once every 30 days per device.', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
@@ -58,11 +58,11 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
echo \WordfenceLS\Model_View::create('options/option-switch', array(
|
||||
'optionName' => \WordfenceLS\Controller_Settings::OPTION_XMLRPC_ENABLED,
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_XMLRPC_ENABLED) ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Require 2FA for XML-RPC call authentication', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('If enabled, XML-RPC calls that require authentication will also require a valid 2FA code to be appended to the password. You must choose the "Skipped" option if you use the WordPress app, the Jetpack plugin, or other services that require XML-RPC.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Require 2FA for XML-RPC call authentication', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('If enabled, XML-RPC calls that require authentication will also require a valid 2FA code to be appended to the password. You must choose the "Skipped" option if you use the WordPress app, the Jetpack plugin, or other services that require XML-RPC.', 'wordfence'),
|
||||
'states' => array(
|
||||
array('value' => '0', 'label' => __('Skipped', 'wordfence-2fa')),
|
||||
array('value' => '1', 'label' => __('Required', 'wordfence-2fa')),
|
||||
array('value' => '0', 'label' => __('Skipped', 'wordfence')),
|
||||
array('value' => '1', 'label' => __('Required', 'wordfence')),
|
||||
),
|
||||
'noSpacer' => true,
|
||||
'alignment' => 'wfls-right',
|
||||
@@ -76,8 +76,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
'enabledValue' => '0',
|
||||
'disabledValue' => '1',
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ALLOW_XML_RPC) ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Disable XML-RPC authentication', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('If disabled, XML-RPC requests that attempt authentication will be rejected, whether the user has 2FA enabled or not.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Disable XML-RPC authentication', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('If disabled, XML-RPC requests that attempt authentication will be rejected, whether the user has 2FA enabled or not.', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
@@ -91,7 +91,7 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<h3><?php esc_html_e('WooCommerce & Custom Integrations', 'wordfence-2fa'); ?></h3>
|
||||
<h3><?php esc_html_e('WooCommerce & Custom Integrations', 'wordfence'); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,8 +104,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
'enabledValue' => '1',
|
||||
'disabledValue' => '0',
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION) ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('WooCommerce integration', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('When enabled, reCAPTCHA and 2FA prompt support will be added to WooCommerce login and registration forms in addition to the default WordPress forms. Testing WooCommerce forms after enabling this feature is recommended to ensure plugin compatibility.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('WooCommerce integration', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('When enabled, reCAPTCHA and 2FA prompt support will be added to WooCommerce login and registration forms in addition to the default WordPress forms. Testing WooCommerce forms after enabling this feature is recommended to ensure plugin compatibility.', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
@@ -116,8 +116,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
'enabledValue' => '1',
|
||||
'disabledValue' => '0',
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_ACCOUNT_INTEGRATION) ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Show Wordfence 2FA menu on WooCommerce Account page', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('When enabled, a Wordfence 2FA tab will be added to the WooCommerce account menu which will provide access for users to manage 2FA settings outside of the WordPress admin area. Testing the WooCommerce account interface after enabling this feature is recommended to ensure theme compatibility.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Show Wordfence 2FA menu on WooCommerce Account page', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('When enabled, a Wordfence 2FA tab will be added to the WooCommerce account menu which will provide access for users to manage 2FA settings outside of the WordPress admin area. Testing the WooCommerce account interface after enabling this feature is recommended to ensure theme compatibility.', 'wordfence'),
|
||||
'helpLink' => \WordfenceLS\Controller_Support::supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_OPTION_WOOCOMMERCE_ACCOUNT_INTEGRATION),
|
||||
'disabled' => !\WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ENABLE_WOOCOMMERCE_INTEGRATION),
|
||||
'child' => true
|
||||
@@ -131,8 +131,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
'enabledValue' => '1',
|
||||
'disabledValue' => '0',
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_ENABLE_SHORTCODE) ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('2FA management shortcode', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('When enabled, the "wordfence_2fa_management" shortcode may be used to provide access for users to manage 2FA settings on custom pages.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('2FA management shortcode', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('When enabled, the "wordfence_2fa_management" shortcode may be used to provide access for users to manage 2FA settings on custom pages.', 'wordfence'),
|
||||
'helpLink' => \WordfenceLS\Controller_Support::supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_OPTION_SHORTCODE)
|
||||
))->render();
|
||||
?>
|
||||
@@ -144,8 +144,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
'enabledValue' => '1',
|
||||
'disabledValue' => '0',
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->should_stack_ui_columns() ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Use single-column layout for WooCommerce/shortcode 2FA management interface', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('When enabled, the 2FA management interface embedded through the WooCommerce integration or via a shortcode will use a vertical stacked layout as opposed to horizontal columns. Adjust this setting as appropriate to match your theme. This may be overridden using the "stacked" attribute for individual shortcodes.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Use single-column layout for WooCommerce/shortcode 2FA management interface', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('When enabled, the 2FA management interface embedded through the WooCommerce integration or via a shortcode will use a vertical stacked layout as opposed to horizontal columns. Adjust this setting as appropriate to match your theme. This may be overridden using the "stacked" attribute for individual shortcodes.', 'wordfence'),
|
||||
'helpLink' => \WordfenceLS\Controller_Support::supportURL(\WordfenceLS\Controller_Support::ITEM_MODULE_LOGIN_SECURITY_OPTION_STACK_UI_COLUMNS)
|
||||
))->render();
|
||||
?>
|
||||
@@ -160,7 +160,7 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<h3><?php esc_html_e('reCAPTCHA', 'wordfence-2fa'); ?></h3>
|
||||
<h3><?php esc_html_e('reCAPTCHA', 'wordfence'); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,8 +185,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
'enabledValue' => '1',
|
||||
'disabledValue' => '0',
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_CAPTCHA_TEST_MODE) ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Run reCAPTCHA in test mode', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('While in test mode, reCAPTCHA will score login and registration requests but not actually block them. The scores will be recorded and can be used to select a human/bot threshold value.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Run reCAPTCHA in test mode', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('While in test mode, reCAPTCHA will score login and registration requests but not actually block them. The scores will be recorded and can be used to select a human/bot threshold value.', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
@@ -200,7 +200,7 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<h3><?php esc_html_e('General', 'wordfence-2fa'); ?></h3>
|
||||
<h3><?php esc_html_e('General', 'wordfence'); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -211,9 +211,9 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
echo \WordfenceLS\Model_View::create('options/option-textarea', array(
|
||||
'textOptionName' => \WordfenceLS\Controller_Settings::OPTION_2FA_WHITELISTED,
|
||||
'textValue' => implode("\n", \WordfenceLS\Controller_Settings::shared()->whitelisted_ips()),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Allowlisted IP addresses that bypass 2FA and reCAPTCHA', 'wordfence-2fa') . '</strong>'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Allowlisted IP addresses that bypass 2FA and reCAPTCHA', 'wordfence') . '</strong>'),
|
||||
'alignTitle' => 'top',
|
||||
'subtitle' => __('Allowlisted IPs must be placed on separate lines. You can specify ranges using the following formats: 127.0.0.1/24, 127.0.0.[1-100], or 127.0.0.1-127.0.1.100.', 'wordfence-2fa'),
|
||||
'subtitle' => __('Allowlisted IPs must be placed on separate lines. You can specify ranges using the following formats: 127.0.0.1/24, 127.0.0.[1-100], or 127.0.0.1-127.0.1.100.', 'wordfence'),
|
||||
'subtitlePosition' => 'value',
|
||||
'noSpacer' => true,
|
||||
))->render();
|
||||
@@ -239,8 +239,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
'enabledValue' => '1',
|
||||
'disabledValue' => '0',
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->are_login_history_columns_enabled() ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Show last login column on WP Users page', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('When enabled, the last login timestamp will be displayed for each user on the WP Users page. When used in conjunction with reCAPTCHA, the most recent score will also be displayed for each user.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Show last login column on WP Users page', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('When enabled, the last login timestamp will be displayed for each user on the WP Users page. When used in conjunction with reCAPTCHA, the most recent score will also be displayed for each user.', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
@@ -251,8 +251,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
'enabledValue' => '1',
|
||||
'disabledValue' => '0',
|
||||
'value' => \WordfenceLS\Controller_Settings::shared()->get_bool(\WordfenceLS\Controller_Settings::OPTION_DELETE_ON_DEACTIVATION) ? '1': '0',
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Delete Login Security tables and data on deactivation', 'wordfence-2fa') . '</strong>'),
|
||||
'subtitle' => __('If enabled, all settings and 2FA records will be deleted on deactivation. If later reactivated, all users that previously had 2FA active will need to set it up again.', 'wordfence-2fa'),
|
||||
'title' => new \WordfenceLS\Text\Model_HTML('<strong>' . esc_html__('Delete Login Security tables and data on deactivation', 'wordfence') . '</strong>'),
|
||||
'subtitle' => __('If enabled, all settings and 2FA records will be deleted on deactivation. If later reactivated, all users that previously had 2FA active will need to set it up again.', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
|
||||
@@ -8,11 +8,11 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<div class="wfls-block-header wfls-block-header-border-bottom">
|
||||
<div class="wfls-block-header-content">
|
||||
<div class="wfls-block-title">
|
||||
<h3><?php esc_html_e('User Summary', 'wordfence-2fa'); ?></h3>
|
||||
<h3><?php esc_html_e('User Summary', 'wordfence'); ?></h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wfls-block-header-action wfls-block-header-action-text wfls-nowrap wfls-padding-add-right-responsive">
|
||||
<a href="users.php"><?php esc_html_e('Manage Users', 'wordfence-2fa'); ?></a>
|
||||
<a href="users.php"><?php esc_html_e('Manage Users', 'wordfence'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (is_array($counts)) : ?>
|
||||
@@ -20,18 +20,18 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<table class="wfls-table wfls-table-striped wfls-table-header-separators wfls-table-expanded wfls-no-bottom">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php esc_html_e('Role', 'wordfence-2fa'); ?></th>
|
||||
<th class="wfls-center"><?php esc_html_e('Total Users', 'wordfence-2fa'); ?></th>
|
||||
<th class="wfls-center"><?php esc_html_e('2FA Active', 'wordfence-2fa'); ?></th>
|
||||
<th class="wfls-center"><?php esc_html_e('2FA Inactive', 'wordfence-2fa'); ?></th>
|
||||
<th><?php esc_html_e('Role', 'wordfence'); ?></th>
|
||||
<th class="wfls-center"><?php esc_html_e('Total Users', 'wordfence'); ?></th>
|
||||
<th class="wfls-center"><?php esc_html_e('2FA Active', 'wordfence'); ?></th>
|
||||
<th class="wfls-center"><?php esc_html_e('2FA Inactive', 'wordfence'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$roles = new WP_Roles();
|
||||
$roleNames = $roles->get_names();
|
||||
$roleNames['super-admin'] = __('Super Administrator', 'wordfence-2fa');
|
||||
$roleNames[\WordfenceLS\Controller_Users::TRUNCATED_ROLE_KEY] = __('Custom Capabilities / Multiple Roles', 'wordfence-2fa');
|
||||
$roleNames['super-admin'] = __('Super Administrator', 'wordfence');
|
||||
$roleNames[\WordfenceLS\Controller_Users::TRUNCATED_ROLE_KEY] = __('Custom Capabilities / Multiple Roles', 'wordfence');
|
||||
foreach ($counts['avail_roles'] as $roleTag => $count):
|
||||
$activeCount = (isset($counts['active_avail_roles'][$roleTag]) ? $counts['active_avail_roles'][$roleTag] : 0);
|
||||
$inactiveCount = $count - $activeCount;
|
||||
@@ -49,21 +49,21 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
<td class="wfls-center">
|
||||
<?php if ($inactive): ?><a href="<?php echo esc_attr(is_multisite() ? network_admin_url($viewUsersBaseUrl) : admin_url($viewUsersBaseUrl)); ?>"><?php endif ?>
|
||||
<?php echo number_format($inactiveCount); ?>
|
||||
<?php if ($inactive): ?> (<?php esc_html_e('View users', 'wordfence-2fa') ?>)</a><?php endif ?>
|
||||
<?php if ($inactive): ?> (<?php esc_html_e('View users', 'wordfence') ?>)</a><?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th><?php esc_html_e('Total', 'wordfence-2fa'); ?></th>
|
||||
<th><?php esc_html_e('Total', 'wordfence'); ?></th>
|
||||
<th class="wfls-center"><?php echo number_format($counts['total_users']); ?></th>
|
||||
<th class="wfls-center"><?php echo number_format($counts['active_total_users']); ?></th>
|
||||
<th class="wfls-center"><?php echo number_format($counts['total_users'] - $counts['active_total_users']); ?></th>
|
||||
</tr>
|
||||
<?php if (is_multisite()): ?>
|
||||
<tr>
|
||||
<td colspan="4" class="wfls-text-small"><?php esc_html_e('* User counts currently only reflect the main site on multisite installations.', 'wordfence-2fa'); ?></td>
|
||||
<td colspan="4" class="wfls-text-small"><?php esc_html_e('* User counts currently only reflect the main site on multisite installations.', 'wordfence'); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tfoot>
|
||||
@@ -71,8 +71,8 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="wfls-block-content wfls-padding-add-bottom">
|
||||
<p><?php $counts === null ? esc_html_e('User counts are hidden by default on sites with large numbers of users in order to improve performance.', 'wordfence-2fa') : esc_html_e('User counts are currently disabled as the most recent attempt to count users failed to complete successfully.', 'wordfence-2fa') ?></p>
|
||||
<a href="<?php echo esc_attr(add_query_arg('wfls-show-user-counts', 'true') . '#top#settings') ?>" class="wfls-btn wfls-btn-sm wfls-btn-primary"<?php if (\WordfenceLS\Controller_Users::shared()->should_force_user_counts()): ?> onclick="window.location.reload()"<?php endif ?>><?php $counts === null ? esc_html_e('Show User Counts', 'wordfence-2fa') : esc_html_e('Try Again', 'wordfence-2fa') ?></a>
|
||||
<p><?php $counts === null ? esc_html_e('User counts are hidden by default on sites with large numbers of users in order to improve performance.', 'wordfence') : esc_html_e('User counts are currently disabled as the most recent attempt to count users failed to complete successfully.', 'wordfence') ?></p>
|
||||
<a href="<?php echo esc_attr(add_query_arg('wfls-show-user-counts', 'true') . '#top#settings') ?>" class="wfls-btn wfls-btn-sm wfls-btn-primary"<?php if (\WordfenceLS\Controller_Users::shared()->should_force_user_counts()): ?> onclick="window.location.reload()"<?php endif ?>><?php $counts === null ? esc_html_e('Show User Counts', 'wordfence') : esc_html_e('Try Again', 'wordfence') ?></a>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
@@ -4,10 +4,10 @@ if (!defined('WORDFENCE_LS_VERSION')) { exit; }
|
||||
?>
|
||||
<table id="wfls-grace-period-toggle-container" style="display: none">
|
||||
<tr>
|
||||
<th scope="row"><label for="wfls-grace-period-toggle"><?php esc_html_e('2FA Grace Period', 'wordfence-2fa') ?></label></th>
|
||||
<th scope="row"><label for="wfls-grace-period-toggle"><?php esc_html_e('2FA Grace Period', 'wordfence') ?></label></th>
|
||||
<td>
|
||||
<input id="wfls-grace-period-toggle" name="wfls-grace-period-toggle" type="checkbox">
|
||||
<label for="wfls-grace-period-toggle"><?php esc_html_e('Allow a grace period for this user prior to requiring Wordfence 2FA', 'wordfence-2fa') ?></label>
|
||||
<label for="wfls-grace-period-toggle"><?php esc_html_e('Allow a grace period for this user prior to requiring Wordfence 2FA', 'wordfence') ?></label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
Reference in New Issue
Block a user