Simplify status_header
git-svn-id: http://svn.automattic.com/wordpress/trunk@3005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5b1a7b5ed0
commit
725cc84302
|
@ -2062,14 +2062,8 @@ function status_header( $header ) {
|
||||||
elseif ( 410 == $header )
|
elseif ( 410 == $header )
|
||||||
$text = 'Gone';
|
$text = 'Gone';
|
||||||
|
|
||||||
if ( preg_match('/cgi/',php_sapi_name()) ) {
|
@header("HTTP/1.1 $header $text");
|
||||||
@header("Status: $header $text");
|
@header("Status: $header $text");
|
||||||
} else {
|
|
||||||
if ( version_compare(phpversion(), '4.3.0', '>=') )
|
|
||||||
@header($text, TRUE, $header);
|
|
||||||
else
|
|
||||||
@header("HTTP/1.x $header $text");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function nocache_headers() {
|
function nocache_headers() {
|
||||||
|
|
Loading…
Reference in New Issue