str_replace not responding in functions.php [closed]

That could not work, you simply miss the $ before $url.
$output .= ” .$url. ”;