Function
Validate a URL for redirection.
tml_validate_redirect( string $url )
Parameters
-
$urlstring - The URL to validate.
Return
string
The validated URL.
Source
function tml_validate_redirect( $url ) {
return wp_validate_redirect(
wp_sanitize_redirect( $url ),
/** This filter is documented in wp-includes/pluggable.php */
apply_filters( 'wp_safe_redirect_fallback', admin_url(), 302 )
);
}
Uses
Used by
Changelog
| Version | Description |
|---|---|
| 7.1 | Introduced. |