status_header
Filters an HTTP status header.
Использование
add_filter( 'status_header', 'wp_kama_status_header_filter', 10, 4 );
/**
* Function for `status_header` filter-hook.
*
* @param string $status_header HTTP status header.
* @param int $code HTTP status code.
* @param string $description Description for the status code.
* @param string $protocol Server protocol.
*
* @return string
*/
function wp_kama_status_header_filter( $status_header, $code, $description, $protocol ){
// filter...
return $status_header;
}
- $status_header(строка)
- HTTP status header.
- $code(int)
- HTTP status code.
- $description(строка)
- Description for the status code.
- $protocol(строка)
- Server protocol.
Список изменений
| С версии 2.2.0 | Введена. |
Где вызывается хук
status_header
wp-includes/functions.php 1486
$status_header = apply_filters( 'status_header', $status_header, $code, $description, $protocol );