status_header
云策文档标注
概述
status_header 是一个 WordPress 过滤器,用于修改 HTTP 状态头。它允许开发者在设置状态头时自定义其内容。
关键要点
- 过滤器名称:status_header
- 参数:$status_header(字符串,HTTP 状态头)、$code(整数,HTTP 状态码)、$description(字符串,状态码描述)、$protocol(字符串,服务器协议)
- 用法:通过 apply_filters 调用,例如在 status_header() 函数中
- 相关函数:status_header() 用于设置 HTTP 状态头
- 引入版本:WordPress 2.2.0
原文内容
Filters an HTTP status header.
Parameters
$status_headerstring-
HTTP status header.
$codeint-
HTTP status code.
$descriptionstring-
Description for the status code.
$protocolstring-
Server protocol.
Source
$status_header = apply_filters( 'status_header', $status_header, $code, $description, $protocol );
Changelog
| Version | Description |
|---|---|
| 2.2.0 | Introduced. |