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.../modules/login-se.../classes/utility
File: url.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace WordfenceLS;
[2] Fix | Delete
[3] Fix | Delete
class Utility_URL {
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Similar to WordPress' `admin_url`, this returns a host-relative URL for the given path. It may be used to avoid
[7] Fix | Delete
* canonicalization issues with CORS (e.g., the site is configured for the www. variant of the URL but doesn't forward
[8] Fix | Delete
* the other).
[9] Fix | Delete
*
[10] Fix | Delete
* @param string $path
[11] Fix | Delete
* @return string
[12] Fix | Delete
*/
[13] Fix | Delete
public static function relative_admin_url($path = '') {
[14] Fix | Delete
$url = admin_url($path);
[15] Fix | Delete
$components = parse_url($url);
[16] Fix | Delete
$s = $components['path'];
[17] Fix | Delete
if (!empty($components['query'])) {
[18] Fix | Delete
$s .= '?' . $components['query'];
[19] Fix | Delete
}
[20] Fix | Delete
if (!empty($components['fragment'])) {
[21] Fix | Delete
$s .= '#' . $components['fragment'];
[22] Fix | Delete
}
[23] Fix | Delete
return $s;
[24] Fix | Delete
}
[25] Fix | Delete
}
[26] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function