Sanitizes a URL for database or redirect usage.
Description
This function is an alias for sanitize_url() .
See also
Parameters
$url
stringrequired- The URL to be cleaned.
$protocols
string[]optional- An array of acceptable protocols.
Defaults to return value of wp_allowed_protocols() .Default:
null
Source
* @since 6.1.0 Turned into an alias for sanitize_url().
*
* @see sanitize_url()
Changelog
Version | Description |
---|---|
6.1.0 | Turned into an alias for sanitize_url() . |
2.8.0 | Introduced. |
Right and Wrong usage