W3cubDocs

/WordPress

apply_filters( ‘wp_redirect’, string $location, int $status )

Filters the redirect location.

Parameters

$locationstring
The path or URL to redirect to.
$statusint
The HTTP response status code to use.

Source

$location = apply_filters( 'wp_redirect', $location, $status );

Changelog

Version Description
2.1.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_redirect