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/wp-conte.../plugins/wordfenc.../views/common
File: block-navigation-option.php
<?php
[0] Fix | Delete
if (!defined('WORDFENCE_VERSION')) { exit; }
[1] Fix | Delete
/**
[2] Fix | Delete
* Presents a block navigation option with image, title, and subtitle.
[3] Fix | Delete
*
[4] Fix | Delete
* Expects $id, $title, $img, $link, and $subtitle to be defined.
[5] Fix | Delete
*
[6] Fix | Delete
* @var string $id The element ID.
[7] Fix | Delete
* @var string $title The option's title.
[8] Fix | Delete
* @var string $img The image name. If SVG, it will be inserted as an svg element rather than img.
[9] Fix | Delete
* @var string $link The link for the option to go to.
[10] Fix | Delete
* @var string $subtitle Subtitle for the option.
[11] Fix | Delete
*/
[12] Fix | Delete
?>
[13] Fix | Delete
<div id="<?php echo esc_attr($id); ?>" class="wf-block-navigation-option">
[14] Fix | Delete
<?php if (preg_match('/\.svg$/i', $img)) : ?>
[15] Fix | Delete
<?php
[16] Fix | Delete
$contents = file_get_contents(WORDFENCE_PATH . '/images/' . $img);
[17] Fix | Delete
$contents = preg_replace('/<svg\s+xmlns="[^"]*"/i', '<svg', $contents);
[18] Fix | Delete
$contents = preg_replace('/(<svg[^>]+)/i', '${1} class="wf-block-navigation-option-icon"', $contents);
[19] Fix | Delete
echo $contents;
[20] Fix | Delete
?>
[21] Fix | Delete
<?php else: ?>
[22] Fix | Delete
<img src="<?php echo esc_attr(wfUtils::getBaseURL() . 'images/' . $img); ?>" class="wf-block-navigation-option-icon" alt="<?php echo esc_attr($title); ?>">
[23] Fix | Delete
<?php endif; ?>
[24] Fix | Delete
<div class="wf-block-navigation-option-content">
[25] Fix | Delete
<h4><a href="<?php echo esc_attr($link); ?>"><?php echo esc_html($title); ?></a></h4>
[26] Fix | Delete
<p><?php echo esc_html($subtitle); ?></p>
[27] Fix | Delete
</div>
[28] Fix | Delete
</div>
[29] Fix | Delete
<script type="application/javascript">
[30] Fix | Delete
(function($) {
[31] Fix | Delete
$('#<?php echo esc_attr($id); ?>').on('click', function() {
[32] Fix | Delete
window.location.href = $(this).find('a').attr('href');
[33] Fix | Delete
});
[34] Fix | Delete
})(jQuery);
[35] Fix | Delete
</script>
[36] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function