Changeset 57943 for trunk/src/wp-admin/load-styles.php
- Timestamp:
- 04/07/2024 11:51:57 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/load-styles.php
r55994 r57943 49 49 wp_default_styles( $wp_styles ); 50 50 51 if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) { 51 $etag = "WP:{$wp_version};"; 52 53 foreach ( $load as $handle ) { 54 if ( ! array_key_exists( $handle, $wp_styles->registered ) ) { 55 continue; 56 } 57 58 $ver = $wp_styles->registered[ $handle ]->ver ? $wp_styles->registered[ $handle ]->ver : $wp_version; 59 $etag .= "{$handle}:{$ver};"; 60 } 61 62 /* 63 * This is not intended to be cryptographically secure, just a fast way to get 64 * a fixed length string based on the script versions. As this file does not 65 * load the full WordPress environment, it is not possible to use the salted 66 * wp_hash() function. 67 */ 68 $etag = 'W/"' . md5( $etag ) . '"'; 69 70 if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $etag ) { 52 71 header( "$protocol 304 Not Modified" ); 53 72 exit; … … 85 104 } 86 105 87 header( "Etag: $ wp_version" );106 header( "Etag: $etag" ); 88 107 header( 'Content-Type: text/css; charset=UTF-8' ); 89 108 header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
Note: See TracChangeset
for help on using the changeset viewer.