Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get post modified time


Retrieve the time at which the post was last modified.

Note: One level »lower« than get_the_modified_time() (← link), but can take more arguments.


<?php get_post_modified_time$d$gmt$post$translate ); ?>


(string) (optional) Optional, default is 'U'. Either 'G', 'U', or php date format.
Default: U
(boolean) (optional) Optional, default is false. Whether to return the gmt time.
Default: false
(int|object) (optional) Optional, default is global post object. A post_id or post object
Default: null
(boolean) (optional) Optional, default is false. Whether to translate the result
Default: false

Return Values

Returns timestamp

Change Log

Since: 2.0

Source File

get_post_modified_time() is located in wp-includes/general-template.php