Changeset 25990 for trunk/src/wp-includes/functions.php
- Timestamp:
- 10/29/2013 10:43:08 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r25827 r25990 895 895 * 896 896 * @since 2.0.0 897 * @uses apply_filters() Calls 'status_header' on status header string, HTTP 898 * HTTP code, HTTP code description, and protocol string as separate 899 * parameters. 900 * 901 * @param int $header HTTP status code 902 * @return unknown 903 */ 904 function status_header( $header ) { 905 $text = get_status_header_desc( $header ); 906 907 if ( empty( $text ) ) 908 return false; 909 910 $protocol = $_SERVER["SERVER_PROTOCOL"]; 897 * @see get_status_header_desc() 898 * 899 * @param int $code HTTP status code. 900 */ 901 function status_header( $code ) { 902 $description = get_status_header_desc( $code ); 903 904 if ( empty( $description ) ) 905 return; 906 907 $protocol = $_SERVER['SERVER_PROTOCOL']; 911 908 if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) 912 909 $protocol = 'HTTP/1.0'; 913 $status_header = "$protocol $ header $text";910 $status_header = "$protocol $code $description"; 914 911 if ( function_exists( 'apply_filters' ) ) 915 $status_header = apply_filters( 'status_header', $status_header, $ header, $text, $protocol );916 917 return @header( $status_header, true, $header);912 $status_header = apply_filters( 'status_header', $status_header, $code, $description, $protocol ); 913 914 @header( $status_header, true, $code ); 918 915 } 919 916 … … 926 923 * @since 2.8.0 927 924 * 928 * @uses apply_filters()929 925 * @return array The associative array of header names and field values. 930 926 */ … … 950 946 * 951 947 * @since 2.0.0 952 * @ useswp_get_nocache_headers()948 * @see wp_get_nocache_headers() 953 949 */ 954 950 function nocache_headers() {
Note: See TracChangeset
for help on using the changeset viewer.