wp_redirect_status WordPress Filter Hook

The wp_redirect_status hook allows for the modification of the HTTP status code returned when a redirect occurs. This can be useful for debugging purposes or for changing the behaviour of certain plugins or themes.

apply_filters( 'wp_redirect_status', int $status, string $location ) #

Filters the redirect HTTP response status code to use.


Parameters

$status

(int)The HTTP response status code to use.

$location

(string)The path or URL to redirect to.


Top ↑

Source

File: wp-includes/pluggable.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.