Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp sanitize redirect

This page redirects to an external site: https://developer.wordpress.org/reference/functions/wp_sanitize_redirect/

Description

Sanitizes a URL for use in a redirect. Removes invalid URL characters in the URL parameter.

Parameters

$location
(string) (required) URL of the link to redirect to.
Default: None

Return Values

(string) 
redirect-sanitized URL

Change Log

Since: 2.3

Source File

wp_sanitize_redirect() is located in wp-includes/pluggable.php