Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function last_modified_header() {
- $post_id = get_queried_object_id();
- if($post_id) {
- $modified_date = new DateTime();
- $modified_date->setTimestamp(get_the_modified_date('U', $post_id));
- setlocale(LC_ALL, array('en_US.UTF-8'));
- header("Last-Modified: " . $modified_date->format('D, d M Y H:i:s +0000') );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement