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/options
File: block-all-options-controls.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_VERSION')) { exit; }
[1] Fix | Delete
/**
[2] Fix | Delete
* Presents the top controls on the All Options page.
[3] Fix | Delete
*
[4] Fix | Delete
* Expects $indexOptions. $suppressControls may be defined to hide the options-saving controls. If not truthy, $restoreDefaultsSection and $restoreDefaultsMessage must also be defined.
[5] Fix | Delete
*
[6] Fix | Delete
* @var array $indexOptions An array of the index options to allow searching. The key should be the element ID to scroll to and the value is the name of the option.
[7] Fix | Delete
* @var string $restoreDefaultsMessage The message shown in the restore defaults prompt
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
if (isset($backLabel) && !isset($backLabelHTML)) {
[11] Fix | Delete
$backLabelHTML = esc_html($backLabel);
[12] Fix | Delete
}
[13] Fix | Delete
?>
[14] Fix | Delete
<div class="wf-block wf-block-transparent wf-active">
[15] Fix | Delete
<div class="wf-block-content">
[16] Fix | Delete
<ul class="wf-block-left-right wf-block-left-right-nowrap wf-hidden-xs">
[17] Fix | Delete
<li class="wf-left">
[18] Fix | Delete
<ul class="wf-flex-horizontal">
[19] Fix | Delete
<?php if (isset($showIcon) && $showIcon): ?>
[20] Fix | Delete
<li><div class="wordfence-lock-icon wordfence-icon32 wf-no-top wf-no-right wf-hidden-xs"></div></li>
[21] Fix | Delete
<?php endif; ?>
[22] Fix | Delete
<li id="wf-all-options-search"<?php if (isset($showIcon) && $showIcon): ?> class="wf-padding-add-left"<?php endif; ?>>
[23] Fix | Delete
<select class="wf-options-searcher" multiple>
[24] Fix | Delete
<?php
[25] Fix | Delete
foreach ($indexOptions as $element => $label):
[26] Fix | Delete
?>
[27] Fix | Delete
<option value="<?php echo esc_attr($element); ?>"><?php echo esc_html($label); ?></option>
[28] Fix | Delete
<?php
[29] Fix | Delete
endforeach;
[30] Fix | Delete
?>
[31] Fix | Delete
</select>
[32] Fix | Delete
</li>
[33] Fix | Delete
</ul>
[34] Fix | Delete
</li>
[35] Fix | Delete
<?php if (!isset($suppressControls) || !$suppressControls): ?>
[36] Fix | Delete
<li class="wf-right">
[37] Fix | Delete
<a id="wf-restore-defaults" class="wf-btn wf-btn-default wf-btn-callout-subtle" href="#" data-restore-defaults-section="<?php echo esc_attr($restoreDefaultsSection); ?>" role="button"><?php echo wp_kses(/* translators: word order may be reversed as long as HTML remains around "Restore" */ __('<span class="wf-hidden-xs">Restore </span>Defaults', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>&nbsp;&nbsp;<a id="wf-cancel-changes" class="wf-btn wf-btn-default wf-btn-callout-subtle wf-disabled" href="#" role="button"><?php echo wp_kses(/* translators: word order may be reversed as long as HTML remains around "Changes" */ __('Cancel<span class="wf-hidden-xs wf-hidden-sm"> Changes</span>', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>&nbsp;&nbsp;<a id="wf-save-changes" class="wf-btn wf-btn-primary wf-btn-callout-subtle wf-disabled" href="#" role="button"><?php echo wp_kses(/* translators: word order may be reversed as long as HTML remains around "Changes" */ __('Save<span class="wf-hidden-xs wf-hidden-sm"> Changes</span>', 'wordfence'), array('span'=>array('class'=>array()))); ?></a>
[38] Fix | Delete
</li>
[39] Fix | Delete
<?php endif; ?>
[40] Fix | Delete
</ul>
[41] Fix | Delete
<ul class="wf-block-left-center-right wf-hidden-sm wf-hidden-md wf-hidden-lg">
[42] Fix | Delete
<li class="wf-left">
[43] Fix | Delete
<?php if (!isset($suppressLogo) || !$suppressLogo): ?>
[44] Fix | Delete
<div class="wordfence-lock-icon wordfence-icon32"></div>
[45] Fix | Delete
<?php endif; ?>
[46] Fix | Delete
</li>
[47] Fix | Delete
<li class="wf-center">
[48] Fix | Delete
<select class="wf-options-searcher" multiple>
[49] Fix | Delete
<?php
[50] Fix | Delete
foreach ($indexOptions as $element => $label):
[51] Fix | Delete
?>
[52] Fix | Delete
<option value="<?php echo esc_attr($element); ?>"><?php echo esc_html($label); ?></option>
[53] Fix | Delete
<?php
[54] Fix | Delete
endforeach;
[55] Fix | Delete
?>
[56] Fix | Delete
</select>
[57] Fix | Delete
</li>
[58] Fix | Delete
<?php if (!isset($suppressControls) || !$suppressControls): ?>
[59] Fix | Delete
<li class="wf-right">
[60] Fix | Delete
<a id="wf-mobile-controls" href="#" data-restore-defaults-section="<?php echo esc_attr($restoreDefaultsSection); ?>" role="button">&bullet;&bullet;&bullet;</a>
[61] Fix | Delete
</li>
[62] Fix | Delete
<?php endif; ?>
[63] Fix | Delete
</ul>
[64] Fix | Delete
</div>
[65] Fix | Delete
</div>
[66] Fix | Delete
<?php if (!isset($suppressControls) || !$suppressControls): ?>
[67] Fix | Delete
<script type="application/javascript">
[68] Fix | Delete
(function($) {
[69] Fix | Delete
$('.wf-options-searcher').css('display', 'none');
[70] Fix | Delete
[71] Fix | Delete
$(function() {
[72] Fix | Delete
var initialTop = parseInt($('.wf-options-controls').css('top'));
[73] Fix | Delete
$(window).bind("scroll", function() {
[74] Fix | Delete
if (window.matchMedia("only screen and (max-width: 615px)").matches) {
[75] Fix | Delete
$(this).scrollTop() > initialTop ? $('.wf-options-controls').css('top', '0px').css('position', 'fixed').css('left', '0px') : $('.wf-options-controls').css('top', initialTop + 'px').css('position', 'absolute').css('left', '-10px');
[76] Fix | Delete
}
[77] Fix | Delete
});
[78] Fix | Delete
[79] Fix | Delete
$('.wf-options-searcher').wfselect2({
[80] Fix | Delete
tags: true,
[81] Fix | Delete
tokenSeparators: [','],
[82] Fix | Delete
placeholder: <?php echo json_encode(__('Search All Options', 'wordfence')) ?>,
[83] Fix | Delete
minimumResultsForSearch: -1,
[84] Fix | Delete
minimumInputLength: 2,
[85] Fix | Delete
selectOnClose: false,
[86] Fix | Delete
width: (WFAD.screenSize(WFAD.SCREEN_MD) ? '250px' : '500px'),
[87] Fix | Delete
createTag: function (params) {
[88] Fix | Delete
return null; //No custom tags
[89] Fix | Delete
}
[90] Fix | Delete
}).on('change', function () {
[91] Fix | Delete
var selection = $(this).val();
[92] Fix | Delete
if (Array.isArray(selection)) {
[93] Fix | Delete
if (selection.length > 0) {
[94] Fix | Delete
selection = selection[0];
[95] Fix | Delete
}
[96] Fix | Delete
else {
[97] Fix | Delete
selection = false;
[98] Fix | Delete
}
[99] Fix | Delete
}
[100] Fix | Delete
else if (typeof selection !== 'string') {
[101] Fix | Delete
selection = false;
[102] Fix | Delete
}
[103] Fix | Delete
[104] Fix | Delete
if (selection !== false) {
[105] Fix | Delete
var el = $('#' + selection);
[106] Fix | Delete
if (el.is(':visible')) {
[107] Fix | Delete
$('html, body').animate({
[108] Fix | Delete
scrollTop: el.offset().top - 100
[109] Fix | Delete
}, 750);
[110] Fix | Delete
}
[111] Fix | Delete
else if (el.is('input[type="hidden"]')) {
[112] Fix | Delete
$('html, body').animate({
[113] Fix | Delete
scrollTop: el.parent().offset().top - 100
[114] Fix | Delete
}, 750);
[115] Fix | Delete
}
[116] Fix | Delete
else {
[117] Fix | Delete
var block = el.closest('.wf-block[data-persistence-key]');
[118] Fix | Delete
if (!block.hasClass('wf-active') && !block.hasClass('wf-always-active')) {
[119] Fix | Delete
block.find('.wf-block-content').slideDown({
[120] Fix | Delete
always: function() {
[121] Fix | Delete
block.addClass('wf-active');
[122] Fix | Delete
$('html, body').animate({
[123] Fix | Delete
scrollTop: el.offset().top - 100
[124] Fix | Delete
}, 750);
[125] Fix | Delete
}
[126] Fix | Delete
});
[127] Fix | Delete
[128] Fix | Delete
WFAD.ajax('wordfence_saveDisclosureState', {name: block.data('persistenceKey'), state: true}, function() {}, function() {}, true);
[129] Fix | Delete
}
[130] Fix | Delete
}
[131] Fix | Delete
[132] Fix | Delete
$('.wf-options-searcher').val('').change();
[133] Fix | Delete
}
[134] Fix | Delete
});
[135] Fix | Delete
[136] Fix | Delete
if ($('.wf-options-searcher').length > 0) {
[137] Fix | Delete
$('.wf-options-searcher').data('wfselect2').$container.addClass('wf-select2-placeholder-fix wf-select2-hide-tags');
[138] Fix | Delete
}
[139] Fix | Delete
[140] Fix | Delete
$(window).on('resize', function(e) {
[141] Fix | Delete
$('.wf-options-searcher').wfselect2({
[142] Fix | Delete
tags: true,
[143] Fix | Delete
tokenSeparators: [','],
[144] Fix | Delete
placeholder: <?php echo json_encode(__('Search All Options', 'wordfence')) ?>,
[145] Fix | Delete
minimumResultsForSearch: -1,
[146] Fix | Delete
minimumInputLength: 2,
[147] Fix | Delete
selectOnClose: false,
[148] Fix | Delete
width: (WFAD.screenSize(WFAD.SCREEN_MD) ? '250px' : '500px'),
[149] Fix | Delete
createTag: function (params) {
[150] Fix | Delete
return null; //No custom tags
[151] Fix | Delete
}
[152] Fix | Delete
});
[153] Fix | Delete
});
[154] Fix | Delete
});
[155] Fix | Delete
})(jQuery);
[156] Fix | Delete
</script>
[157] Fix | Delete
<script type="text/x-jquery-template" id="wfTmpl_restoreDefaultsPrompt">
[158] Fix | Delete
<?php
[159] Fix | Delete
echo wfView::create('common/modal-prompt', array(
[160] Fix | Delete
'title' => __('Confirm Restore Defaults', 'wordfence'),
[161] Fix | Delete
'message' => $restoreDefaultsMessage,
[162] Fix | Delete
'primaryButton' => array('id' => 'wf-restore-defaults-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'),
[163] Fix | Delete
'secondaryButtons' => array(array('id' => 'wf-restore-defaults-prompt-confirm', 'labelHTML' => wp_kses(/* translators: word order may be reversed as long as HTML remains around "Defaults" */ __('Restore<span class="wf-hidden-xs"> Defaults</span>', 'wordfence'), array('span'=>array('class'=>array()))), 'link' => '#')),
[164] Fix | Delete
))->render();
[165] Fix | Delete
?>
[166] Fix | Delete
</script>
[167] Fix | Delete
<?php endif; ?>
[168] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function