clean_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:

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.

Related Functions

clean_pre, includes_url, admin_url, get_admin_url, clean_user_cache

Top Google Results

User discussions

wpseek mobile