wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



sanitize_url › WordPress Function

Da2.3.1
Deprecaton/a
› sanitize_url ( $url, $protocols = null )
Parametri: (2)
  • (string) $url The URL to be cleaned.
    Richiesto: Sì
  • (string[]) $protocols Optional. An array of acceptable protocols. Defaults to return value of wp_allowed_protocols().
    Richiesto: No
    Default: null
Vedi:
Ritorna:
  • (string) The cleaned URL after esc_url() is run with the 'db' context.
Definito a:
Codex:
ChangeLog:
  • 2.8.0
  • 5.9.0
  • 6.9.0

Sanitizes a URL for database or redirect usage.



Sorgenti

function sanitize_url( $url, $protocols = null ) {
	return esc_url( $url, $protocols, 'db' );
}