2020-05-01 / 4357阅 / 悠然
Checks and cleans a URL.
A number of characters are removed from the URL. If the URL is for displaying (the default behaviour) ampersands are also replaced. The ‘clean_url’ filter is applied to the returned cleaned URL.
(string)
(Required)
The URL to be cleaned.
(string[])
(Optional)
An array of acceptable protocols. Defaults to return value of wp_allowed_protocols()
Default value: null
(string)
(Optional)
Private. Use esc_url_raw() for database usage.
Default value: 'display'
(string) The cleaned $url after the 'clean_url' filter is applied.