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/scanner
File: option-scan-signatures.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_VERSION')) { exit; }
[1] Fix | Delete
/**
[2] Fix | Delete
* Presents the scan option scansEnabled_fileContents with a boolean on/off toggle checkbox and text area (hidden by default) for custom scan signatures.
[3] Fix | Delete
*
[4] Fix | Delete
* Expects $toggleOptionName, $enabledToggleValue, $disabledToggleValue, $toggleValue, $textAreaOptionName, $textAreaValue, and $title to be defined. $helpLink may also be defined.
[5] Fix | Delete
*
[6] Fix | Delete
* @var string $toggleOptionName The option name for the toggle portion.
[7] Fix | Delete
* @var string $enabledToggleValue The value to save in $toggleOption if the toggle is enabled.
[8] Fix | Delete
* @var string $disabledToggleValue The value to save in $toggleOption if the toggle is disabled.
[9] Fix | Delete
* @var string $toggleValue The current value of $toggleOptionName.
[10] Fix | Delete
* @var string $textAreaOptionName The option name for the text area portion.
[11] Fix | Delete
* @var string $textAreaValue The current value of $textAreaOptionName.
[12] Fix | Delete
* @var string $title The title shown for the option.
[13] Fix | Delete
* @var string $helpLink If defined, the link to the corresponding external help page.
[14] Fix | Delete
*/
[15] Fix | Delete
?>
[16] Fix | Delete
<ul class="wf-flex-vertical wf-flex-full-width">
[17] Fix | Delete
<li>
[18] Fix | Delete
<ul id="wf-option-scansEnabled-fileContents" class="wf-option wf-option-scan-signatures" data-toggle-option="scansEnabled_fileContents" data-enabled-toggle-value="1" data-disabled-toggle-value="0" data-original-toggle-value="<?php echo wfConfig::get('scansEnabled_fileContents') ? 1 : 0; ?>" data-text-area-option="scan_include_extra" data-original-text-area-value="<?php echo esc_attr(wfConfig::get('scan_include_extra')); ?>">
[19] Fix | Delete
<li class="wf-option-checkbox<?php echo (wfConfig::get('scansEnabled_fileContents') ? ' wf-checked' : ''); ?>" role="checkbox" aria-checked="<?php echo ($value == $enabledValue ? 'true' : 'false'); ?>" tabindex="0" aria-labelledby="wf-option-scansEnabled-fileContents-label"><i class="wf-ion-ios-checkmark-empty" aria-hidden="true"></i></li>
[20] Fix | Delete
<li class="wf-option-title"><span id="wf-option-scansEnabled-fileContents-label"><?php echo esc_html($title); ?></span> <a href="<?php echo wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_OPTION_MALWARE_SIGNATURES); ?>" 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>
[21] Fix | Delete
<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>
[22] Fix | Delete
</ul>
[23] Fix | Delete
</li>
[24] Fix | Delete
<li id="wf-scan-additional-signatures">
[25] Fix | Delete
<h4 id="wf-scan-additional-signatures-label"><?php esc_html_e('Add Additional Signatures', 'wordfence') ?></h4>
[26] Fix | Delete
<textarea id="wf-option-scan-include-extra" spellcheck="false" autocapitalize="none" autocomplete="off" aria-labelledby="wf-scan-additional-signatures-label"><?php echo esc_html(wfConfig::get('scan_include_extra')); ?></textarea>
[27] Fix | Delete
</li>
[28] Fix | Delete
</ul>
[29] Fix | Delete
<script type="application/javascript">
[30] Fix | Delete
(function($) {
[31] Fix | Delete
$(function() {
[32] Fix | Delete
$('.wf-option.wf-option-scan-signatures .wf-option-checkbox').each(function() {
[33] Fix | Delete
$(this).on('click', function(e) {
[34] Fix | Delete
e.preventDefault();
[35] Fix | Delete
e.stopPropagation();
[36] Fix | Delete
[37] Fix | Delete
var optionElement = $(this).closest('.wf-option');
[38] Fix | Delete
var option = optionElement.data('toggleOption');
[39] Fix | Delete
var value = false;
[40] Fix | Delete
var isActive = $(this).hasClass('wf-checked');
[41] Fix | Delete
if (isActive) {
[42] Fix | Delete
$(this).removeClass('wf-checked').attr('aria-checked', 'false');
[43] Fix | Delete
value = optionElement.data('disabledToggleValue');
[44] Fix | Delete
}
[45] Fix | Delete
else {
[46] Fix | Delete
$(this).addClass('wf-checked').attr('aria-checked', 'true');
[47] Fix | Delete
value = optionElement.data('enabledToggleValue');
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
var originalValue = optionElement.data('originalToggleValue');
[51] Fix | Delete
if (originalValue == value) {
[52] Fix | Delete
delete WFAD.pendingChanges[option];
[53] Fix | Delete
}
[54] Fix | Delete
else {
[55] Fix | Delete
WFAD.pendingChanges[option] = value;
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
WFAD.updatePendingChanges();
[59] Fix | Delete
});
[60] Fix | Delete
});
[61] Fix | Delete
[62] Fix | Delete
$('#wf-scan-additional-signatures textarea').on('change paste keyup', function() {
[63] Fix | Delete
var e = this;
[64] Fix | Delete
[65] Fix | Delete
setTimeout(function() {
[66] Fix | Delete
var optionElement = $(e).closest('ul').find('.wf-option.wf-option-scan-signatures');
[67] Fix | Delete
var option = optionElement.data('textAreaOption');
[68] Fix | Delete
var value = $(e).val();
[69] Fix | Delete
[70] Fix | Delete
var originalValue = optionElement.data('originalTextAreaValue');
[71] Fix | Delete
if (originalValue == value) {
[72] Fix | Delete
delete WFAD.pendingChanges[option];
[73] Fix | Delete
}
[74] Fix | Delete
else {
[75] Fix | Delete
WFAD.pendingChanges[option] = value;
[76] Fix | Delete
}
[77] Fix | Delete
[78] Fix | Delete
WFAD.updatePendingChanges();
[79] Fix | Delete
}, 4);
[80] Fix | Delete
});
[81] Fix | Delete
[82] Fix | Delete
$(window).on('wfOptionsReset', function() {
[83] Fix | Delete
$('.wf-option.wf-option-scan-signatures .wf-option-checkbox').each(function() {
[84] Fix | Delete
var optionElement = $(this).closest('.wf-option');
[85] Fix | Delete
$(this).toggleClass('wf-checked', !!parseInt(optionElement.data('originalToggleValue')));
[86] Fix | Delete
});
[87] Fix | Delete
[88] Fix | Delete
$('#wf-scan-additional-signatures textarea').each(function() {
[89] Fix | Delete
var optionElement = $(this).closest('ul').find('.wf-option.wf-option-scan-signatures');
[90] Fix | Delete
var originalValue = optionElement.data('originalTextAreaValue');
[91] Fix | Delete
$(this).val(originalValue);
[92] Fix | Delete
});
[93] Fix | Delete
});
[94] Fix | Delete
[95] Fix | Delete
$('.wf-option.wf-option-scan-signatures .wf-option-disclosure').each(function() {
[96] Fix | Delete
var disclosure = $(this).find('svg');
[97] Fix | Delete
[98] Fix | Delete
$(this).closest('.wf-option').css('cursor', 'pointer');
[99] Fix | Delete
$(this).closest('.wf-option').on('click', function(e) {
[100] Fix | Delete
e.preventDefault();
[101] Fix | Delete
e.stopPropagation();
[102] Fix | Delete
[103] Fix | Delete
var isActive = $('#wf-scan-additional-signatures').hasClass('wf-active');
[104] Fix | Delete
if (isActive) {
[105] Fix | Delete
disclosure.css('transform', 'rotate(0deg)');
[106] Fix | Delete
$('#wf-scan-additional-signatures').slideUp({
[107] Fix | Delete
always: function() {
[108] Fix | Delete
$('#wf-scan-additional-signatures').removeClass('wf-active');
[109] Fix | Delete
}
[110] Fix | Delete
});
[111] Fix | Delete
}
[112] Fix | Delete
else {
[113] Fix | Delete
disclosure.css('transform', 'rotate(90deg)');
[114] Fix | Delete
$('#wf-scan-additional-signatures').slideDown({
[115] Fix | Delete
always: function() {
[116] Fix | Delete
$('#wf-scan-additional-signatures').addClass('wf-active');
[117] Fix | Delete
}
[118] Fix | Delete
});
[119] Fix | Delete
}
[120] Fix | Delete
});
[121] Fix | Delete
});
[122] Fix | Delete
});
[123] Fix | Delete
})(jQuery);
[124] Fix | Delete
</script>
[125] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function