Simplify status_header
git-svn-id: https://develop.svn.wordpress.org/trunk@3005 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
76915903e3
commit
df22877fdb
|
@ -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