wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



sanitize_url › WordPress Function

Od2.3.1
Przestarzałyn/a
sanitize_url ( $url, $protocols = null )
Parametry: (2)
  • (string) $url The URL to be cleaned.
    Wymagane: Tak
  • (string[]) $protocols Optional. An array of acceptable protocols. Defaults to return value of wp_allowed_protocols().
    Wymagane: Nie
    Domyślny: null
Zobacz:
Powrót:
  • (string) The cleaned URL after esc_url() is run with the 'db' context.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 2.8.0
  • 5.9.0

Sanitizes a URL for database or redirect usage.



Źródło

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