WordPress Version: 3.7
/**
* Set HTTP status header.
*
* @since 2.0.0
* @uses apply_filters() Calls 'status_header' on status header string, HTTP
* HTTP code, HTTP code description, and protocol string as separate
* parameters.
*
* @param int $header HTTP status code
* @return unknown
*/
function status_header($header)
{
$text = get_status_header_desc($header);
if (empty($text)) {
return false;
}
$protocol = $_SERVER["SERVER_PROTOCOL"];
if ('HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol) {
$protocol = 'HTTP/1.0';
}
$status_header = "{$protocol} {$header} {$text}";
if (function_exists('apply_filters')) {
$status_header = apply_filters('status_header', $status_header, $header, $text, $protocol);
}
return @header($status_header, true, $header);
}