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.../views/dashboar...
File: options-group-license.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_VERSION')) { exit; }
[1] Fix | Delete
/**
[2] Fix | Delete
* Presents the License group.
[3] Fix | Delete
*
[4] Fix | Delete
* Expects $stateKey.
[5] Fix | Delete
*
[6] Fix | Delete
* @var string $stateKey The key under which the collapse state is stored.
[7] Fix | Delete
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
if (!isset($collapseable)) {
[11] Fix | Delete
$collapseable = true;
[12] Fix | Delete
}
[13] Fix | Delete
?>
[14] Fix | Delete
<div class="wf-row">
[15] Fix | Delete
<div class="wf-col-xs-12">
[16] Fix | Delete
<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); ?>">
[17] Fix | Delete
<div class="wf-block-header">
[18] Fix | Delete
<div class="wf-block-header-content">
[19] Fix | Delete
<div class="wf-block-title">
[20] Fix | Delete
<strong><?php esc_html_e('Wordfence License', 'wordfence'); ?></strong>
[21] Fix | Delete
</div>
[22] Fix | Delete
<?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; ?>
[23] Fix | Delete
</div>
[24] Fix | Delete
</div>
[25] Fix | Delete
<div class="wf-block-content">
[26] Fix | Delete
<ul class="wf-block-list">
[27] Fix | Delete
<li>
[28] Fix | Delete
<ul class="wf-flex-vertical wf-flex-full-width wf-add-top wf-add-bottom">
[29] Fix | Delete
<li><strong><?php esc_html_e('Your Wordfence License', 'wordfence'); ?></strong></li>
[30] Fix | Delete
<li>
[31] Fix | Delete
<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')); ?>">
[32] Fix | Delete
<li class="wf-option-title">
[33] Fix | Delete
<?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>
[34] Fix | Delete
</li>
[35] Fix | Delete
<li class="wf-option-text wf-option-full-width wf-no-right">
[36] Fix | Delete
<input type="text" value="<?php echo esc_attr(wfConfig::get('apiKey')); ?>" id="wf-license-input">
[37] Fix | Delete
</li>
[38] Fix | Delete
</ul>
[39] Fix | Delete
</li>
[40] Fix | Delete
<li>
[41] Fix | Delete
<ul class="wf-flex-horizontal wf-flex-vertical-xs wf-flex-full-width">
[42] Fix | Delete
<li><strong><?php esc_html_e('License Status:', 'wordfence'); ?></strong>
[43] Fix | Delete
<?php
[44] Fix | Delete
if (wfLicense::current()->hasConflict()) {
[45] Fix | Delete
esc_html_e('License already in use', 'wordfence');
[46] Fix | Delete
}
[47] Fix | Delete
else if (wfLicense::current()->isExpired()) {
[48] Fix | Delete
echo esc_html(sprintf(__('%s License Expired', 'wordfence'), wfLicense::current()->getTypeLabel(false)));
[49] Fix | Delete
}
[50] Fix | Delete
else if (wfLicense::current()->getKeyType() === wfLicense::KEY_TYPE_PAID_DELETED) {
[51] Fix | Delete
esc_html_e('Premium License Deactivated', 'wordfence');
[52] Fix | Delete
}
[53] Fix | Delete
else {
[54] Fix | Delete
echo esc_html(sprintf(__('%s License Active', 'wordfence'), wfLicense::current()->getTypeLabel()));
[55] Fix | Delete
}
[56] Fix | Delete
?>
[57] Fix | Delete
</li>
[58] Fix | Delete
<li class="wf-right wf-flex-vertical-xs wf-flex-align-left wf-left-xs wf-padding-add-top-xs" id="wf-license-controls">
[59] Fix | Delete
<?php if (wfLicense::current()->isAtLeastPremium() || wfLicense::current()->hasConflict()): ?>
[60] Fix | Delete
<a href="#" class="wf-downgrade-license" role="button"><?php esc_html_e('Reset site to a free license', 'wordfence'); ?></a>
[61] Fix | Delete
<?php endif ?>
[62] Fix | Delete
<?php if (wfLicense::current()->hasConflict()): ?>
[63] Fix | Delete
<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>
[64] Fix | Delete
<?php elseif (wfLicense::current()->isPaidAndCurrent()): ?>
[65] Fix | Delete
<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>
[66] Fix | Delete
<?php else: ?>
[67] Fix | Delete
<?php if (wfLicense::current()->getKeyType() === wfLicense::KEY_TYPE_PAID_DELETED): ?>
[68] Fix | Delete
<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>&nbsp;&nbsp;
[69] Fix | Delete
<?php endif ?>
[70] Fix | Delete
<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>
[71] Fix | Delete
<?php endif ?>
[72] Fix | Delete
<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>
[73] Fix | Delete
</li>
[74] Fix | Delete
</ul>
[75] Fix | Delete
[76] Fix | Delete
<script type="application/javascript">
[77] Fix | Delete
(function($) {
[78] Fix | Delete
$(function() {
[79] Fix | Delete
$('#wf-install-license').on('click', function(e) {
[80] Fix | Delete
e.preventDefault();
[81] Fix | Delete
e.stopPropagation();
[82] Fix | Delete
[83] Fix | Delete
WFAD.setOption(
[84] Fix | Delete
'apiKey',
[85] Fix | Delete
$('#wf-license-input').val(),
[86] Fix | Delete
function() {
[87] Fix | Delete
delete WFAD.pendingChanges['apiKey'];
[88] Fix | Delete
WFAD.updatePendingChanges();
[89] Fix | Delete
window.location.reload(true);
[90] Fix | Delete
},
[91] Fix | Delete
function() {
[92] Fix | Delete
window.location.reload();
[93] Fix | Delete
},
[94] Fix | Delete
true
[95] Fix | Delete
);
[96] Fix | Delete
});
[97] Fix | Delete
[98] Fix | Delete
$('#wf-license-input').on('focus', function() {
[99] Fix | Delete
var field = $(this);
[100] Fix | Delete
setTimeout(function() {
[101] Fix | Delete
field.select();
[102] Fix | Delete
}, 100);
[103] Fix | Delete
}).on('change paste keyup', function() {
[104] Fix | Delete
setTimeout(function() {
[105] Fix | Delete
var originalKey = $('#wf-license-input').closest('.wf-option').data('originalTextValue');
[106] Fix | Delete
if (originalKey != $('#wf-license-input').val()) {
[107] Fix | Delete
$('#wf-license-controls a').hide();
[108] Fix | Delete
$('#wf-install-license').show();
[109] Fix | Delete
}
[110] Fix | Delete
}, 100);
[111] Fix | Delete
});
[112] Fix | Delete
[113] Fix | Delete
$(window).on('wfOptionsReset', function() {
[114] Fix | Delete
$('#wf-license-controls a').show();
[115] Fix | Delete
$('#wf-install-license').hide();
[116] Fix | Delete
});
[117] Fix | Delete
[118] Fix | Delete
$('.wf-downgrade-license').on('click', function(e) {
[119] Fix | Delete
e.preventDefault();
[120] Fix | Delete
e.stopPropagation();
[121] Fix | Delete
[122] Fix | Delete
var prompt = $('#wfTmpl_downgradePrompt').tmpl();
[123] Fix | Delete
var promptHTML = $("<div />").append(prompt).html();
[124] Fix | Delete
WFAD.colorboxHTML('400px', promptHTML, {overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
[125] Fix | Delete
$('#wf-downgrade-prompt-cancel').on('click', function(e) {
[126] Fix | Delete
e.preventDefault();
[127] Fix | Delete
e.stopPropagation();
[128] Fix | Delete
[129] Fix | Delete
WFAD.colorboxClose();
[130] Fix | Delete
});
[131] Fix | Delete
[132] Fix | Delete
$('#wf-downgrade-prompt-downgrade').on('click', function(e) {
[133] Fix | Delete
e.preventDefault();
[134] Fix | Delete
e.stopPropagation();
[135] Fix | Delete
[136] Fix | Delete
WFAD.ajax('wordfence_downgradeLicense', {}, function(res) {
[137] Fix | Delete
window.location.reload(true);
[138] Fix | Delete
});
[139] Fix | Delete
});
[140] Fix | Delete
}});
[141] Fix | Delete
});
[142] Fix | Delete
});
[143] Fix | Delete
})(jQuery);
[144] Fix | Delete
</script>
[145] Fix | Delete
</li>
[146] Fix | Delete
<?php if (wfLicense::current()->getKeyType() === wfLicense::KEY_TYPE_PAID_DELETED): ?>
[147] Fix | Delete
<li>
[148] Fix | Delete
<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>
[149] Fix | Delete
</li>
[150] Fix | Delete
<?php endif ?>
[151] Fix | Delete
</ul>
[152] Fix | Delete
</li>
[153] Fix | Delete
</ul>
[154] Fix | Delete
</div>
[155] Fix | Delete
</div>
[156] Fix | Delete
</div>
[157] Fix | Delete
</div> <!-- end license options -->
[158] Fix | Delete
<script type="text/x-jquery-template" id="wfTmpl_downgradePrompt">
[159] Fix | Delete
<?php
[160] Fix | Delete
echo wfView::create('common/modal-prompt', array(
[161] Fix | Delete
'title' => __('Confirm Reset', 'wordfence'),
[162] Fix | Delete
'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())),
[163] Fix | Delete
'primaryButton' => array('id' => 'wf-downgrade-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'),
[164] Fix | Delete
'secondaryButtons' => array(array('id' => 'wf-downgrade-prompt-downgrade', 'label' => __('Reset', 'wordfence'), 'link' => '#')),
[165] Fix | Delete
))->render();
[166] Fix | Delete
?>
[167] Fix | Delete
</script>
[168] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function