Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordfenc.../lib
File: menu_dashboard_options.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_VERSION')) { exit; }
[1] Fix | Delete
$dashboardURL = network_admin_url('admin.php?page=Wordfence');
[2] Fix | Delete
$firewall = new wfFirewall();
[3] Fix | Delete
$scanner = wfScanner::shared();
[4] Fix | Delete
$d = new wfDashboard();
[5] Fix | Delete
?>
[6] Fix | Delete
<script type="application/javascript">
[7] Fix | Delete
(function($) {
[8] Fix | Delete
$(function() {
[9] Fix | Delete
document.title = "<?php esc_attr_e('Wordfence Global Options', 'wordfence'); ?>" + " \u2039 " + WFAD.basePageName;
[10] Fix | Delete
[11] Fix | Delete
//Hash-based option block linking
[12] Fix | Delete
if (window.location.hash) {
[13] Fix | Delete
var hashes = WFAD.parseHashes();
[14] Fix | Delete
var hash = hashes[hashes.length - 1];
[15] Fix | Delete
var block = $('.wf-block[data-persistence-key="' + hash + '"]');
[16] Fix | Delete
if (block) {
[17] Fix | Delete
if (!block.hasClass('wf-active')) {
[18] Fix | Delete
block.find('.wf-block-content').slideDown({
[19] Fix | Delete
always: function() {
[20] Fix | Delete
block.addClass('wf-active');
[21] Fix | Delete
$('html, body').animate({
[22] Fix | Delete
scrollTop: block.offset().top - 100
[23] Fix | Delete
}, 1000);
[24] Fix | Delete
}
[25] Fix | Delete
});
[26] Fix | Delete
[27] Fix | Delete
WFAD.ajax('wordfence_saveDisclosureState', {name: block.data('persistenceKey'), state: true}, function() {});
[28] Fix | Delete
}
[29] Fix | Delete
else {
[30] Fix | Delete
$('html, body').animate({
[31] Fix | Delete
scrollTop: block.offset().top - 100
[32] Fix | Delete
}, 1000);
[33] Fix | Delete
}
[34] Fix | Delete
history.replaceState('', document.title, window.location.pathname + window.location.search);
[35] Fix | Delete
}
[36] Fix | Delete
}
[37] Fix | Delete
});
[38] Fix | Delete
})(jQuery);
[39] Fix | Delete
</script>
[40] Fix | Delete
<div class="wf-options-controls">
[41] Fix | Delete
<div class="wf-row">
[42] Fix | Delete
<div class="wf-col-xs-12">
[43] Fix | Delete
<?php
[44] Fix | Delete
echo wfView::create('options/block-controls', array(
[45] Fix | Delete
'backLink' => $dashboardURL,
[46] Fix | Delete
'backLabelHTML' => wp_kses(__('Back<span class="wf-hidden-xs"> to Dashboard</span>', 'wordfence'), array('span'=>array('class'=>array()))),
[47] Fix | Delete
'restoreDefaultsSection' => wfConfig::OPTIONS_TYPE_GLOBAL,
[48] Fix | Delete
'restoreDefaultsMessage' => __('Are you sure you want to restore the default global settings? This will undo any custom changes you have made to the options on this page. Your configured license key and alert emails will not be changed.', 'wordfence'),
[49] Fix | Delete
))->render();
[50] Fix | Delete
?>
[51] Fix | Delete
</div>
[52] Fix | Delete
</div>
[53] Fix | Delete
</div>
[54] Fix | Delete
<div class="wf-options-controls-spacer"></div>
[55] Fix | Delete
<?php
[56] Fix | Delete
if (!wfOnboardingController::shouldShowAttempt3() && wfConfig::get('touppPromptNeeded')) {
[57] Fix | Delete
echo wfView::create('gdpr/disabled-overlay')->render();
[58] Fix | Delete
echo wfView::create('gdpr/banner')->render();
[59] Fix | Delete
}
[60] Fix | Delete
?>
[61] Fix | Delete
<div class="wrap wordfence" id="wf-global-options">
[62] Fix | Delete
<div class="wf-container-fluid">
[63] Fix | Delete
<div class="wf-row">
[64] Fix | Delete
<div class="wf-col-xs-12">
[65] Fix | Delete
<div class="wp-header-end"></div>
[66] Fix | Delete
</div>
[67] Fix | Delete
</div>
[68] Fix | Delete
<div class="wf-row">
[69] Fix | Delete
<div class="<?php echo wfStyle::contentClasses(); ?>">
[70] Fix | Delete
<div id="waf-options" class="wf-fixed-tab-content">
[71] Fix | Delete
<?php
[72] Fix | Delete
echo wfView::create('common/section-title', array(
[73] Fix | Delete
'title' => __('Wordfence Global Options', 'wordfence'),
[74] Fix | Delete
'helpLink' => wfSupportController::supportURL(wfSupportController::ITEM_DASHBOARD_OPTIONS),
[75] Fix | Delete
'helpLabelHTML' => wp_kses(__('Learn more<span class="wf-hidden-xs"> about Global Options</span>', 'wordfence'), array('span'=>array('class'=>array()))),
[76] Fix | Delete
'showIcon' => true,
[77] Fix | Delete
))->render();
[78] Fix | Delete
?>
[79] Fix | Delete
<div class="wf-row">
[80] Fix | Delete
<div class="wf-col-xs-12">
[81] Fix | Delete
<div class="wf-block wf-active">
[82] Fix | Delete
<div class="wf-block-content">
[83] Fix | Delete
<ul class="wf-block-list">
[84] Fix | Delete
<li>
[85] Fix | Delete
<ul class="wf-block-list wf-block-list-horizontal wf-block-list-nowrap wf-waf-coverage">
[86] Fix | Delete
<li>
[87] Fix | Delete
<?php
[88] Fix | Delete
echo wfView::create('common/status-detail', array(
[89] Fix | Delete
'id' => 'waf-coverage',
[90] Fix | Delete
'percentage' => $firewall->overallStatus(),
[91] Fix | Delete
'activeColor' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? '#ececec' : null /* automatic */),
[92] Fix | Delete
'title' => __('Firewall', 'wordfence'),
[93] Fix | Delete
'subtitle' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? __('WAF Currently in Learning Mode', 'wordfence') : __('Protection from known and emerging threats', 'wordfence')),
[94] Fix | Delete
'link' => wfPage::pageURL(wfPage::PAGE_FIREWALL_OPTIONS, wfPage::PAGE_DASHBOARD_OPTIONS),
[95] Fix | Delete
'linkLabel' => __('Manage Firewall', 'wordfence'),
[96] Fix | Delete
'statusTitle' => __('Firewall Status', 'wordfence'),
[97] Fix | Delete
'statusList' => $firewall->statusList(),
[98] Fix | Delete
'statusExtra' => ($firewall->firewallMode() == wfFirewall::FIREWALL_MODE_LEARNING ? wfView::create('waf/status-tooltip-learning-mode')->render() : ''),
[99] Fix | Delete
'helpLink' => __('https://www.wordfence.com/help/dashboard/#dashboard-status', 'wordfence'),
[100] Fix | Delete
))->render();
[101] Fix | Delete
?>
[102] Fix | Delete
</li>
[103] Fix | Delete
<li>
[104] Fix | Delete
<?php
[105] Fix | Delete
echo wfView::create('common/status-detail', array(
[106] Fix | Delete
'id' => 'wf-scanner-type',
[107] Fix | Delete
'percentage' => $scanner->scanTypeStatus(),
[108] Fix | Delete
'activeColor' => (!$scanner->isEnabled() ? '#ececec' : null /* automatic */),
[109] Fix | Delete
'title' => __('Scan', 'wordfence'),
[110] Fix | Delete
'subtitle' => __('Detection of security issues', 'wordfence'),
[111] Fix | Delete
'link' => wfPage::pageURL(wfPage::PAGE_SCAN_OPTIONS, wfPage::PAGE_DASHBOARD_OPTIONS),
[112] Fix | Delete
'linkLabel' => __('Manage Scan', 'wordfence'),
[113] Fix | Delete
'statusTitle' => __('Scan Status', 'wordfence'),
[114] Fix | Delete
'statusList' => $scanner->scanTypeStatusList(),
[115] Fix | Delete
'helpLink' => __('https://www.wordfence.com/help/dashboard/#dashboard-status', 'wordfence'),
[116] Fix | Delete
))->render();
[117] Fix | Delete
?>
[118] Fix | Delete
</li>
[119] Fix | Delete
<li>
[120] Fix | Delete
<?php if (wfConfig::get('hasKeyConflict')): ?>
[121] Fix | Delete
<?php
[122] Fix | Delete
echo wfView::create('common/status-critical', array(
[123] Fix | Delete
'id' => 'wf-premium-alert',
[124] Fix | Delete
'title' => __('Premium License Conflict', 'wordfence'),
[125] Fix | Delete
'subtitle' => __('License already in use', 'wordfence'),
[126] Fix | Delete
'link' => 'https://www.wordfence.com/gnl1manageConflict/manage-wordfence-api-keys/',
[127] Fix | Delete
'linkLabel' => __('Reset License', 'wordfence'),
[128] Fix | Delete
'linkNewWindow' => true,
[129] Fix | Delete
))->render();
[130] Fix | Delete
?>
[131] Fix | Delete
<?php elseif (wfConfig::get('keyType') == wfLicense::KEY_TYPE_PAID_EXPIRED): ?>
[132] Fix | Delete
<?php
[133] Fix | Delete
echo wfView::create('common/status-critical', array(
[134] Fix | Delete
'id' => 'wf-premium-alert',
[135] Fix | Delete
'title' => __('Premium Protection Disabled', 'wordfence'),
[136] Fix | Delete
'subtitle' => __('License is expired', 'wordfence'),
[137] Fix | Delete
'link' => 'https://www.wordfence.com/gnl1renewExpired/manage-wordfence-api-keys/',
[138] Fix | Delete
'linkLabel' => __('Renew License', 'wordfence'),
[139] Fix | Delete
'linkNewWindow' => true,
[140] Fix | Delete
))->render();
[141] Fix | Delete
?>
[142] Fix | Delete
<?php elseif (wfConfig::get('keyType') == wfLicense::KEY_TYPE_PAID_DELETED): ?>
[143] Fix | Delete
<?php
[144] Fix | Delete
echo wfView::create('common/status-critical', array(
[145] Fix | Delete
'id' => 'wf-premium-alert',
[146] Fix | Delete
'title' => __('Premium Protection Disabled', 'wordfence'),
[147] Fix | Delete
'subtitleHtml' => wp_kses(__('The license you were using has been removed from your account. Please reach out to <a href="mailto:billing@wordfence.com">billing@wordfence.com</a> or create a Premium support case at <a href="https://support.wordfence.com/support/tickets" target="_blank">https://support.wordfence.com/support/tickets<span class="screen-reader-text"> (opens in new tab)</span></a> for more information. Our staff is happy to help.', 'wordfence'), array('a'=>array('href'=>array(), 'target'=>array()), 'span'=>array('class'=>array()))),
[148] Fix | Delete
'link' => null,
[149] Fix | Delete
'linkLabel' => null
[150] Fix | Delete
))->render();
[151] Fix | Delete
?>
[152] Fix | Delete
<?php elseif (wfConfig::get('keyType') == wfLicense::KEY_TYPE_FREE || wfConfig::get('keyType') === false): ?>
[153] Fix | Delete
<div>
[154] Fix | Delete
<p><h3><?php esc_html_e('Premium Protection Disabled', 'wordfence'); ?></h3></p>
[155] Fix | Delete
<p><?php esc_html_e('As a free Wordfence user, you are currently using the Community version of the Threat Defense Feed. Premium users are protected by additional firewall rules and malware signatures. Upgrade to Premium today to improve your protection.', 'wordfence'); ?></p>
[156] Fix | Delete
<p><a class="wf-btn wf-btn-primary wf-btn-callout-subtle" href="https://www.wordfence.com/gnl1dashboardOptionsUpgrade/products/wordfence-premium/" target="_blank" rel="noopener noreferrer"><?php esc_html_e('Upgrade to Premium', 'wordfence'); ?></a>&nbsp;&nbsp;<a class="wf-btn wf-btn-callout-subtle wf-btn-default" href="https://www.wordfence.com/gnl1dashboardOptionsLearn/products/pricing/" 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>
[157] Fix | Delete
</div>
[158] Fix | Delete
<?php elseif (wfConfig::get('keyExpDays') < 30 && (wfConfig::get('premiumAutoRenew', null) === '0' || wfConfig::get('premiumAutoRenew', null) === 0)): ?>
[159] Fix | Delete
<?php
[160] Fix | Delete
echo wfView::create('common/status-critical', array(
[161] Fix | Delete
'id' => 'wf-premium-alert',
[162] Fix | Delete
'title' => __('Premium License Expiring', 'wordfence'),
[163] Fix | Delete
'subtitle' => __('Auto-renew is disabled', 'wordfence'),
[164] Fix | Delete
'link' => 'https://www.wordfence.com/gnl1renewExpiring/manage-wordfence-api-keys/',
[165] Fix | Delete
'linkLabel' => __('Renew License', 'wordfence'),
[166] Fix | Delete
'linkNewWindow' => true,
[167] Fix | Delete
))->render();
[168] Fix | Delete
?>
[169] Fix | Delete
<?php elseif (wfConfig::get('keyExpDays') < 30): ?>
[170] Fix | Delete
<?php
[171] Fix | Delete
if (wfConfig::get('premiumPaymentExpiring')) {
[172] Fix | Delete
$title = __('Payment Method Expiring', 'wordfence');
[173] Fix | Delete
}
[174] Fix | Delete
else if (wfConfig::get('premiumPaymentExpired')) {
[175] Fix | Delete
$title = __('Payment Method Expired', 'wordfence');
[176] Fix | Delete
}
[177] Fix | Delete
else if (wfConfig::get('premiumPaymentMissing')) {
[178] Fix | Delete
$title = __('Payment Method Missing', 'wordfence');
[179] Fix | Delete
}
[180] Fix | Delete
else if (wfConfig::get('premiumPaymentHold')) {
[181] Fix | Delete
$title = __('Payment Method Invalid', 'wordfence');
[182] Fix | Delete
}
[183] Fix | Delete
[184] Fix | Delete
if (isset($title)) {
[185] Fix | Delete
$days = floor(((int) wfConfig::get('premiumNextRenew') - time()) / 86400);
[186] Fix | Delete
if ($days <= 0) {
[187] Fix | Delete
$days = __('today', 'wordfence');
[188] Fix | Delete
}
[189] Fix | Delete
else if ($days == 1) {
[190] Fix | Delete
$days = __('tomorrow', 'wordfence');
[191] Fix | Delete
}
[192] Fix | Delete
else {
[193] Fix | Delete
$days = sprintf(/* translators: Number of days */ __('in %d days', 'wordfence'), $days);
[194] Fix | Delete
}
[195] Fix | Delete
[196] Fix | Delete
echo wfView::create('dashboard/status-payment-expiring', array(
[197] Fix | Delete
'id' => 'wf-premium-alert',
[198] Fix | Delete
'title' => $title,
[199] Fix | Delete
'subtitle' => sprintf(__('License renews %s', 'wordfence'), $days),
[200] Fix | Delete
'link' => 'https://www.wordfence.com/gnl1renewExpiring/manage-wordfence-api-keys/',
[201] Fix | Delete
'linkLabel' => __('Update Payment Method', 'wordfence'),
[202] Fix | Delete
'linkNewWindow' => true,
[203] Fix | Delete
))->render();
[204] Fix | Delete
}
[205] Fix | Delete
else {
[206] Fix | Delete
$days = floor(((int) wfConfig::get('premiumNextRenew') - time()) / 86400);
[207] Fix | Delete
if ($days == 0) {
[208] Fix | Delete
$days = __('today', 'wordfence');
[209] Fix | Delete
}
[210] Fix | Delete
else if ($days == 1) {
[211] Fix | Delete
$days = __('in 1 day', 'wordfence');
[212] Fix | Delete
}
[213] Fix | Delete
else {
[214] Fix | Delete
$days = sprintf(__('in %d days', 'wordfence'), $days);
[215] Fix | Delete
}
[216] Fix | Delete
[217] Fix | Delete
echo wfView::create('dashboard/status-renewing', array(
[218] Fix | Delete
'id' => 'wf-premium-alert',
[219] Fix | Delete
'title' => __('Premium License Expiring', 'wordfence'),
[220] Fix | Delete
'subtitle' => sprintf(__('License renews %s', 'wordfence'), $days),
[221] Fix | Delete
'link' => 'https://www.wordfence.com/gnl1reviewExpiring/manage-wordfence-api-keys/',
[222] Fix | Delete
'linkLabel' => __('Review Payment Method', 'wordfence'),
[223] Fix | Delete
'linkNewWindow' => true,
[224] Fix | Delete
))->render();
[225] Fix | Delete
}
[226] Fix | Delete
?>
[227] Fix | Delete
<?php elseif (wfConfig::get('keyType') == wfLicense::KEY_TYPE_PAID_CURRENT): ?>
[228] Fix | Delete
<div class="wf-block-labeled-value wf-protection-status wf-protection-status-<?php echo esc_attr($firewall->ruleMode()); ?>">
[229] Fix | Delete
<div class="wf-block-labeled-value-value"><i class="wf-fa wf-fa-check" aria-hidden="true"></i></div>
[230] Fix | Delete
<div class="wf-block-labeled-value-label"><?php echo esc_html(sprintf(__('%s Enabled', 'wordfence'), wfLicense::current()->getPrefixedTypeLabel())); ?></div>
[231] Fix | Delete
<?php if (wfLicense::current()->isBelowResponse()): ?>
[232] Fix | Delete
<p>
[233] Fix | Delete
<?php if (wfLicense::current()->isBelowCare()): ?>
[234] Fix | Delete
<a href="https://www.wordfence.com/gnl1dashboardLearnCareResponse/products/pricing/"><?php esc_html_e('Learn about Wordfence Care and Wordfence Response', 'wordfence') ?></a>
[235] Fix | Delete
<?php else: ?>
[236] Fix | Delete
<a href="https://www.wordfence.com/gnl1dashboardLearnResponse/products/wordfence-response/"><?php esc_html_e('Learn about Wordfence Response', 'wordfence') ?></a>
[237] Fix | Delete
<?php endif ?>
[238] Fix | Delete
</p>
[239] Fix | Delete
<?php endif ?>
[240] Fix | Delete
</div>
[241] Fix | Delete
<?php endif; ?>
[242] Fix | Delete
</li>
[243] Fix | Delete
</ul>
[244] Fix | Delete
</li>
[245] Fix | Delete
</ul>
[246] Fix | Delete
</div>
[247] Fix | Delete
</div>
[248] Fix | Delete
</div>
[249] Fix | Delete
</div>
[250] Fix | Delete
<?php
[251] Fix | Delete
echo wfView::create('dashboard/options-group-license', array(
[252] Fix | Delete
'stateKey' => 'global-options-license',
[253] Fix | Delete
))->render();
[254] Fix | Delete
[255] Fix | Delete
echo wfView::create('dashboard/options-group-view-customization', array(
[256] Fix | Delete
'stateKey' => 'global-options-view-customization',
[257] Fix | Delete
))->render();
[258] Fix | Delete
[259] Fix | Delete
echo wfView::create('dashboard/options-group-general', array(
[260] Fix | Delete
'stateKey' => 'global-options-general',
[261] Fix | Delete
))->render();
[262] Fix | Delete
[263] Fix | Delete
echo wfView::create('dashboard/options-group-dashboard', array(
[264] Fix | Delete
'stateKey' => 'global-options-dashboard',
[265] Fix | Delete
))->render();
[266] Fix | Delete
[267] Fix | Delete
echo wfView::create('dashboard/options-group-alert', array(
[268] Fix | Delete
'stateKey' => 'global-options-alert',
[269] Fix | Delete
))->render();
[270] Fix | Delete
[271] Fix | Delete
echo wfView::create('dashboard/options-group-email-summary', array(
[272] Fix | Delete
'stateKey' => 'global-options-email-summary',
[273] Fix | Delete
))->render();
[274] Fix | Delete
?>
[275] Fix | Delete
<div class="wf-row">
[276] Fix | Delete
<div class="wf-col-xs-12">
[277] Fix | Delete
<div class="wf-block wf-always-active">
[278] Fix | Delete
<div class="wf-block-header">
[279] Fix | Delete
<div class="wf-block-header-content">
[280] Fix | Delete
<div class="wf-block-title">
[281] Fix | Delete
<strong><?php esc_html_e('Import/Export Options', 'wordfence'); ?></strong>
[282] Fix | Delete
</div>
[283] Fix | Delete
</div>
[284] Fix | Delete
</div>
[285] Fix | Delete
<div class="wf-block-content">
[286] Fix | Delete
<ul class="wf-block-list">
[287] Fix | Delete
<li>
[288] Fix | Delete
<ul class="wf-flex-horizontal wf-flex-vertical-xs wf-flex-full-width wf-add-top wf-add-bottom">
[289] Fix | Delete
<li><?php esc_html_e('Importing and exporting of options has moved to the Tools page', 'wordfence'); ?></li>
[290] Fix | Delete
<li class="wf-right wf-left-xs wf-padding-add-top-xs-small">
[291] Fix | Delete
<a href="<?php echo esc_url(network_admin_url('admin.php?page=WordfenceTools&subpage=importexport')); ?>" class="wf-btn wf-btn-primary wf-btn-callout-subtle" id="wf-export-options"><?php esc_html_e('Import/Export Options', 'wordfence'); ?></a>
[292] Fix | Delete
</li>
[293] Fix | Delete
</ul>
[294] Fix | Delete
</li>
[295] Fix | Delete
</ul>
[296] Fix | Delete
</div>
[297] Fix | Delete
</div>
[298] Fix | Delete
</div>
[299] Fix | Delete
</div> <!-- end import options -->
[300] Fix | Delete
</div> <!-- end options block -->
[301] Fix | Delete
</div> <!-- end content block -->
[302] Fix | Delete
</div> <!-- end row -->
[303] Fix | Delete
</div> <!-- end container -->
[304] Fix | Delete
</div>
[305] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function