2020-05-01 / 4155阅 / 悠然
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.
The URL to be cleaned.
An array of acceptable protocols. Defaults to return value of wp_allowed_protocols()
Default value: null
Private. Use esc_url_raw() for database usage.
Default value: 'display'
(string) The cleaned $url after the 'clean_url' filter is applied.