Changeset 53233 for trunk/src/wp-includes/class-wp.php
- Timestamp:
- 04/20/2022 12:46:01 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp.php
r52815 r53233 414 414 $status = null; 415 415 $exit_required = false; 416 $date_format = 'D, d M Y H:i:s'; 416 417 417 418 if ( is_user_logged_in() ) { … … 421 422 $expires = 10 * MINUTE_IN_SECONDS; 422 423 423 $headers['Expires'] = gmdate( 'D, d M Y H:i:s', time() + $expires );424 $headers['Expires'] = gmdate( $date_format, time() + $expires ); 424 425 $headers['Cache-Control'] = sprintf( 425 426 'max-age=%d, must-revalidate', … … 460 461 ) 461 462 ) { 462 $wp_last_modified = mysql2date( 'D, d M Y H:i:s', get_lastcommentmodified( 'GMT' ), false ); 463 $wp_last_modified_post = mysql2date( $date_format, get_lastpostmodified( 'GMT' ), false ); 464 $wp_last_modified_comment = mysql2date( $date_format, get_lastcommentmodified( 'GMT' ), false ); 465 if ( strtotime( $wp_last_modified_post ) > strtotime( $wp_last_modified_comment ) ) { 466 $wp_last_modified = $wp_last_modified_post; 467 } else { 468 $wp_last_modified = $wp_last_modified_comment; 469 } 463 470 } else { 464 $wp_last_modified = mysql2date( 'D, d M Y H:i:s', get_lastpostmodified( 'GMT' ), false );471 $wp_last_modified = mysql2date( $date_format, get_lastpostmodified( 'GMT' ), false ); 465 472 } 466 473 467 474 if ( ! $wp_last_modified ) { 468 $wp_last_modified = gmdate( 'D, d M Y H:i:s');475 $wp_last_modified = gmdate( $date_format ); 469 476 } 470 477
Note: See TracChangeset
for help on using the changeset viewer.