# get_status_header_desc()

URL: https://chugunov.pro/api-wordpress/functions/get_status_header_desc/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.3.0.

## Сигнатура

```php
get_status_header_desc( int $code ): string
```

## Описание

Возвращает описание для HTTP-статуса.

## Параметры

- `$code` `int` — обязательный. Код HTTP-статуса.

## Возвращаемое значение

`string`

## Исходный код

Файл: `wp-includes/functions.php:1364`

```php
function get_status_header_desc( $code ) {
	global $wp_header_to_desc;

	$code = absint( $code );

	if ( ! isset( $wp_header_to_desc ) ) {
		$wp_header_to_desc = array(
			100 => 'Continue',
			101 => 'Switching Protocols',
			102 => 'Processing',
			103 => 'Early Hints',

			200 => 'OK',
			201 => 'Created',
			202 => 'Accepted',
			203 => 'Non-Authoritative Information',
			204 => 'No Content',
			205 => 'Reset Content',
			206 => 'Partial Content',
			207 => 'Multi-Status',
			226 => 'IM Used',

			300 => 'Multiple Choices',
			301 => 'Moved Permanently',
			302 => 'Found',
			303 => 'See Other',
			304 => 'Not Modified',
			305 => 'Use Proxy',
			306 => 'Reserved',
			307 => 'Temporary Redirect',
			308 => 'Permanent Redirect',

			400 => 'Bad Request',
			401 => 'Unauthorized',
			402 => 'Payment Required',
			403 => 'Forbidden',
			404 => 'Not Found',
			405 => 'Method Not Allowed',
			406 => 'Not Acceptable',
			407 => 'Proxy Authentication Required',
			408 => 'Request Timeout',
			409 => 'Conflict',
			410 => 'Gone',
			411 => 'Length Required',
			412 => 'Precondition Failed',
			413 => 'Request Entity Too Large',
			414 => 'Request-URI Too Long',
			415 => 'Unsupported Media Type',
			416 => 'Requested Range Not Satisfiable',
			417 => 'Expectation Failed',
			418 => 'I\'m a teapot',
			421 => 'Misdirected Request',
			422 => 'Unprocessable Entity',
			423 => 'Locked',
			424 => 'Failed Dependency',
			425 => 'Too Early',
			426 => 'Upgrade Required',
			428 => 'Precondition Required',
			429 => 'Too Many Requests',
			431 => 'Request Header Fields Too Large',
			451 => 'Unavailable For Legal Reasons',

			500 => 'Internal Server Error',
			501 => 'Not Implemented',
			502 => 'Bad Gateway',
			503 => 'Service Unavailable',
			504 => 'Gateway Timeout',
			505 => 'HTTP Version Not Supported',
			506 => 'Variant Also Negotiates',
			507 => 'Insufficient Storage',
			510 => 'Not Extended',
			511 => 'Network Authentication Required',
		);
	}

	if ( isset( $wp_header_to_desc[ $code ] ) ) {
		return $wp_header_to_desc[ $code ];
	} else {
		return '';
	}
}
```

## История изменений

- 6.6.0 — Added status code 425.
- 5.1.0 — Added status code 103.
- 4.5.0 — Added status codes 308, 421, and 451.
- 3.9.0 — Added status codes 418, 428, 429, 431, and 511.
- 2.3.0 — Introduced.

## Связанные

Использует: [`absint`](https://chugunov.pro/api-wordpress/functions/absint/).
Используется в: `WP_oEmbed_Controller::get_proxy_item`, `WP_HTTP_Requests_Response::to_array`, `WP_Http`, [`_oembed_rest_pre_serve_request`](https://chugunov.pro/api-wordpress/functions/_oembed_rest_pre_serve_request/), `WP_oEmbed_Controller::get_item`, [`status_header`](https://chugunov.pro/api-wordpress/functions/status_header/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/get_status_header_desc/
