Changes from branches/3.5/wp-includes/functions.php at r23281 to trunk/wp-includes/functions.php at r23002
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r23281 r23002 903 903 $headers = array( 904 904 'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT', 905 'Last-Modified' => '', 905 906 'Cache-Control' => 'no-cache, must-revalidate, max-age=0', 906 907 'Pragma' => 'no-cache', … … 910 911 $headers = (array) apply_filters('nocache_headers', $headers); 911 912 } 912 $headers['Last-Modified'] = false;913 913 return $headers; 914 914 } … … 925 925 function nocache_headers() { 926 926 $headers = wp_get_nocache_headers(); 927 928 unset( $headers['Last-Modified'] );929 930 // In PHP 5.3+, make sure we are not sending a Last-Modified header.931 if ( function_exists( 'header_remove' ) ) {932 @header_remove( 'Last-Modified' );933 } else {934 // In PHP 5.2, send an empty Last-Modified header, but only as a935 // last resort to override a header already sent. #WP23021936 foreach ( headers_list() as $header ) {937 if ( 0 === stripos( $header, 'Last-Modified' ) ) {938 $headers['Last-Modified'] = '';939 break;940 }941 }942 }943 944 927 foreach( $headers as $name => $field_value ) 945 928 @header("{$name}: {$field_value}"); 929 if ( empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) ) 930 @header_remove( 'Last-Modified' ); 946 931 } 947 932
Note: See TracChangeset
for help on using the changeset viewer.