функция
since 2.7.0
wp_remote_retrieve_headers()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_remote_retrieve_headers( array|WP_Error $response ): WpOrgRequestsUtilityCaseInsensitiveDictionary|array
Описание
См. также WpOrgRequestsUtilityCaseInsensitiveDictionary
Оригинал (английский)
- WpOrgRequestsUtilityCaseInsensitiveDictionary
Параметры
$response
array|WP_Error
обязательный
HTTP-ответ.
Возвращаемое значение
WpOrgRequestsUtilityCaseInsensitiveDictionary|array
Исходный код
wp-includes/http.php:246
function wp_remote_retrieve_headers( $response ) {
if ( is_wp_error( $response ) || ! isset( $response['headers'] ) ) {
return array();
}
return $response['headers'];
}
История изменений
| Версия | Описание |
|---|---|
| 4.6.0 | Return value changed from an array to an WpOrgRequestsUtilityCaseInsensitiveDictionary instance. |
| 2.7.0 | Introduced. |

