Ticket #47968: 47968.patch
| File 47968.patch, 1.7 KB (added by , 4 years ago) |
|---|
-
src/wp-includes/class-wp.php
401 401 $headers = array(); 402 402 $status = null; 403 403 $exit_required = false; 404 $date_format = 'D, d M Y H:i:s'; 404 405 405 406 if ( is_user_logged_in() ) { 406 407 $headers = array_merge( $headers, wp_get_nocache_headers() ); … … 408 409 // Unmoderated comments are only visible for 10 minutes via the moderation hash. 409 410 $expires = 10 * MINUTE_IN_SECONDS; 410 411 411 $headers['Expires'] = gmdate( 'D, d M Y H:i:s', time() + $expires );412 $headers['Expires'] = gmdate( $date_format, time() + $expires ); 412 413 $headers['Cache-Control'] = sprintf( 413 414 'max-age=%d, must-revalidate', 414 415 $expires … … 447 448 ) 448 449 ) 449 450 ) { 450 $wp_last_modified = mysql2date( 'D, d M Y H:i:s', get_lastcommentmodified( 'GMT' ), false ); 451 $wp_last_modified_post = mysql2date( $date_format, get_lastpostmodified( 'GMT' ), false ); 452 $wp_last_modified_comment = mysql2date( $date_format, get_lastcommentmodified( 'GMT' ), false ); 453 454 if ( $wp_last_modified_post > $wp_last_modified_comment ) { 455 $wp_last_modified = $wp_last_modified_post; 456 } else { 457 $wp_last_modified = $wp_last_modified_comment; 458 } 451 459 } else { 452 $wp_last_modified = mysql2date( 'D, d M Y H:i:s', get_lastpostmodified( 'GMT' ), false );460 $wp_last_modified = mysql2date( $date_format, get_lastpostmodified( 'GMT' ), false ); 453 461 } 454 462 455 463 if ( ! $wp_last_modified ) { 456 $wp_last_modified = gmdate( 'D, d M Y H:i:s');464 $wp_last_modified = gmdate( $date_format ); 457 465 } 458 466 459 467 $wp_last_modified .= ' GMT';