Ticket #21472: 21472.2.diff
File 21472.2.diff, 941 bytes (added by , 9 years ago) |
---|
-
src/wp-includes/functions.php
981 981 * Set HTTP status header. 982 982 * 983 983 * @since 2.0.0 984 * @since 4.4.0 Added the `$description` parameter. 984 985 * 985 986 * @see get_status_header_desc() 986 987 * 987 * @param int $code HTTP status code. 988 * @param int $code HTTP status code. 989 * @param string $description Optional. A custom description for the HTTP status. 988 990 */ 989 function status_header( $code ) { 990 $description = get_status_header_desc( $code ); 991 function status_header( $code, $description = '' ) { 992 if ( ! $description ) { 993 $description = get_status_header_desc( $code ); 994 } 991 995 992 if ( empty( $description ) ) 996 if ( empty( $description ) ) { 993 997 return; 998 } 994 999 995 1000 $protocol = wp_get_server_protocol(); 996 1001 $status_header = "$protocol $code $description";