rebase from live enviornment
This commit is contained in:
19
wp/plugins/wordfence/views/dashboard/global-status.php
Normal file
19
wp/plugins/wordfence/views/dashboard/global-status.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Presents the global status.
|
||||
*
|
||||
* Expects $firewall, $scanner, and $dashboard to be defined.
|
||||
*
|
||||
* @var wfFirewall $firewall The firewall state.
|
||||
* @var wfScanner $scanner The scanner state.
|
||||
* @var wfDashboard $dashboard Dashboard statistics.
|
||||
*/
|
||||
?>
|
||||
<ul class="wf-block-list wf-block-list-horizontal">
|
||||
<li id="wfStatusTourMarker">
|
||||
<div class="wf-block-labeled-value wf-global-status wf-global-status-full-enabled">
|
||||
<div class="wf-block-labeled-value-label"><?php esc_html_e('Wordfence Protection Activated', 'wordfence'); ?></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
236
wp/plugins/wordfence/views/dashboard/option-howgetips.php
Normal file
236
wp/plugins/wordfence/views/dashboard/option-howgetips.php
Normal file
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Presents the global option howGetIPs with a value select menu and text area (hidden by default) for trusted proxies.
|
||||
*/
|
||||
|
||||
$selectOptions = array(
|
||||
array('value' => '', 'label' => esc_html__('Let Wordfence 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' => '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' => 'HTTP_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' => 'HTTP_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')),
|
||||
array('value' => 'HTTP_CF_CONNECTING_IP', 'label' => esc_html__('Use the Cloudflare "CF-Connecting-IP" HTTP header to get a visitor IP. Only use if you\'re using Cloudflare.', 'wordfence')),
|
||||
);
|
||||
?>
|
||||
<ul class="wf-flex-vertical wf-flex-full-width">
|
||||
<li>
|
||||
<ul id="wf-option-howGetIPs" class="wf-option wf-option-howgetips" data-option="howGetIPs" data-original-value="<?php echo esc_attr(wfConfig::get('howGetIPs')); ?>" data-text-area-option="howGetIPs_trusted_proxies" data-original-text-area-value="<?php echo esc_attr(wfConfig::get('howGetIPs_trusted_proxies')); ?>">
|
||||
<li class="wf-option-spacer"></li>
|
||||
<li class="wf-option-content">
|
||||
<ul class="wf-flex-vertical wf-flex-align-left">
|
||||
<li class="wf-option-title"><?php esc_html_e('How does Wordfence get IPs', 'wordfence'); ?> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_HOW_GET_IPS); ?>" target="_blank" rel="noopener noreferrer" class="wf-inline-help"><i class="wf-fa wf-fa-question-circle-o" aria-hidden="true"></i><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></li>
|
||||
<li>
|
||||
<ul class="wf-flex-vertical wf-flex-align-left">
|
||||
<li class="wf-padding-add-left">
|
||||
<ul class="wf-flex-vertical wf-flex-align-left" role="radiogroup">
|
||||
<?php foreach ($selectOptions as $o): ?>
|
||||
<li class="wf-padding-add-top-small"><input type="radio" class="wf-option-radio" name="wf-howgetIPs" value="<?php echo esc_attr($o['value']); ?>" id="wf-howgetIPs-<?php echo esc_attr(preg_replace('/[^a-z0-9]/i', '-', $o['value'])); ?>"<?php if ($o['value'] == wfConfig::get('howGetIPs')) { echo ' checked'; } ?>><label for="wf-howgetIPs-<?php echo esc_attr(preg_replace('/[^a-z0-9]/i', '-', $o['value'])); ?>"> </label><?php echo $o['label']; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="wf-option-howgetips-details wf-padding-add-top-small">
|
||||
<div class="wf-left"><?php esc_html_e('Detected IP(s):', 'wordfence') ?> <span id="howGetIPs-preview-all"><?php echo wfUtils::getIPPreview(); ?></span></div>
|
||||
<div class="wf-left"><?php esc_html_e('Your IP with this setting:', 'wordfence') ?> <span id="howGetIPs-preview-single"><?php echo wfUtils::getIP(); ?></span></div>
|
||||
<div class="wf-left"><a href="#" id="howGetIPs-trusted-proxies-show" role="button">+ <?php esc_html_e('Edit trusted proxies', 'wordfence') ?></a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- <li class="wf-option-disclosure"><svg width="12px" height="12px" viewBox="0 0 12 12"><path id="disclosure-closed" d="M 6 0 l 6 6 -6 6 0 -12" fill="#777"/></svg></li> -->
|
||||
</ul>
|
||||
</li>
|
||||
<li id="howGetIPs-trusted-proxies">
|
||||
<ul id="wf-option-howGetIPs-trusted-proxies" class="wf-option wf-option-textarea" data-text-option="howGetIPs_trusted_proxies" data-original-text-value="<?php echo esc_attr(wfConfig::get('howGetIPs_trusted_proxies')); ?>">
|
||||
<li class="wf-option-spacer"></li>
|
||||
<li class="wf-option-content">
|
||||
<ul>
|
||||
<li class="wf-option-title">
|
||||
<ul class="wf-flex-vertical wf-flex-align-left">
|
||||
<li><?php esc_html_e('Trusted Proxies', 'wordfence'); ?></li>
|
||||
<li class="wf-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="wf-option-textarea">
|
||||
<textarea spellcheck="false" autocapitalize="none" autocomplete="off" name="howGetIPs_trusted_proxies"><?php echo esc_html(wfConfig::get('howGetIPs_trusted_proxies')); ?></textarea>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li id="howGetIPs-trusted-proxy-preset">
|
||||
<ul id="wf-option-howGetIPs-trusted-proxy-preset" class="wf-option wf-option-select" data-text-option="howGetIPs_trusted_proxy_preset" data-original-text-value="<?php echo esc_attr(wfConfig::get('howGetIPs_trusted_proxy_preset')); ?>">
|
||||
<li class="wf-option-spacer"></li>
|
||||
<li class="wf-option-content">
|
||||
<ul>
|
||||
<li class="wf-option-title">
|
||||
<ul class="wf-flex-vertical wf-flex-align-left">
|
||||
<li><span id="wf-option-howGetIPs-trusted-proxy-preset-label"><?php esc_html_e('Trusted Proxy Preset', 'wordfence'); ?></span></li>
|
||||
<li class="wf-option-subtitle"><?php esc_html_e('In addition to the above list, the IPs (or CIDR ranges) in the selected preset will be ignored when determining the requesting IP via the X-Forwarded-For HTTP header.', 'wordfence'); ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="wf-option-select">
|
||||
<?php
|
||||
$presets = wfConfig::getJSON('ipResolutionList', array());
|
||||
if (!is_array($presets)) {
|
||||
$presets = array();
|
||||
}
|
||||
$keys = array_keys($presets); asort($keys);
|
||||
?>
|
||||
<select<?php echo (!empty($presets) ? '' : ' disabled'); ?> aria-labelledby="wf-option-howGetIPs-trusted-proxy-preset-label">
|
||||
<option class="wf-option-select-option" value=""<?php if (!in_array(wfConfig::get('howGetIPs_trusted_proxy_preset'), $keys)) { echo ' selected'; } ?>><?php esc_html_e('None', 'wordfence'); ?></option>
|
||||
<?php foreach ($keys as $k): ?>
|
||||
<option class="wf-option-select-option" value="<?php echo esc_attr($k); ?>"<?php if ($k == wfConfig::get('howGetIPs_trusted_proxy_preset')) { echo ' selected'; } ?>><?php echo esc_html($presets[$k]['name']); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<script type="application/javascript">
|
||||
(function($) {
|
||||
$(function() {
|
||||
var updateIPPreview = function() {
|
||||
WFAD.updateIPPreview({howGetIPs: $('input[name="wf-howgetIPs"]:checked').val(), 'howGetIPs_trusted_proxies': $('#howGetIPs-trusted-proxies textarea').val(), 'howGetIPs_trusted_proxy_preset': $('#howGetIPs-trusted-proxy-preset select').val()}, function(ret) {
|
||||
if (ret && ret.ok) {
|
||||
$('#howGetIPs-preview-all').html(ret.ipAll);
|
||||
$('#howGetIPs-preview-single').html(ret.ip);
|
||||
}
|
||||
else {
|
||||
//TODO: implementing testing whether or not this setting will lock them out and show the error saying that they'd lock themselves out
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$('input[name="wf-howgetIPs"]').on('change', function() {
|
||||
var optionElement = $(this).closest('.wf-option.wf-option-howgetips');
|
||||
var option = optionElement.data('option');
|
||||
var value = $('input[name="wf-howgetIPs"]:checked').val();
|
||||
|
||||
var originalValue = optionElement.data('originalValue');
|
||||
if (originalValue == value) {
|
||||
delete WFAD.pendingChanges[option];
|
||||
}
|
||||
else {
|
||||
WFAD.pendingChanges[option] = value;
|
||||
}
|
||||
|
||||
WFAD.updatePendingChanges();
|
||||
|
||||
updateIPPreview();
|
||||
});
|
||||
|
||||
var coalescingUpdateTimer;
|
||||
$('#howGetIPs-trusted-proxies textarea').on('change paste keyup', function() {
|
||||
var e = this;
|
||||
|
||||
setTimeout(function() {
|
||||
clearTimeout(coalescingUpdateTimer);
|
||||
coalescingUpdateTimer = setTimeout(updateIPPreview, 1000);
|
||||
|
||||
var optionElement = $(e).closest('.wf-option.wf-option-textarea');
|
||||
var option = optionElement.data('textOption');
|
||||
var value = $(e).val();
|
||||
|
||||
var originalValue = optionElement.data('originalTextValue');
|
||||
if (originalValue == value) {
|
||||
delete WFAD.pendingChanges[option];
|
||||
}
|
||||
else {
|
||||
WFAD.pendingChanges[option] = value;
|
||||
}
|
||||
|
||||
WFAD.updatePendingChanges();
|
||||
}, 4);
|
||||
});
|
||||
|
||||
$('#howGetIPs-trusted-proxy-preset').on('change', function() {
|
||||
var e = this;
|
||||
|
||||
setTimeout(function() {
|
||||
clearTimeout(coalescingUpdateTimer);
|
||||
coalescingUpdateTimer = setTimeout(updateIPPreview, 1000);
|
||||
|
||||
var optionElement = $(e).find('.wf-option.wf-option-select');
|
||||
var option = optionElement.data('textOption');
|
||||
var value = $(e).find('select').val();
|
||||
|
||||
var originalValue = optionElement.data('originalTextValue');
|
||||
if (originalValue == value) {
|
||||
delete WFAD.pendingChanges[option];
|
||||
}
|
||||
else {
|
||||
WFAD.pendingChanges[option] = value;
|
||||
}
|
||||
|
||||
WFAD.updatePendingChanges();
|
||||
}, 4);
|
||||
});
|
||||
|
||||
$(window).on('wfOptionsReset', function() {
|
||||
$('input[name="wf-howgetIPs"]').each(function() {
|
||||
var optionElement = $(this).closest('.wf-option.wf-option-howgetips');
|
||||
var option = optionElement.data('option');
|
||||
var originalValue = optionElement.data('originalValue');
|
||||
|
||||
$(this).prop('checked', originalValue == $(this).attr('value'));
|
||||
});
|
||||
|
||||
$('#howGetIPs-trusted-proxies textarea').each(function() {
|
||||
var optionElement = $(this).closest('.wf-option.wf-option-textarea');
|
||||
var originalValue = optionElement.data('originalTextAreaValue');
|
||||
$(this).val(originalValue);
|
||||
});
|
||||
|
||||
updateIPPreview();
|
||||
});
|
||||
|
||||
$('#howGetIPs-trusted-proxies-show').each(function() {
|
||||
$(this).on('keydown', function(e) {
|
||||
if (e.keyCode == 32) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
$(this).trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
$(this).on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
var isActive = $('#howGetIPs-trusted-proxies').hasClass('wf-active');
|
||||
if (isActive) {
|
||||
$('#howGetIPs-trusted-proxies').slideUp({
|
||||
always: function() {
|
||||
$('#howGetIPs-trusted-proxies').removeClass('wf-active');
|
||||
}
|
||||
});
|
||||
|
||||
$('#howGetIPs-trusted-proxy-preset').slideUp({
|
||||
always: function() {
|
||||
$('#howGetIPs-trusted-proxy-preset').removeClass('wf-active');
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$(this).parent().slideUp();
|
||||
$('#howGetIPs-trusted-proxies').slideDown({
|
||||
always: function() {
|
||||
$('#howGetIPs-trusted-proxies').addClass('wf-active');
|
||||
}
|
||||
});
|
||||
|
||||
$('#howGetIPs-trusted-proxy-preset').slideDown({
|
||||
always: function() {
|
||||
$('#howGetIPs-trusted-proxy-preset').addClass('wf-active');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
186
wp/plugins/wordfence/views/dashboard/options-group-alert.php
Normal file
186
wp/plugins/wordfence/views/dashboard/options-group-alert.php
Normal file
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Presents the Email Alert Preferences group.
|
||||
*
|
||||
* Expects $stateKey.
|
||||
*
|
||||
* @var string $stateKey The key under which the collapse state is stored.
|
||||
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
|
||||
*/
|
||||
|
||||
if (!isset($collapseable)) {
|
||||
$collapseable = true;
|
||||
}
|
||||
?>
|
||||
<div class="wf-row">
|
||||
<div class="wf-col-xs-12">
|
||||
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
|
||||
<div class="wf-block-header">
|
||||
<div class="wf-block-header-content">
|
||||
<div class="wf-block-title">
|
||||
<strong><?php esc_html_e('Email Alert Preferences', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-block-content">
|
||||
<ul class="wf-block-list">
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'alertOn_update',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('alertOn_update') ? 1 : 0,
|
||||
'title' => __('Email me when Wordfence is automatically updated', 'wordfence'),
|
||||
'subtitle' => __('If you have automatic updates enabled (see above), you\'ll get an email when an update occurs.', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'alertOn_wordfenceDeactivated',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('alertOn_wordfenceDeactivated') ? 1 : 0,
|
||||
'title' => __('Email me if Wordfence is deactivated', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'alertOn_wafDeactivated',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('alertOn_wafDeactivated') ? 1 : 0,
|
||||
'title' => __('Email me if the Wordfence Web Application Firewall is turned off', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled-select', array(
|
||||
'toggleOptionName' => 'alertOn_scanIssues',
|
||||
'enabledToggleValue' => 1,
|
||||
'disabledToggleValue' => 0,
|
||||
'toggleValue' => wfConfig::get('alertOn_scanIssues') > 0 ? 1 : 0,
|
||||
'selectOptionName' => 'alertOn_severityLevel',
|
||||
'selectOptions' => array(
|
||||
array('value' => wfIssues::SEVERITY_CRITICAL, 'label' => __('Critical', 'wordfence')),
|
||||
array('value' => wfIssues::SEVERITY_HIGH, 'label' => __('High', 'wordfence')),
|
||||
array('value' => wfIssues::SEVERITY_MEDIUM, 'label' => __('Medium', 'wordfence')),
|
||||
array('value' => wfIssues::SEVERITY_LOW, 'label' => __('Low', 'wordfence')),
|
||||
),
|
||||
'selectValue' => wfConfig::get('alertOn_severityLevel'),
|
||||
'title' => __('Alert me with scan results of this severity level or greater:', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'alertOn_block',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('alertOn_block') ? 1 : 0,
|
||||
'title' => __('Alert when an IP address is blocked', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'alertOn_loginLockout',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('alertOn_loginLockout') ? 1 : 0,
|
||||
'title' => __('Alert when someone is locked out from login', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'alertOn_breachLogin',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('alertOn_breachLogin') ? 1 : 0,
|
||||
'title' => __('Alert when someone is blocked from logging in for using a password found in a breach', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'alertOn_lostPasswdForm',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('alertOn_lostPasswdForm') ? 1 : 0,
|
||||
'title' => __('Alert when the "lost password" form is used for a valid user', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled-sub', array(
|
||||
'optionName' => 'alertOn_adminLogin',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('alertOn_adminLogin') ? 1 : 0,
|
||||
'title' => __('Alert me when someone with administrator access signs in', 'wordfence'),
|
||||
|
||||
'subOptionName' => 'alertOn_firstAdminLoginOnly',
|
||||
'subEnabledValue' => 1,
|
||||
'subDisabledValue' => 0,
|
||||
'subValue' => wfConfig::get('alertOn_firstAdminLoginOnly') ? 1 : 0,
|
||||
'subTitle' => __('Only alert me when that administrator signs in from a new device', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled-sub', array(
|
||||
'optionName' => 'alertOn_nonAdminLogin',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('alertOn_nonAdminLogin') ? 1 : 0,
|
||||
'title' => __('Alert me when a non-admin user signs in', 'wordfence'),
|
||||
|
||||
'subOptionName' => 'alertOn_firstNonAdminLoginOnly',
|
||||
'subEnabledValue' => 1,
|
||||
'subDisabledValue' => 0,
|
||||
'subValue' => wfConfig::get('alertOn_firstNonAdminLoginOnly') ? 1 : 0,
|
||||
'subTitle' => __('Only alert me when that user signs in from a new device', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'wafAlertOnAttacks',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('wafAlertOnAttacks') ? 1 : 0,
|
||||
'title' => __('Alert me when there\'s a large increase in attacks detected on my site', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-text', array(
|
||||
'textOptionName' => 'alert_maxHourly',
|
||||
'textValue' => wfConfig::get('alert_maxHourly'),
|
||||
'title' => __('Maximum email alerts to send per hour', 'wordfence'),
|
||||
'subtitle' => __('0 means unlimited alerts will be sent.', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end alert options -->
|
||||
116
wp/plugins/wordfence/views/dashboard/options-group-dashboard.php
Normal file
116
wp/plugins/wordfence/views/dashboard/options-group-dashboard.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Presents the Dashboard Notification Options group.
|
||||
*
|
||||
* Expects $stateKey.
|
||||
*
|
||||
* @var string $stateKey The key under which the collapse state is stored.
|
||||
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
|
||||
*/
|
||||
|
||||
if (!isset($collapseable)) {
|
||||
$collapseable = true;
|
||||
}
|
||||
?>
|
||||
<div class="wf-row">
|
||||
<div class="wf-col-xs-12">
|
||||
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
|
||||
<div class="wf-block-header">
|
||||
<div class="wf-block-header-content">
|
||||
<div class="wf-block-title">
|
||||
<strong><?php esc_html_e('Dashboard Notification Options', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-block-content">
|
||||
<ul class="wf-block-list">
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'notification_updatesNeeded',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('notification_updatesNeeded') ? 1 : 0,
|
||||
'title' => __('Updates Needed (Plugin, Theme, or Core)', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<?php if (wfConfig::p()): ?>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'notification_securityAlerts',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('notification_securityAlerts') ? 1 : 0,
|
||||
'title' => __('Security Alerts', 'wordfence'),
|
||||
'premium' => true,
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'notification_promotions',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('notification_promotions') ? 1 : 0,
|
||||
'title' => __('Promotions', 'wordfence'),
|
||||
'premium' => true,
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'notification_blogHighlights',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('notification_blogHighlights') ? 1 : 0,
|
||||
'title' => __('Blog Highlights', 'wordfence'),
|
||||
'premium' => true,
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'notification_productUpdates',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('notification_productUpdates') ? 1 : 0,
|
||||
'title' => __('Product Updates', 'wordfence'),
|
||||
'premium' => true,
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'notification_scanStatus',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('notification_scanStatus') ? 1 : 0,
|
||||
'title' => __('Scan Status', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<?php if (!wfConfig::p()): ?>
|
||||
<li>
|
||||
<ul class="wf-option">
|
||||
<li class="wf-option-spacer"></li>
|
||||
<li class="wf-flex-vertical wf-flex-align-left">
|
||||
<p><?php esc_html_e('Dashboard notifications will also be displayed for Security Alerts, Promotions, Blog Highlights, and Product Updates. These notifications can be disabled by upgrading to a premium license.', 'wordfence'); ?></p>
|
||||
<p class="wf-no-top"><a class="wf-btn wf-btn-primary wf-btn-callout-subtle" href="https://www.wordfence.com/gnl1dashboardUpgrade/wordfence-signup/#premium-order-form" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Upgrade to Premium', 'wordfence'); ?></a> <a class="wf-btn wf-btn-callout-subtle wf-btn-default" href="https://www.wordfence.com/gnl1dashboardLearn/wordfence-signup/" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Learn More', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end dashboard options -->
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Presents the Activity Report group.
|
||||
*
|
||||
* Expects $stateKey.
|
||||
*
|
||||
* @var string $stateKey The key under which the collapse state is stored.
|
||||
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
|
||||
*/
|
||||
|
||||
if (!isset($collapseable)) {
|
||||
$collapseable = true;
|
||||
}
|
||||
?>
|
||||
<div class="wf-row">
|
||||
<div class="wf-col-xs-12">
|
||||
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
|
||||
<div class="wf-block-header">
|
||||
<div class="wf-block-header-content">
|
||||
<div class="wf-block-title">
|
||||
<strong><?php esc_html_e('Activity Report', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-block-content">
|
||||
<ul class="wf-block-list">
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled-select', array(
|
||||
'toggleOptionName' => 'email_summary_enabled',
|
||||
'enabledToggleValue' => 1,
|
||||
'disabledToggleValue' => 0,
|
||||
'toggleValue' => wfConfig::get('email_summary_enabled') ? 1 : 0,
|
||||
'selectOptionName' => 'email_summary_interval',
|
||||
'selectOptions' => array(
|
||||
array('value' => 'daily', 'label' => __('Once a day', 'wordfence')),
|
||||
array('value' => 'weekly', 'label' => __('Once a week', 'wordfence')),
|
||||
array('value' => 'monthly', 'label' => __('Once a month', 'wordfence')),
|
||||
),
|
||||
'selectValue' => wfConfig::get('email_summary_interval'),
|
||||
'title' => __('Enable email summary', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-textarea', array(
|
||||
'textOptionName' => 'email_summary_excluded_directories',
|
||||
'textValue' => wfUtils::cleanupOneEntryPerLine(wfConfig::get('email_summary_excluded_directories')),
|
||||
'title' => __('List of directories to exclude from recently modified file list', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'email_summary_dashboard_widget_enabled',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('email_summary_dashboard_widget_enabled') ? 1 : 0,
|
||||
'title' => __('Enable activity report widget on the WordPress dashboard', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end email summary options -->
|
||||
155
wp/plugins/wordfence/views/dashboard/options-group-general.php
Normal file
155
wp/plugins/wordfence/views/dashboard/options-group-general.php
Normal file
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Presents the General Options group.
|
||||
*
|
||||
* Expects $stateKey.
|
||||
*
|
||||
* @var string $stateKey The key under which the collapse state is stored.
|
||||
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
|
||||
*/
|
||||
|
||||
if (!isset($collapseable)) {
|
||||
$collapseable = true;
|
||||
}
|
||||
?>
|
||||
<div class="wf-row">
|
||||
<div class="wf-col-xs-12">
|
||||
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
|
||||
<div class="wf-block-header">
|
||||
<div class="wf-block-header-content">
|
||||
<div class="wf-block-title">
|
||||
<strong><?php esc_html_e('General Wordfence Options', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-block-content">
|
||||
<ul class="wf-block-list">
|
||||
<li>
|
||||
<?php
|
||||
$subtitle = esc_html__('Automatically updates Wordfence to the newest version within 24 hours of a new release.', 'wordfence');
|
||||
if (!wfConfig::get('other_bypassLitespeedNoabort', false) && getenv('noabort') != '1' && stristr($_SERVER['SERVER_SOFTWARE'], 'litespeed') !== false) {
|
||||
$subtitle .= '<br><br>';
|
||||
$subtitle .= wp_kses(__('<span class="wf-red-dark">Warning:</span> You are running the LiteSpeed web server and Wordfence can\'t determine whether "noabort" is set. Please verify that the environmental variable "noabort" is set for the local site, or the server\'s global External Application Abort is set to "No Abort".', 'wordfence'), array('span'=>array('class'=>array())));
|
||||
$subtitle .= '<br>';
|
||||
$subtitle .= '<a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_LITESPEED_WARNING) . '" target="_blank" rel="noopener noreferrer">' . esc_html__('Please read this article in our FAQ to make an important change that will ensure your site stability during an update.', 'wordfence') . '<span class="screen-reader-text"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>';
|
||||
}
|
||||
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'autoUpdate',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('autoUpdate') ? 1 : 0,
|
||||
'title' => __('Update Wordfence automatically when a new version is released?', 'wordfence'),
|
||||
'subtitleHTML' => $subtitle,
|
||||
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_AUTOMATIC_UPDATE),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-text', array(
|
||||
'textOptionName' => 'alertEmails',
|
||||
'textValue' => implode(',', wfConfig::getAlertEmails()),
|
||||
'title' => __('Where to email alerts', 'wordfence'),
|
||||
'placeholder' => __('Separate multiple addresses with commas', 'wordfence'),
|
||||
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_ALERT_EMAILS),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('dashboard/option-howgetips')->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'enableRemoteIpLookup',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('enableRemoteIpLookup', true) ? 1 : 0,
|
||||
'title' => __('Look up visitor IP locations via Wordfence servers', 'wordfence'),
|
||||
'subtitle' => __('If this option is disabled, Wordfence can look up countries for visitor IP addresses using a local database, but cannot look up regions or cities', 'wordfence'),
|
||||
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_GENERAL_REMOTE_IP_LOOKUP)
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'other_hideWPVersion',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('other_hideWPVersion') ? 1 : 0,
|
||||
'title' => __('Hide WordPress version', 'wordfence'),
|
||||
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_HIDE_VERSION),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'disableCodeExecutionUploads',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('disableCodeExecutionUploads') ? 1 : 0,
|
||||
'title' => __('Disable Code Execution for Uploads directory', 'wordfence'),
|
||||
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_DISABLE_UPLOADS_EXECUTION),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'liveActivityPauseEnabled',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('liveActivityPauseEnabled') ? 1 : 0,
|
||||
'title' => __('Pause live updates when window loses focus', 'wordfence'),
|
||||
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_PAUSE_LIVE_UPDATES),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-text', array(
|
||||
'textOptionName' => 'actUpdateInterval',
|
||||
'textValue' => wfConfig::get('actUpdateInterval'),
|
||||
'title' => __('Update interval in seconds', 'wordfence'),
|
||||
'subtitle' => __('Setting higher will reduce browser traffic but slow scan starts, live traffic & status updates.', 'wordfence'),
|
||||
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_UPDATE_INTERVAL),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'other_bypassLitespeedNoabort',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('other_bypassLitespeedNoabort') ? 1 : 0,
|
||||
'title' => __('Bypass the LiteSpeed "noabort" check', 'wordfence'),
|
||||
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_BYPASS_LITESPEED_CHECK),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'deleteTablesOnDeact',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('deleteTablesOnDeact') ? 1 : 0,
|
||||
'title' => __('Delete Wordfence tables and data on deactivation', 'wordfence'),
|
||||
'subtitle' => __('Note: This does not include Login Security settings and tables. An option to delete those must be selected separately on the Login Security settings page.', 'wordfence'),
|
||||
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_DELETE_DEACTIVATION),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end general options -->
|
||||
180
wp/plugins/wordfence/views/dashboard/options-group-import.php
Normal file
180
wp/plugins/wordfence/views/dashboard/options-group-import.php
Normal file
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Presents the Import/Export Options group.
|
||||
*
|
||||
* Expects $stateKey.
|
||||
*
|
||||
* @var string $stateKey The key under which the collapse state is stored.
|
||||
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
|
||||
*/
|
||||
|
||||
if (!isset($collapseable)) {
|
||||
$collapseable = true;
|
||||
}
|
||||
?>
|
||||
<div class="wf-row">
|
||||
<div class="wf-col-xs-12">
|
||||
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
|
||||
<div class="wf-block-header">
|
||||
<div class="wf-block-header-content">
|
||||
<div class="wf-block-title">
|
||||
<strong><?php esc_html_e('Import/Export Options', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-block-content">
|
||||
<ul class="wf-block-list">
|
||||
<li>
|
||||
<ul id="wf-option-exportOptions" class="wf-flex-horizontal wf-flex-vertical-xs wf-flex-full-width wf-add-top wf-add-bottom">
|
||||
<li><?php esc_html_e('Export this site\'s Wordfence options for import on another site', 'wordfence'); ?> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_EXPORT); ?>" target="_blank" rel="noopener noreferrer" class="wf-inline-help"><i class="wf-fa wf-fa-question-circle-o" aria-hidden="true"></i><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a></li>
|
||||
<li class="wf-right wf-left-xs wf-padding-add-top-xs-small">
|
||||
<a href="#" class="wf-btn wf-btn-primary wf-btn-callout-subtle" id="wf-export-options" role="button"><?php echo wp_kses(/* translators: word order may be altered as long as HTML remains around "Wordfence" */ __('Export<span class="wf-hidden-xs"> Wordfence</span> Options', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<ul id="wf-option-importOptions" class="wf-flex-vertical wf-flex-full-width wf-add-bottom">
|
||||
<li>
|
||||
<ul class="wf-option wf-option-text">
|
||||
<li class="wf-option-content">
|
||||
<ul>
|
||||
<li class="wf-option-title">
|
||||
<?php esc_html_e('Import Wordfence options from another site using a token', 'wordfence'); ?> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_IMPORT); ?>" target="_blank" rel="noopener noreferrer" class="wf-inline-help"><i class="wf-fa wf-fa-question-circle-o" aria-hidden="true"></i><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
|
||||
</li>
|
||||
<li class="wf-option-text wf-option-full-width wf-no-right">
|
||||
<input type="text" value="" id="wf-import-token">
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<ul class="wf-flex-horizontal wf-flex-full-width">
|
||||
<li class="wf-right wf-left-xs" id="wf-license-controls">
|
||||
<a href="#" class="wf-btn wf-btn-primary wf-btn-callout-subtle wf-disabled" id="wf-import-options" role="button"><?php echo wp_kses(/* translators: word order may be altered as long as HTML remains around "Wordfence" */ __('Import<span class="wf-hidden-xs"> Wordfence</span> Options', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<script type="application/javascript">
|
||||
(function($) {
|
||||
$(function() {
|
||||
$('#wf-export-options').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
WFAD.ajax('wordfence_exportSettings', {}, function(res) {
|
||||
if (res.ok && res.token) {
|
||||
var prompt = $('#wfTmpl_exportPromptSuccess').tmpl(res);
|
||||
var promptHTML = $("<div />").append(prompt).html();
|
||||
WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
|
||||
$('#wf-export-prompt-close').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
WFAD.colorboxClose();
|
||||
});
|
||||
}});
|
||||
}
|
||||
else {
|
||||
var prompt = $('#wfTmpl_exportPromptError').tmpl({err: res.err || 'An unknown error occurred during the export. We received an undefined error from your web server.'});
|
||||
var promptHTML = $("<div />").append(prompt).html();
|
||||
WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
|
||||
$('#wf-export-prompt-close').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
WFAD.colorboxClose();
|
||||
});
|
||||
}});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#wf-import-token').on('change paste keyup', function() {
|
||||
setTimeout(function() {
|
||||
$('#wf-import-options').toggleClass('wf-disabled', $('#wf-import-token').val() == '');
|
||||
}, 4);
|
||||
});
|
||||
|
||||
$('#wf-import-options').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
WFAD.ajax('wordfence_importSettings', {token: $('#wf-import-token').val()}, function(res) {
|
||||
if (res.ok) {
|
||||
var prompt = $('#wfTmpl_importPromptSuccess').tmpl(res);
|
||||
var promptHTML = $("<div />").append(prompt).html();
|
||||
WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
|
||||
$('#wf-import-prompt-reload').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
window.location.reload(true);
|
||||
});
|
||||
}});
|
||||
}
|
||||
else {
|
||||
var prompt = $('#wfTmpl_importPromptError').tmpl({err: res.err || 'An unknown error occurred during the import.'});
|
||||
var promptHTML = $("<div />").append(prompt).html();
|
||||
WFAD.colorboxHTML((WFAD.isSmallScreen ? '300px' : '400px'), promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
|
||||
$('#wf-import-prompt-close').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
WFAD.colorboxClose();
|
||||
});
|
||||
}});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end import options -->
|
||||
<script type="text/x-jquery-template" id="wfTmpl_exportPromptSuccess">
|
||||
<?php
|
||||
echo wfView::create('common/modal-prompt', array(
|
||||
'title' => __('Export Successful', 'wordfence'),
|
||||
'messageHTML' => '<p>' . esc_html__('We successfully exported your site options. To import your site options on another site, copy and paste the token below into the import text box on the destination site. Keep this token secret — it is like a password. If anyone else discovers the token it will allow them to import your options excluding your license.', 'wordfence') . '</p><p><input type="text" class="wf-full-width" value="${token}" onclick="this.select();" /></p>',
|
||||
'primaryButton' => array('id' => 'wf-export-prompt-close', 'label' => __('Close', 'wordfence'), 'link' => '#'),
|
||||
))->render();
|
||||
?>
|
||||
</script>
|
||||
|
||||
<script type="text/x-jquery-template" id="wfTmpl_exportPromptError">
|
||||
<?php
|
||||
echo wfView::create('common/modal-prompt', array(
|
||||
'title' => __('Error during Export', 'wordfence'),
|
||||
'message' => '${err}',
|
||||
'primaryButton' => array('id' => 'wf-export-prompt-close', 'label' => __('Close', 'wordfence'), 'link' => '#'),
|
||||
))->render();
|
||||
?>
|
||||
</script>
|
||||
|
||||
<script type="text/x-jquery-template" id="wfTmpl_importPromptSuccess">
|
||||
<?php
|
||||
echo wfView::create('common/modal-prompt', array(
|
||||
'title' => __('Import Successful', 'wordfence'),
|
||||
'messageHTML' => esc_html__('We successfully imported the site options.', 'wordfence'),
|
||||
'primaryButton' => array('id' => 'wf-import-prompt-reload', 'label' => __('Reload', 'wordfence'), 'link' => '#'),
|
||||
))->render();
|
||||
?>
|
||||
</script>
|
||||
|
||||
<script type="text/x-jquery-template" id="wfTmpl_importPromptError">
|
||||
<?php
|
||||
echo wfView::create('common/modal-prompt', array(
|
||||
'title' => __('Error during Import', 'wordfence'),
|
||||
'message' => '${err}',
|
||||
'primaryButton' => array('id' => 'wf-import-prompt-close', 'label' => __('Close', 'wordfence'), 'link' => '#'),
|
||||
))->render();
|
||||
?>
|
||||
</script>
|
||||
169
wp/plugins/wordfence/views/dashboard/options-group-license.php
Normal file
169
wp/plugins/wordfence/views/dashboard/options-group-license.php
Normal file
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Presents the License group.
|
||||
*
|
||||
* Expects $stateKey.
|
||||
*
|
||||
* @var string $stateKey The key under which the collapse state is stored.
|
||||
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
|
||||
*/
|
||||
|
||||
if (!isset($collapseable)) {
|
||||
$collapseable = true;
|
||||
}
|
||||
?>
|
||||
<div class="wf-row">
|
||||
<div class="wf-col-xs-12">
|
||||
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
|
||||
<div class="wf-block-header">
|
||||
<div class="wf-block-header-content">
|
||||
<div class="wf-block-title">
|
||||
<strong><?php esc_html_e('Wordfence License', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-block-content">
|
||||
<ul class="wf-block-list">
|
||||
<li>
|
||||
<ul class="wf-flex-vertical wf-flex-full-width wf-add-top wf-add-bottom">
|
||||
<li><strong><?php esc_html_e('Your Wordfence License', 'wordfence'); ?></strong></li>
|
||||
<li>
|
||||
<ul id="wf-option-apiKey" class="wf-option wf-option-text" data-text-option="apiKey" data-original-text-value="<?php echo esc_attr(wfConfig::get('apiKey')); ?>">
|
||||
<li class="wf-option-title">
|
||||
<?php esc_html_e('License Key', 'wordfence'); ?> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_DASHBOARD_OPTION_API_KEY); ?>" target="_blank" rel="noopener noreferrer" class="wf-inline-help"><i class="wf-fa wf-fa-question-circle-o" aria-hidden="true"></i><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
|
||||
</li>
|
||||
<li class="wf-option-text wf-option-full-width wf-no-right">
|
||||
<input type="text" value="<?php echo esc_attr(wfConfig::get('apiKey')); ?>" id="wf-license-input">
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<ul class="wf-flex-horizontal wf-flex-vertical-xs wf-flex-full-width">
|
||||
<li><strong><?php esc_html_e('License Status:', 'wordfence'); ?></strong>
|
||||
<?php
|
||||
if (wfLicense::current()->hasConflict()) {
|
||||
esc_html_e('License already in use', 'wordfence');
|
||||
}
|
||||
else if (wfLicense::current()->isExpired()) {
|
||||
echo esc_html(sprintf(__('%s License Expired', 'wordfence'), wfLicense::current()->getTypeLabel(false)));
|
||||
}
|
||||
else if (wfLicense::current()->getKeyType() === wfLicense::KEY_TYPE_PAID_DELETED) {
|
||||
esc_html_e('Premium License Deactivated', 'wordfence');
|
||||
}
|
||||
else {
|
||||
echo esc_html(sprintf(__('%s License Active', 'wordfence'), wfLicense::current()->getTypeLabel()));
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<li class="wf-right wf-flex-vertical-xs wf-flex-align-left wf-left-xs wf-padding-add-top-xs" id="wf-license-controls">
|
||||
<?php if (wfLicense::current()->isAtLeastPremium() || wfLicense::current()->hasConflict()): ?>
|
||||
<a href="#" class="wf-downgrade-license" role="button"><?php esc_html_e('Reset site to a free license', 'wordfence'); ?></a>
|
||||
<?php endif ?>
|
||||
<?php if (wfLicense::current()->hasConflict()): ?>
|
||||
<a href="https://www.wordfence.com/gnl1optMngKysReset/licenses/" target="_blank" rel="noopener noreferrer" class="wf-btn wf-btn-primary wf-btn-callout-subtle"><?php esc_html_e('Reset License', 'wordfence') ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
|
||||
<?php elseif (wfLicense::current()->isPaidAndCurrent()): ?>
|
||||
<a href="https://www.wordfence.com/gnl1optMngKys/licenses/" target="_blank" rel="noopener noreferrer" class=""><?php echo esc_html_e('Click here to manage your Wordfence licenses', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
|
||||
<?php else: ?>
|
||||
<?php if (wfLicense::current()->getKeyType() === wfLicense::KEY_TYPE_PAID_DELETED): ?>
|
||||
<a href="#" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-downgrade-license" role="button"><?php esc_html_e('Remove Invalid License', 'wordfence'); ?></a>
|
||||
<?php endif ?>
|
||||
<a href="https://www.wordfence.com/gnl1optUpgrade/products/pricing/" target="_blank" rel="noopener noreferrer" class="wf-btn wf-btn-primary wf-btn-callout-subtle"><?php esc_html_e('Upgrade to Premium', 'wordfence'); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a>
|
||||
<?php endif ?>
|
||||
<a href="#" class="wf-btn wf-btn-primary wf-btn-callout-subtle" style="display: none;" id="wf-install-license" role="button"><?php esc_html_e('Install License', 'wordfence'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<script type="application/javascript">
|
||||
(function($) {
|
||||
$(function() {
|
||||
$('#wf-install-license').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
WFAD.setOption(
|
||||
'apiKey',
|
||||
$('#wf-license-input').val(),
|
||||
function() {
|
||||
delete WFAD.pendingChanges['apiKey'];
|
||||
WFAD.updatePendingChanges();
|
||||
window.location.reload(true);
|
||||
},
|
||||
function() {
|
||||
window.location.reload();
|
||||
},
|
||||
true
|
||||
);
|
||||
});
|
||||
|
||||
$('#wf-license-input').on('focus', function() {
|
||||
var field = $(this);
|
||||
setTimeout(function() {
|
||||
field.select();
|
||||
}, 100);
|
||||
}).on('change paste keyup', function() {
|
||||
setTimeout(function() {
|
||||
var originalKey = $('#wf-license-input').closest('.wf-option').data('originalTextValue');
|
||||
if (originalKey != $('#wf-license-input').val()) {
|
||||
$('#wf-license-controls a').hide();
|
||||
$('#wf-install-license').show();
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
|
||||
$(window).on('wfOptionsReset', function() {
|
||||
$('#wf-license-controls a').show();
|
||||
$('#wf-install-license').hide();
|
||||
});
|
||||
|
||||
$('.wf-downgrade-license').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
var prompt = $('#wfTmpl_downgradePrompt').tmpl();
|
||||
var promptHTML = $("<div />").append(prompt).html();
|
||||
WFAD.colorboxHTML('400px', promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
|
||||
$('#wf-downgrade-prompt-cancel').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
WFAD.colorboxClose();
|
||||
});
|
||||
|
||||
$('#wf-downgrade-prompt-downgrade').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
WFAD.ajax('wordfence_downgradeLicense', {}, function(res) {
|
||||
window.location.reload(true);
|
||||
});
|
||||
});
|
||||
}});
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
</li>
|
||||
<?php if (wfLicense::current()->getKeyType() === wfLicense::KEY_TYPE_PAID_DELETED): ?>
|
||||
<li>
|
||||
<p><?php echo wp_kses(__('This was a premium license key, but it is no longer valid, so premium features are disabled. You can either remove the invalid key and continue using Wordfence\'s free features, or enter a new premium key to upgrade. If you have questions, contact <a href="mailto:billing@wordfence.com">billing@wordfence.com</a>.', 'wordfence'), array('a' => array('href' => array()))) ?></p>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end license options -->
|
||||
<script type="text/x-jquery-template" id="wfTmpl_downgradePrompt">
|
||||
<?php
|
||||
echo wfView::create('common/modal-prompt', array(
|
||||
'title' => __('Confirm Reset', 'wordfence'),
|
||||
'messageHTML' => wp_kses(__('<p>Are you sure you want to reset this site\'s Wordfence License? This will disable Premium features and return the site to the free version of Wordfence. Your settings will still be retained when reinstalling a license.</p><p>If autorenew is enabled for the current license, the license will renew at the next expiration date. If you would like to turn renewal off or assign the license to another site, log into wordfence.com to change it.</p>', 'wordfence'), array('p'=>array())),
|
||||
'primaryButton' => array('id' => 'wf-downgrade-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'),
|
||||
'secondaryButtons' => array(array('id' => 'wf-downgrade-prompt-downgrade', 'label' => __('Reset', 'wordfence'), 'link' => '#')),
|
||||
))->render();
|
||||
?>
|
||||
</script>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Presents the View Customization group.
|
||||
*
|
||||
* Expects $stateKey.
|
||||
*
|
||||
* @var string $stateKey The key under which the collapse state is stored.
|
||||
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
|
||||
*/
|
||||
|
||||
if (!isset($collapseable)) {
|
||||
$collapseable = true;
|
||||
}
|
||||
?>
|
||||
<div class="wf-row">
|
||||
<div class="wf-col-xs-12">
|
||||
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
|
||||
<div class="wf-block-header">
|
||||
<div class="wf-block-header-content">
|
||||
<div class="wf-block-title">
|
||||
<strong><?php esc_html_e('View Customization', 'wordfence'); ?></strong>
|
||||
</div>
|
||||
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wf-block-content">
|
||||
<ul class="wf-block-list">
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'displayTopLevelOptions',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('displayTopLevelOptions') ? 1 : 0,
|
||||
'title' => __('Display "All Options" menu item', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'displayTopLevelBlocking',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('displayTopLevelBlocking') ? 1 : 0,
|
||||
'title' => __('Display "Blocking" menu item', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wfView::create('options/option-toggled', array(
|
||||
'optionName' => 'displayTopLevelLiveTraffic',
|
||||
'enabledValue' => 1,
|
||||
'disabledValue' => 0,
|
||||
'value' => wfConfig::get('displayTopLevelLiveTraffic') ? 1 : 0,
|
||||
'title' => __('Display "Live Traffic" menu item', 'wordfence'),
|
||||
))->render();
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- end custom scan options -->
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Expects $id, $title, $subtitle, and $link, and $linkLabel to be defined.
|
||||
* If $linkLabel is null, the link will be hidden.
|
||||
* $linkNewWindow can optionally be defined and defaults to false.
|
||||
*/
|
||||
|
||||
if (!isset($linkNewWindow)) { $linkNewWindow = false; }
|
||||
?>
|
||||
<div id="<?php echo esc_attr($id); ?>" class="wf-status-detail">
|
||||
<div class="wf-status-payment-expiring">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 644"><g><path style="fill:none" d="M66.3,269.5v205.4c0,2.9,1.1,5.5,3.2,7.6c2.1,2.1,4.7,3.2,7.6,3.2h413.6c8.8-72,65.8-129.1,137.8-138v-78.2
|
||||
H66.3z M196,442.4h-86.5l0-43.2H196V442.4z M369,442.4H239.3v-43.2H369V442.4z"/><path style="fill:none" d="M628.4,64.1c0-2.9-1.1-5.4-3.2-7.6c-2.1-2.1-4.7-3.2-7.6-3.2H77.1c-2.9,0-5.5,1.1-7.6,3.2s-3.2,4.7-3.2,7.6
|
||||
v75.7h562.1V64.1z"/><g><path style="fill:none" d="M617.6,53.3H77.1c-2.9,0-5.5,1.1-7.6,3.2s-3.2,4.7-3.2,7.6v75.7h562.1V64.1c0-2.9-1.1-5.4-3.2-7.6
|
||||
C623.1,54.3,620.5,53.3,617.6,53.3z"/><path d="M655.8,25.9C645.2,15.3,632.5,10,617.6,10H77.1c-14.9,0-27.6,5.3-38.2,15.9C28.3,36.5,23,49.2,23,64.1v410.8
|
||||
c0,14.9,5.3,27.6,15.9,38.2c10.6,10.6,23.3,15.9,38.2,15.9h414.1c-1.2-7.8-1.8-15.8-1.8-23.9c0-6.5,0.4-13,1.2-19.3H77.1
|
||||
c-2.9,0-5.5-1.1-7.6-3.2c-2.1-2.1-3.2-4.7-3.2-7.6V269.5h562.1v78.2c6.4-0.8,12.9-1.2,19.5-1.2c8.1,0,16,0.6,23.7,1.8V64.1
|
||||
C671.7,49.2,666.4,36.5,655.8,25.9z M628.4,139.7H66.3V64.1c0-2.9,1.1-5.4,3.2-7.6s4.7-3.2,7.6-3.2h540.5c2.9,0,5.5,1.1,7.6,3.2
|
||||
c2.1,2.1,3.2,4.7,3.2,7.6V139.7z"/><rect x="109.5" y="399.2" width="86.5" height="43.2"/><rect x="239.3" y="399.2" width="129.7" height="43.2"/></g><g><path d="M759.7,440.3c-11.5-19.8-27.2-35.4-46.9-46.9C693,381.8,671.4,376,648,376s-45,5.8-64.7,17.3
|
||||
c-19.8,11.5-35.4,27.2-46.9,46.9C524.8,460,519,481.6,519,505c0,23.4,5.8,45,17.3,64.7c11.5,19.8,27.2,35.4,46.9,46.9
|
||||
C603,628.2,624.6,634,648,634s45-5.8,64.7-17.3c19.8-11.5,35.4-27.2,46.9-46.9C771.2,550,777,528.4,777,505
|
||||
C777,481.6,771.2,460,759.7,440.3L759.7,440.3z M669.5,585.5c0,1.6-0.5,2.9-1.5,3.9c-1,1.1-2.2,1.6-3.7,1.6H632
|
||||
c-1.5,0-2.7-0.6-3.9-1.7c-1.1-1.1-1.7-2.4-1.7-3.9v-31.9c0-1.5,0.6-2.7,1.7-3.9c1.1-1.1,2.4-1.7,3.9-1.7h32.2
|
||||
c1.5,0,2.7,0.5,3.7,1.6c1,1.1,1.5,2.4,1.5,3.9V585.5z M669.1,527.7c-0.1,1.1-0.7,2.1-1.8,2.9c-1.1,0.8-2.4,1.3-3.9,1.3h-31.1
|
||||
c-1.6,0-2.9-0.4-4-1.3c-1.1-0.8-1.7-1.8-1.7-2.9l-2.9-104.3c0-1.3,0.6-2.3,1.7-3c1.1-0.9,2.5-1.3,4-1.3h36.9c1.6,0,2.9,0.5,4,1.3
|
||||
c1.1,0.7,1.7,1.7,1.7,3L669.1,527.7z M669.1,527.7"/></g></g></svg>
|
||||
</div>
|
||||
<p class="wf-status-detail-title"><?php echo esc_html($title); ?></p>
|
||||
<p class="wf-status-detail-subtitle"><?php echo esc_html($subtitle); ?></p>
|
||||
<p class="wf-status-detail-link"><?php if ($linkLabel !== null): ?><a href="<?php echo esc_attr($link); ?>"<?php echo ($linkNewWindow ? ' target="_blank" rel="noopener noreferrer"' : ''); ?>><?php echo esc_html($linkLabel); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a><?php endif; ?></p>
|
||||
</div>
|
||||
18
wp/plugins/wordfence/views/dashboard/status-renewing.php
Normal file
18
wp/plugins/wordfence/views/dashboard/status-renewing.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if (!defined('WORDFENCE_VERSION')) { exit; }
|
||||
/**
|
||||
* Expects $id, $title, $subtitle, and $link, and $linkLabel to be defined.
|
||||
* If $linkLabel is null, the link will be hidden.
|
||||
* $linkNewWindow can optionally be defined and defaults to false.
|
||||
*/
|
||||
|
||||
if (!isset($linkNewWindow)) { $linkNewWindow = false; }
|
||||
?>
|
||||
<div id="<?php echo esc_attr($id); ?>" class="wf-status-detail">
|
||||
<div class="wf-status-renewing">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 608"><g><path d="M374.4,332.6l9.1,9c1.2,1.2,2.7,1.9,4.5,1.9c1.8,0,3.3-0.6,4.5-1.9l9-9l48.2-48.2c1.2-1.2,1.9-2.8,1.9-4.5c0-1.8-0.6-3.3-1.9-4.5l-9.1-9c-1.2-1.2-2.7-1.9-4.5-1.9c-1.8,0-3.3,0.6-4.5,1.9L388,310.1l-19.6-19.6c-1.2-1.2-2.8-1.9-4.5-1.9c-1.8,0-3.3,0.6-4.5,1.9l-9,9c-1.2,1.2-1.9,2.8-1.9,4.5c0,1.8,0.6,3.3,1.9,4.5L374.4,332.6z"/><path d="M767.7,304.8c-4.5-4.5-10.1-6.8-16.7-6.8l-67.6-0.3c-1-36.2-8.8-71.2-23.1-104.9c-14.4-33.7-34.2-63.2-59.7-88.7c-47.9-47.9-104.2-75.2-168.9-81.9c-64.7-6.7-126,7.6-184,43l-1.8,1.8c-2.3,2.3-3.4,5-3.4,8.4c0,3.3,1.1,6.1,3.4,8.3l52,52c3.8,3.8,8.4,4.4,13.8,1.8c24.7-10.1,39.5-15.7,44.4-16.7c32.1-7.7,63.8-7,95.3,1.8c31.5,8.9,59,25,82.3,48.3c35,35,53.5,77.3,55.4,126.9l-72.1,0c-6.6,0-12.2,2.3-16.7,6.8c-4.5,4.5-6.8,10.1-6.8,16.7c0,6.6,2.3,12.2,6.8,16.7l117,117c4.5,4.5,10.1,6.8,16.7,6.8c6.6,0,12.2-2.3,16.7-6.8l117-117c4.5-4.5,6.8-10.1,6.8-16.7C774.5,314.9,772.3,309.4,767.7,304.8z"/><path d="M502.1,473.8c-3.8-3.8-8.5-4.4-13.8-1.8c-24.7,10.1-39.5,15.7-44.4,16.7c-32,7.7-63.8,7.1-95.3-1.8c-31.5-8.9-58.9-25-82.3-48.3c-16.9-16.9-30.1-36.3-39.5-58.2c-9.4-21.9-14.5-44.8-15.4-68.7l71.5,0c6.6,0,12.2-2.3,16.7-6.8c4.5-4.5,6.8-10.1,6.8-16.7c0-6.6-2.3-12.2-6.8-16.7l-117-117c-4.5-4.5-10.1-6.8-16.7-6.8c-6.6,0-12.2,2.3-16.7,6.8l-117,117c-4.5,4.5-6.8,10.1-6.8,16.7c0,6.6,2.3,12.2,6.8,16.7c4.5,4.5,10.1,6.8,16.7,6.8l67.4,0c0.9,36.4,8.4,71.3,22.6,104.6c14.2,33.4,34,62.7,59.4,88.1c47.7,47.7,103.8,74.9,168.3,81.4c64.5,6.5,125.7-8,183.5-43.5c0.5-0.2,1.2-0.7,2.1-1.6c2.3-2.3,3.4-5.1,3.4-8.4c0-3.3-1.1-6.1-3.4-8.4L502.1,473.8z"/></g></svg>
|
||||
</div>
|
||||
<p class="wf-status-detail-title"><?php echo esc_html($title); ?></p>
|
||||
<p class="wf-status-detail-subtitle"><?php echo esc_html($subtitle); ?></p>
|
||||
<p class="wf-status-detail-link"><?php if ($linkLabel !== null): ?><a href="<?php echo esc_attr($link); ?>"<?php echo ($linkNewWindow ? ' target="_blank" rel="noopener noreferrer"' : ''); ?>><?php echo esc_html($linkLabel); ?><span class="screen-reader-text"> (<?php esc_html_e('opens in new tab', 'wordfence') ?>)</span></a><?php endif; ?></p>
|
||||
</div>
|
||||
Reference in New Issue
Block a user