sanitize_url


sanitize_url ( $url, $protocols = null )

Parameters:
  • (string) url The URL to be cleaned.
  • (string[]) protocols Optional. An array of acceptable protocols. Defaults to return value of wp_allowed_protocols().
See:
Returns:
  • (string) The cleaned URL after esc_url() is run with the 'db' context.
Defined at:
Change Log:
  • 2: .
  • 5: .

Description

Performs esc_url() for database or redirect usage.This function is an alias for esc_url_raw().

Related Functions

sanitize_user, sanitize_term, site_url, sanitize_user_field, sanitize_title

Top Google Results

User discussions

wpseek mobile