clean_url
- clean_url is deprecated since version 3.0.0!
Alternative: esc_url()
clean_url ( $url, $protocols = null, $context = 'display' )
Parameters:- (string) url The URL to be cleaned.
- (array) protocols Optional. An array of acceptable protocols.
- (string) context Optional. How the URL will be used. Default is 'display'.
See:Returns:- (string) The cleaned $url after the {@see 'clean_url'} filter is applied.
Defined at: - Introduced in WordPress: 1.2.0
- Deprecated in WordPress: 3.0.0
Description
Checks and cleans a URL.A number of characters are removed from the URL. If the URL is for displaying
(the default behavior) ampersands are also replaced. The 'clean_url' filter
is applied to the returned cleaned URL.