sanitize_url


sanitize_url ( $url, $protocols = null )

Parameters:
  • (string) $url The URL to be cleaned.
  • (array) $protocols An array of acceptable protocols.
See:
Returns:
  • (string) The cleaned URL.
Defined at:

Description

Performs esc_url() for database or redirect usage.

Related Functions

sanitize_user, sanitize_term, site_url, sanitize_title, sanitize_user_field

Top Google Results

User discussions

wpseek mobile