wp_redirect_status filter-hookWP 2.3.0

Filters the redirect HTTP response status code to use.

Usage

add_filter( 'wp_redirect_status', 'wp_kama_redirect_status_filter', 10, 2 );

/**
 * Function for `wp_redirect_status` filter-hook.
 * 
 * @param int    $status   The HTTP response status code to use.
 * @param string $location The path or URL to redirect to.
 *
 * @return int
 */
function wp_kama_redirect_status_filter( $status, $location ){

	// filter...
	return $status;
}
$status(int)
The HTTP response status code to use.
$location(string)
The path or URL to redirect to.

Changelog

Since 2.3.0 Introduced.

Where the hook is called

wp_redirect()
wp_redirect_status
wp-includes/pluggable.php 1392
$status = apply_filters( 'wp_redirect_status', $status, $location );

Where the hook is used in WordPress

Usage not found.