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: option-switch.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_VERSION')) { exit; }
[1] Fix | Delete
/**
[2] Fix | Delete
* Presents a switch option.
[3] Fix | Delete
*
[4] Fix | Delete
* Expects $optionName, $value, $states, and $title (or $titleHTML) to be defined. $helpLink may also be defined.
[5] Fix | Delete
*
[6] Fix | Delete
* @var string $optionName The option name for the switch.
[7] Fix | Delete
* @var string $value The current value of $optionName.
[8] Fix | Delete
* @var string $title The title shown for the option.
[9] Fix | Delete
* @var string $titleHTML The raw HTML title shown for the option. This supersedes $title.
[10] Fix | Delete
* @var array $states An array of the possible states for the switch. The array matches the format array('value' => <value>, 'label' => <label>)
[11] Fix | Delete
* @var string $helpLink If defined, the link to the corresponding external help page.
[12] Fix | Delete
* @var bool $premium If defined, the option will be tagged as premium only and not allow its value to change for free users.
[13] Fix | Delete
*/
[14] Fix | Delete
[15] Fix | Delete
if (!isset($titleHTML)) {
[16] Fix | Delete
$titleHTML = esc_html($title);
[17] Fix | Delete
}
[18] Fix | Delete
[19] Fix | Delete
$id = 'wf-option-' . preg_replace('/[^a-z0-9]/i', '-', $optionName);
[20] Fix | Delete
?>
[21] Fix | Delete
<ul id="<?php echo esc_attr($id); ?>" class="wf-option wf-option-switch<?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' wf-option-premium'; } ?>" data-option-name="<?php echo esc_attr($optionName); ?>" data-original-value="<?php echo esc_attr($value); ?>">
[22] Fix | Delete
<?php if (!isset($noSpacer) || !$noSpacer): ?>
[23] Fix | Delete
<li class="wf-option-spacer"></li>
[24] Fix | Delete
<?php endif; ?>
[25] Fix | Delete
<li class="wf-option-content">
[26] Fix | Delete
<ul>
[27] Fix | Delete
<li class="wf-option-title">
[28] Fix | Delete
<?php if (isset($subtitle)): ?>
[29] Fix | Delete
<ul class="wf-flex-vertical wf-flex-align-left">
[30] Fix | Delete
<li>
[31] Fix | Delete
<?php endif; ?>
[32] Fix | Delete
<span id="<?php echo esc_attr($id); ?>-label"><?php echo $titleHTML; ?></span><?php if (!wfConfig::p() && isset($premium) && $premium) { echo ' <a href="https://www.wordfence.com/gnl1optionUpgrade/wordfence-signup/" target="_blank" rel="noopener noreferrer" class="wf-premium-link">' . esc_html__('Premium Feature', 'wordfence') . '</a>'; } ?><?php if (isset($helpLink)) { echo ' <a href="' . esc_attr($helpLink) . '" 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"> (' . esc_html__('opens in new tab', 'wordfence') . ')</span></a>'; } ?>
[33] Fix | Delete
<?php if (isset($subtitle)): ?>
[34] Fix | Delete
</li>
[35] Fix | Delete
<li class="wf-option-subtitle"><?php echo esc_html($subtitle); ?></li>
[36] Fix | Delete
</ul>
[37] Fix | Delete
<?php endif; ?>
[38] Fix | Delete
</li>
[39] Fix | Delete
<li class="wf-option-switch<?php if (isset($alignment)) { echo ' ' . $alignment; } ?> wf-padding-add-top-xs-small">
[40] Fix | Delete
<ul class="wf-switch<?php echo (!(!wfConfig::p() && isset($premium) && $premium) ? '' : ' wf-disabled'); ?>" role="radiogroup" aria-labelledby="<?php echo esc_attr($id); ?>-label">
[41] Fix | Delete
<?php foreach ($states as $s): ?>
[42] Fix | Delete
<li<?php if ($s['value'] == $value) { echo ' class="wf-active"'; } ?> data-option-value="<?php echo esc_attr($s['value']); ?>" role="radio" aria-checked="<?php echo ($s['value'] == $value ? 'true' : 'false'); ?>" tabindex="0"><?php echo esc_html($s['label']); ?></li>
[43] Fix | Delete
<?php endforeach; ?>
[44] Fix | Delete
</ul>
[45] Fix | Delete
</li>
[46] Fix | Delete
</ul>
[47] Fix | Delete
</li>
[48] Fix | Delete
</ul>
[49] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function