status_header WordPress Filter Hook
The status_header hook is a great way to modify the HTTP status code of a WordPress request. This can be useful for things like 404 pages, or redirecting pages that have been moved.
apply_filters( 'status_header', string $status_header , int $code , string $description , string $protocol ) #
Filters an HTTP status header.
Parameters
- $status_header
(string)HTTP status header.
- $code
(int)HTTP status code.
- $description
(string)Description for the status code.
- $protocol
(string)Server protocol.
Source
Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |