Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_validate_redirect()

3 tags 1 category

wp_validate_redirect() — Validates a URL for use in a redirect. Checks whether the $location is using an allowed host, if it has an absolute path. A plugin can therefore set or remove allowed host(s) to or from the list. If the host is not allowed, then the redirect is to $fallback_url supplied.

Inputs: $location (string): The redirect to validate. $fallback_url (string): The value to return if $location is not allowed.

Returns string: Redirect-sanitized URL.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…